This commit is contained in:
Vanessa 2023-10-30 00:12:24 +08:00
parent c7cba8a831
commit fbe0f4f303
9 changed files with 34 additions and 26 deletions

View file

@ -25,6 +25,7 @@ import {getAllTabs} from "./layout/getAll";
import {getLocalStorage} from "./protyle/util/compatibility";
import {getSearch} from "./util/functions";
import {hideAllElements} from "./protyle/ui/hideElements";
import {loadPlugins} from "./plugin/loader";
import "./assets/scss/base.scss";
export class App {
@ -39,7 +40,7 @@ export class App {
addScript(`${Constants.PROTYLE_CDN}/js/protyle-html.js?v=${Constants.SIYUAN_VERSION}`, "protyleWcHtmlScript");
addBaseURL();
this.appId =Constants.SIYUAN_APPID;
this.appId = Constants.SIYUAN_APPID;
window.siyuan = {
zIndex: 10,
transactions: [],
@ -146,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) {
@ -163,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;