From 157b2c7540baa5772b588539a083a587500d66de Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 24 May 2023 11:05:56 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8341 2 --- app/src/index.ts | 4 ++-- app/src/mobile/index.ts | 4 ++-- app/src/window/index.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/index.ts b/app/src/index.ts index 79c0ffe15..9d0f540e8 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -41,7 +41,6 @@ export class App { addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); addBaseURL(); - loadPlugins(this); window.siyuan = { transactions: [], reqIds: {}, @@ -148,7 +147,7 @@ export class App { }), }; - fetchPost("/api/system/getConf", {}, response => { + fetchPost("/api/system/getConf", {}, async (response) => { window.siyuan.config = response.data.conf; // 历史数据兼容,202306后可删除 if (window.siyuan.config.uiLayout.left && !window.siyuan.config.uiLayout.left.data) { @@ -165,6 +164,7 @@ export class App { data: response.data.conf.uiLayout.bottom }; } + await loadPlugins(this); getLocalStorage(() => { fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages) => { window.siyuan.languages = lauguages; diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts index db4e5b4f2..9be25bf8b 100644 --- a/app/src/mobile/index.ts +++ b/app/src/mobile/index.ts @@ -34,7 +34,6 @@ class App { addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); addBaseURL(); - loadPlugins(this); window.siyuan = { notebooks: [], transactions: [], @@ -61,9 +60,10 @@ class App { window.siyuan.menus.menu.remove(); } }); - fetchPost("/api/system/getConf", {}, confResponse => { + fetchPost("/api/system/getConf", {}, async (confResponse) => { confResponse.data.conf.keymap = Constants.SIYUAN_KEYMAP; window.siyuan.config = confResponse.data.conf; + await loadPlugins(this); getLocalStorage(() => { fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages) => { window.siyuan.languages = lauguages; diff --git a/app/src/window/index.ts b/app/src/window/index.ts index b2123ece1..79216a103 100644 --- a/app/src/window/index.ts +++ b/app/src/window/index.ts @@ -30,7 +30,6 @@ class App { addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`, "protyleLuteScript"); addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript"); addBaseURL(); - loadPlugins(this); window.siyuan = { transactions: [], reqIds: {}, @@ -128,8 +127,9 @@ class App { } }), }; - fetchPost("/api/system/getConf", {}, response => { + fetchPost("/api/system/getConf", {}, async (response) => { window.siyuan.config = response.data.conf; + await loadPlugins(this); getLocalStorage(() => { fetchGet(`/appearance/langs/${window.siyuan.config.appearance.lang}.json?v=${Constants.SIYUAN_VERSION}`, (lauguages) => { window.siyuan.languages = lauguages;