Vanessa 2023-05-24 11:05:56 +08:00
parent 2efa085bde
commit 157b2c7540
3 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;