mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-28 18:00:15 +01:00
This commit is contained in:
parent
3212e3511d
commit
f15b2f8666
4 changed files with 11 additions and 9 deletions
|
|
@ -4,6 +4,7 @@ import {Editor} from "../../../editor";
|
|||
/// #if MOBILE
|
||||
import {openDock} from "../../../mobile/dock/util";
|
||||
import {popMenu} from "../../../mobile/menu";
|
||||
import {popSearch} from "../../../mobile/menu/search";
|
||||
/// #else
|
||||
import {openSearch} from "../../../search/spread";
|
||||
import {goBack, goForward} from "../../../util/backForward";
|
||||
|
|
@ -14,8 +15,8 @@ import {openSetting} from "../../../config";
|
|||
import {Tab} from "../../../layout/Tab";
|
||||
/// #endif
|
||||
import {App} from "../../../index";
|
||||
import {editor} from "../../../config/editor";
|
||||
import {Constants} from "../../../constants";
|
||||
import {setReadOnly} from "../../../config/util/setReadOnly";
|
||||
|
||||
export const globalCommand = (command: string, app: App) => {
|
||||
/// #if MOBILE
|
||||
|
|
@ -35,6 +36,9 @@ export const globalCommand = (command: string, app: App) => {
|
|||
case "config":
|
||||
popMenu();
|
||||
return true;
|
||||
case "globalSearch":
|
||||
popSearch(app);
|
||||
return true;
|
||||
}
|
||||
/// #else
|
||||
switch (command) {
|
||||
|
|
@ -225,7 +229,7 @@ export const globalCommand = (command: string, app: App) => {
|
|||
openHistory(app);
|
||||
return true;
|
||||
case "editReadonly":
|
||||
editor.setReadonly(!window.siyuan.config.editor.readOnly);
|
||||
setReadOnly(!window.siyuan.config.editor.readOnly)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export const commandPanel = (app: App) => {
|
|||
let keys;
|
||||
/// #if MOBILE
|
||||
keys = ["addToDatabase", "fileTree", "outline", "bookmark", "tag", "dailyNote", "inbox", "backlinks", "config",
|
||||
"dataHistory", "editReadonly", "enter", "enterBack", "globalSearch", "goBack", "goForward"];
|
||||
"dataHistory", "editReadonly", "enter", "enterBack", "globalSearch"];
|
||||
/// #else
|
||||
keys = ["addToDatabase", "fileTree", "outline", "bookmark", "tag", "dailyNote", "inbox", "backlinks",
|
||||
"graphView", "globalGraph", "closeAll", "closeLeft", "closeOthers", "closeRight", "closeTab",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue