From 40d80e0294175c45d5143f064a0964b8112e77a0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 29 Apr 2024 11:51:35 +0800 Subject: [PATCH] :recycle: https://github.com/siyuan-note/siyuan/issues/11133 --- .../{plugin => boot/globalEvent}/commandPanel.ts | 14 +++++++------- app/src/boot/globalEvent/keydown.ts | 2 +- app/src/layout/topBar.ts | 2 +- app/src/mobile/menu/index.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) rename app/src/{plugin => boot/globalEvent}/commandPanel.ts (93%) diff --git a/app/src/plugin/commandPanel.ts b/app/src/boot/globalEvent/commandPanel.ts similarity index 93% rename from app/src/plugin/commandPanel.ts rename to app/src/boot/globalEvent/commandPanel.ts index d15cefea1..ee72e51a1 100644 --- a/app/src/plugin/commandPanel.ts +++ b/app/src/boot/globalEvent/commandPanel.ts @@ -1,12 +1,12 @@ -import {Dialog} from "../dialog"; -import {App} from "../index"; -import {upDownHint} from "../util/upDownHint"; +import {Dialog} from "../../dialog"; +import {App} from "../../index"; +import {upDownHint} from "../../util/upDownHint"; /// #if !MOBILE -import {openSetting} from "../config"; +import {openSetting} from "../../config"; /// #endif -import {updateHotkeyTip} from "../protyle/util/compatibility"; -import {isMobile} from "../util/functions"; -import {Constants} from "../constants"; +import {updateHotkeyTip} from "../../protyle/util/compatibility"; +import {isMobile} from "../../util/functions"; +import {Constants} from "../../constants"; export const commandPanel = (app: App) => { const dialog = new Dialog({ diff --git a/app/src/boot/globalEvent/keydown.ts b/app/src/boot/globalEvent/keydown.ts index 9ec8c6860..e3c22b3d4 100644 --- a/app/src/boot/globalEvent/keydown.ts +++ b/app/src/boot/globalEvent/keydown.ts @@ -59,7 +59,6 @@ import {reloadProtyle} from "../../protyle/util/reload"; import {fullscreen, updateReadonly} from "../../protyle/breadcrumb/action"; import {openRecentDocs} from "../../business/openRecentDocs"; import {App} from "../../index"; -import {commandPanel} from "../../plugin/commandPanel"; import {openBacklink, openGraph, openOutline, toggleDockBar} from "../../layout/dock/util"; import {workspaceMenu} from "../../menus/workspace"; import {resize} from "../../protyle/util/resize"; @@ -76,6 +75,7 @@ import {zoomOut} from "../../menus/protyle"; import {openSearchAV} from "../../protyle/render/av/relation"; import * as dayjs from "dayjs"; import {getPlainText} from "../../protyle/util/paste"; +import {commandPanel} from "./commandPanel"; const switchDialogEvent = (app: App, event: MouseEvent) => { event.preventDefault(); diff --git a/app/src/layout/topBar.ts b/app/src/layout/topBar.ts index 1861c493c..a07dc26fb 100644 --- a/app/src/layout/topBar.ts +++ b/app/src/layout/topBar.ts @@ -18,8 +18,8 @@ import {Menu} from "../plugin/Menu"; import {fetchPost} from "../util/fetch"; import {needSubscribe} from "../util/needSubscribe"; import * as dayjs from "dayjs"; -import {commandPanel} from "../plugin/commandPanel"; import {exportLayout} from "./util"; +import {commandPanel} from "../boot/globalEvent/commandPanel"; export const initBar = (app: App) => { const toolbarElement = document.getElementById("toolbar"); diff --git a/app/src/mobile/menu/index.ts b/app/src/mobile/menu/index.ts index 73b324626..9f3649443 100644 --- a/app/src/mobile/menu/index.ts +++ b/app/src/mobile/menu/index.ts @@ -20,7 +20,7 @@ import {isHuawei, isInAndroid, isInIOS} from "../../protyle/util/compatibility"; import {newFile} from "../../util/newFile"; import {afterLoadPlugin} from "../../plugin/loader"; import {Menu} from "../../plugin/Menu"; -import {commandPanel} from "../../plugin/commandPanel"; +import {commandPanel} from "../../boot/globalEvent/commandPanel"; export const popMenu = () => { activeBlur();