🚨
This commit is contained in:
parent
4946121b01
commit
2494412f77
6 changed files with 10 additions and 10 deletions
|
@ -230,11 +230,11 @@ const renderRepo = (element: Element, currentPage: number) => {
|
|||
});
|
||||
previousElement.classList.add("fn__none");
|
||||
nextElement.classList.add("fn__none");
|
||||
pageElement.classList.add("fn__none")
|
||||
pageElement.classList.add("fn__none");
|
||||
} else {
|
||||
previousElement.classList.remove("fn__none");
|
||||
nextElement.classList.remove("fn__none");
|
||||
pageElement.classList.remove("fn__none")
|
||||
pageElement.classList.remove("fn__none");
|
||||
element.setAttribute("data-page", currentPage.toString());
|
||||
if (currentPage > 1) {
|
||||
previousElement.removeAttribute("disabled");
|
||||
|
@ -514,7 +514,7 @@ const bindEvent = (element: Element, dialog?: Dialog) => {
|
|||
} else if (type === "more") {
|
||||
target.parentElement.parentElement.querySelectorAll(".b3-list-item__meta").forEach(item => {
|
||||
item.classList.toggle("fn__none");
|
||||
})
|
||||
});
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
break;
|
||||
|
|
|
@ -89,7 +89,7 @@ export class Bookmark extends Model {
|
|||
}
|
||||
},
|
||||
rightClick: (element: HTMLElement, event: MouseEvent) => {
|
||||
openBookmarkMenu(element, event, this)
|
||||
openBookmarkMenu(element, event, this);
|
||||
},
|
||||
ctrlClick(element: HTMLElement) {
|
||||
openFileById({
|
||||
|
|
|
@ -63,7 +63,7 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
|
|||
confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmarkText)}</b>?`, () => {
|
||||
if (id) {
|
||||
fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {
|
||||
bookmarkObj.update()
|
||||
bookmarkObj.update();
|
||||
});
|
||||
document.querySelectorAll(`.protyle-wysiwyg [data-node-id="${id}"]`).forEach((item) => {
|
||||
item.setAttribute("bookmark", "");
|
||||
|
@ -81,4 +81,4 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
|
|||
}
|
||||
window.siyuan.menus.menu.element.style.zIndex = "221"; // 移动端被右侧栏遮挡
|
||||
window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -402,7 +402,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
|
|||
icon: "iconSearch",
|
||||
accelerator: window.siyuan.config.keymap.general.search.custom,
|
||||
async click() {
|
||||
const searchPath = getDisplayName(pathString, false, true)
|
||||
const searchPath = getDisplayName(pathString, false, true);
|
||||
/// #if MOBILE
|
||||
const response = await fetchSyncPost("/api/filetree/getHPathByPath", {
|
||||
notebook: notebookId,
|
||||
|
@ -432,7 +432,7 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
|
|||
accelerator: window.siyuan.config.keymap.general.replace.custom,
|
||||
icon: "iconReplace",
|
||||
async click() {
|
||||
const searchPath = getDisplayName(pathString, false, true)
|
||||
const searchPath = getDisplayName(pathString, false, true);
|
||||
/// #if MOBILE
|
||||
const response = await fetchSyncPost("/api/filetree/getHPathByPath", {
|
||||
notebook: notebookId,
|
||||
|
|
|
@ -32,7 +32,7 @@ export class MobileBookmarks {
|
|||
const id = element.getAttribute("data-node-id");
|
||||
const actionElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item__action");
|
||||
if (actionElement) {
|
||||
openBookmarkMenu(actionElement.parentElement, event, this)
|
||||
openBookmarkMenu(actionElement.parentElement, event, this);
|
||||
} else {
|
||||
fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
|
||||
openMobileFileById(id, foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// https://github.com/siyuan-note/siyuan/pull/8012
|
||||
export const registerServiceWorker = (scriptURL: string, scope: string = "/", workerType: WorkerType = "module") => {
|
||||
export const registerServiceWorker = (scriptURL: string, scope = "/", workerType: WorkerType = "module") => {
|
||||
if (!("serviceWorker" in navigator) || typeof (navigator.serviceWorker) === "undefined" ||
|
||||
!("caches" in window) || !("fetch" in window)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue