diff --git a/app/src/config/about.ts b/app/src/config/about.ts index a22c64b56..4fe0f821d 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -190,8 +190,13 @@ export const about = { const searchData = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEDATA) || "{}"); if (searchData.hPath) { searchData.hPath = ""; + searchData.idPath = ""; localStorage.setItem(Constants.LOCAL_SEARCHEDATA, JSON.stringify(searchData)); } + localStorage.removeItem(Constants.LOCAL_DAILYNOTEID); + localStorage.removeItem(Constants.LOCAL_DOCINFO); + localStorage.removeItem(Constants.LOCAL_HISTORYNOTEID); + localStorage.removeItem("pdfjs.history"); exportLayout(false, () => { exitSiYuan(); }); diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts index 087f47b1e..14daf4d0e 100644 --- a/app/src/config/keymap.ts +++ b/app/src/config/keymap.ts @@ -268,7 +268,7 @@ export const keymap = { } if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) || - ["⌘S", "⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⌘↑", "⌘↓", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "F9"].includes(keymapStr)) { + ["⌘S", "⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⌘↑", "⌘↓", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⌘⇥", "⌃⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "F9"].includes(keymapStr)) { showMessage(tip + "] " + window.siyuan.languages.invalid); return; } diff --git a/app/src/constants.ts b/app/src/constants.ts index c64a295a3..7b15d93c4 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -82,7 +82,7 @@ export abstract class Constants { }; // "⌘", "⇧", "⌥", "⌃" - // "⌘S", "⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⌘↑", "⌘↓", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "F9" 不可自定义 + // "⌘S", "⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⌘↑", "⌘↓", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⌘⇥", "⌃⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "F9" 不可自定义 public static readonly SIYUAN_KEYMAP: IKeymap = { general: { enterBack: {default: "⌥←", custom: "⌥←"}, diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index 15cd75ff2..96c380594 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -25,6 +25,39 @@ 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 += `