Vanessa 2023-04-21 21:58:57 +08:00
parent bec5fbc9cb
commit bb36ff79b5
12 changed files with 62 additions and 15 deletions

View file

@ -9,14 +9,15 @@ import {renderSnippet} from "../../config/util/snippets";
import {setEmpty} from "./setEmpty";
import {getIdZoomInByPath, getOpenNotebookCount} from "../../util/pathName";
import {popMenu} from "../menu";
import {MobileFiles} from "./MobileFiles";
import {MobileOutline} from "./MobileOutline";
import {MobileFiles} from "../dock/MobileFiles";
import {MobileOutline} from "../dock/MobileOutline";
import {hasTopClosestByTag} from "../../protyle/util/hasClosest";
import {MobileBacklinks} from "./MobileBacklinks";
import {MobileBookmarks} from "./MobileBookmarks";
import {MobileTags} from "./MobileTags";
import {MobileBacklinks} from "../dock/MobileBacklinks";
import {MobileBookmarks} from "../dock/MobileBookmarks";
import {MobileTags} from "../dock/MobileTags";
import {activeBlur, hideKeyboardToolbar, initKeyboardToolbar} from "./keyboardToolbar";
import {syncGuide} from "../../sync/syncGuide";
import {Inbox} from "../../layout/dock/Inbox";
export const initFramework = () => {
setInlineStyle();
@ -26,6 +27,7 @@ export const initFramework = () => {
let outline: MobileOutline;
let backlink: MobileBacklinks;
let bookmark: MobileBookmarks;
let inbox: Inbox;
let tag: MobileTags;
// 不能使用 getEventName否则点击返回会展开右侧栏
const firstToolbarElement = sidebarElement.querySelector(".toolbar--border");
@ -71,6 +73,8 @@ export const initFramework = () => {
} else {
tag.update();
}
} else if (type === "sidebar-inbox-tab" && !inbox) {
inbox = new Inbox(document.querySelector('#sidebar [data-type="sidebar-inbox"]'));
}
svgElement.classList.add("toolbar__icon--active");
sidebarElement.lastElementChild.querySelector(`[data-type="${itemType.replace("-tab", "")}"]`).classList.remove("fn__none");