mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
🚨
This commit is contained in:
parent
3a3bd13ff5
commit
cddb7a7a25
6 changed files with 7 additions and 10 deletions
|
|
@ -8,7 +8,6 @@ import {updateHotkeyTip} from "../../protyle/util/compatibility";
|
||||||
import {openFileById} from "../../editor/util";
|
import {openFileById} from "../../editor/util";
|
||||||
import {Constants} from "../../constants";
|
import {Constants} from "../../constants";
|
||||||
import {Dialog} from "../../dialog";
|
import {Dialog} from "../../dialog";
|
||||||
import {isMobile} from "../../util/functions";
|
|
||||||
import {confirmDialog} from "../../dialog/confirmDialog";
|
import {confirmDialog} from "../../dialog/confirmDialog";
|
||||||
import {escapeHtml} from "../../util/escape";
|
import {escapeHtml} from "../../util/escape";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import {updateHotkeyTip} from "../../protyle/util/compatibility";
|
||||||
import {openGlobalSearch} from "../../search/util";
|
import {openGlobalSearch} from "../../search/util";
|
||||||
import {MenuItem} from "../../menus/Menu";
|
import {MenuItem} from "../../menus/Menu";
|
||||||
import {Dialog} from "../../dialog";
|
import {Dialog} from "../../dialog";
|
||||||
import {isMobile} from "../../util/functions";
|
|
||||||
import {confirmDialog} from "../../dialog/confirmDialog";
|
import {confirmDialog} from "../../dialog/confirmDialog";
|
||||||
import {escapeHtml} from "../../util/escape";
|
import {escapeHtml} from "../../util/escape";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import {openMobileFileById} from "../editor";
|
||||||
import {confirmDialog} from "../../dialog/confirmDialog";
|
import {confirmDialog} from "../../dialog/confirmDialog";
|
||||||
import {escapeHtml} from "../../util/escape";
|
import {escapeHtml} from "../../util/escape";
|
||||||
import {Dialog} from "../../dialog";
|
import {Dialog} from "../../dialog";
|
||||||
import {isMobile} from "../../util/functions";
|
|
||||||
|
|
||||||
export class MobileBookmarks {
|
export class MobileBookmarks {
|
||||||
public element: HTMLElement;
|
public element: HTMLElement;
|
||||||
|
|
@ -111,7 +110,7 @@ export class MobileBookmarks {
|
||||||
}
|
}
|
||||||
|
|
||||||
public update() {
|
public update() {
|
||||||
this.element.lastElementChild.classList.remove("fn__none")
|
this.element.lastElementChild.classList.remove("fn__none");
|
||||||
fetchPost("/api/bookmark/getBookmark", {}, response => {
|
fetchPost("/api/bookmark/getBookmark", {}, response => {
|
||||||
if (this.openNodes) {
|
if (this.openNodes) {
|
||||||
this.openNodes = this.tree.getExpandIds();
|
this.openNodes = this.tree.getExpandIds();
|
||||||
|
|
@ -122,7 +121,7 @@ export class MobileBookmarks {
|
||||||
} else {
|
} else {
|
||||||
this.openNodes = this.tree.getExpandIds();
|
this.openNodes = this.tree.getExpandIds();
|
||||||
}
|
}
|
||||||
this.element.lastElementChild.classList.add("fn__none")
|
this.element.lastElementChild.classList.add("fn__none");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ export class MobileTags {
|
||||||
}
|
}
|
||||||
|
|
||||||
public update() {
|
public update() {
|
||||||
this.element.lastElementChild.classList.remove("fn__none")
|
this.element.lastElementChild.classList.remove("fn__none");
|
||||||
fetchPost("/api/tag/getTag", {
|
fetchPost("/api/tag/getTag", {
|
||||||
sort: window.siyuan.config.tag.sort
|
sort: window.siyuan.config.tag.sort
|
||||||
}, response => {
|
}, response => {
|
||||||
|
|
@ -167,7 +167,7 @@ export class MobileTags {
|
||||||
} else {
|
} else {
|
||||||
this.openNodes = this.tree.getExpandIds();
|
this.openNodes = this.tree.getExpandIds();
|
||||||
}
|
}
|
||||||
this.element.lastElementChild.classList.add("fn__none")
|
this.element.lastElementChild.classList.add("fn__none");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ export const initFramework = () => {
|
||||||
const sidebarElement = document.getElementById("sidebar");
|
const sidebarElement = document.getElementById("sidebar");
|
||||||
let outline: MobileOutline;
|
let outline: MobileOutline;
|
||||||
let backlink: MobileBacklinks;
|
let backlink: MobileBacklinks;
|
||||||
let bookmark: MobileBookmarks
|
let bookmark: MobileBookmarks;
|
||||||
let tag: MobileTags
|
let tag: MobileTags;
|
||||||
sidebarElement.querySelector(".toolbar--border").addEventListener(getEventName(), (event: Event & { target: Element }) => {
|
sidebarElement.querySelector(".toolbar--border").addEventListener(getEventName(), (event: Event & { target: Element }) => {
|
||||||
const svgElement = hasTopClosestByTag(event.target, "svg");
|
const svgElement = hasTopClosestByTag(event.target, "svg");
|
||||||
if (!svgElement || svgElement.classList.contains("toolbar__icon--active")) {
|
if (!svgElement || svgElement.classList.contains("toolbar__icon--active")) {
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ data-def-path="${item.defPath}">
|
||||||
}
|
}
|
||||||
if (target.classList.contains("b3-list-item__action") && this.click) {
|
if (target.classList.contains("b3-list-item__action") && this.click) {
|
||||||
// 移动端书签父节点删除按钮
|
// 移动端书签父节点删除按钮
|
||||||
const liElement = hasClosestByMatchTag(target, "LI")
|
const liElement = hasClosestByMatchTag(target, "LI");
|
||||||
if (liElement) {
|
if (liElement) {
|
||||||
this.click(liElement, event);
|
this.click(liElement, event);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue