From 251a1cfcd40a455ac69adab57202b8ed2d8ba832 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 26 Jun 2022 16:02:49 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/3952 --- app/src/layout/util.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index 96c380594..6589a556e 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -25,39 +25,6 @@ import {getContenteditableElement} from "../protyle/wysiwyg/getBlock"; import {updatePanelByEditor} from "../editor/util"; import {Constants} from "../constants"; import {openSearch} from "../search/spread"; -import {Dialog} from "../dialog"; -import {isMobile} from "../util/functions"; - -export const openCloseRecentTab = () => { - const recentClose = JSON.parse(localStorage.getItem(Constants.LOCAL_RECENTCLOSE) || "[]"); - let html = '' - if (recentClose.length === 0) { - html += `
  • ${window.siyuan.languages.emptyContent}
  • ` - } else { - recentClose.forEach((item: IObject) => { - html += `
  • ${item.text}
  • ` - }) - } - const dialog = new Dialog({ - title: window.siyuan.languages.recentClose, - content: `
    - -
    -
    `, - width: isMobile() ? "80vw" : "50vw", - }); - dialog.element.addEventListener("click", (event) => { - let target = event.target as HTMLElement - while (!target.isSameNode(dialog.element)) { - const instance = target.getAttribute("data-instance") - if (instance) { - - break; - } - target = target.parentElement - } - }) -} export const setPanelFocus = (element: Element) => { if (element.classList.contains("block__icons--active") || element.classList.contains("layout__wnd--active")) {