Vanessa 2024-05-16 17:46:15 +08:00
parent 4bf7b49beb
commit 60f6bf9a64
9 changed files with 203 additions and 139 deletions

View file

@ -23,6 +23,7 @@ import {Constants} from "../../../constants";
import {setReadOnly} from "../../../config/util/setReadOnly";
import {lockScreen} from "../../../dialog/processSystem";
import {newFile} from "../../../util/newFile";
import {openCard} from "../../../card/openCard";
export const globalCommand = (command: string, app: App) => {
/// #if MOBILE
@ -78,6 +79,7 @@ export const globalCommand = (command: string, app: App) => {
openSearch({
app,
hotkey: Constants.DIALOG_GLOBALSEARCH,
key: (getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : document.createRange()).toString()
});
return true;
case "goBack":
@ -256,6 +258,9 @@ export const globalCommand = (command: string, app: App) => {
useSavePath: true
});
return true;
case "riffCard":
openCard(app);
return true;
}
return false;