mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
f46e0d48ad
commit
b8f56f4a1d
7 changed files with 20 additions and 20 deletions
|
|
@ -29,6 +29,7 @@ import {App} from "../index";
|
|||
import {initWindowEvent} from "./globalEvent/event";
|
||||
import {sendGlobalShortcut} from "./globalEvent/keydown";
|
||||
import {closeWindow} from "../window/closeWin";
|
||||
import {loadPlugins} from "../plugin/loader";
|
||||
|
||||
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {
|
||||
if (key1 === "general") {
|
||||
|
|
@ -87,7 +88,7 @@ const hasKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "edito
|
|||
return match;
|
||||
};
|
||||
|
||||
export const onGetConfig = (isStart: boolean, app: App) => {
|
||||
export const onGetConfig = async (isStart: boolean, app: App) => {
|
||||
const matchKeymap1 = matchKeymap(Constants.SIYUAN_KEYMAP.general, "general");
|
||||
const matchKeymap2 = matchKeymap(Constants.SIYUAN_KEYMAP.editor.general, "editor", "general");
|
||||
const matchKeymap3 = matchKeymap(Constants.SIYUAN_KEYMAP.editor.insert, "editor", "insert");
|
||||
|
|
@ -140,8 +141,9 @@ export const onGetConfig = (isStart: boolean, app: App) => {
|
|||
initWindow(app);
|
||||
appearance.onSetappearance(window.siyuan.config.appearance);
|
||||
initAssets();
|
||||
renderSnippet();
|
||||
setInlineStyle();
|
||||
await loadPlugins(app);
|
||||
renderSnippet();
|
||||
let resizeTimeout = 0;
|
||||
window.addEventListener("resize", () => {
|
||||
window.clearTimeout(resizeTimeout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue