diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts index 423566a45..decd7a88e 100644 --- a/app/src/boot/onGetConfig.ts +++ b/app/src/boot/onGetConfig.ts @@ -68,7 +68,7 @@ export const onGetConfig = (isStart: boolean, app: App) => { initBar(app); initStatus(); initWindow(app); - appearance.onSetappearance(window.siyuan.config.appearance); + appearance.onSetAppearance(window.siyuan.config.appearance); initAssets(); setInlineStyle(); renderSnippet(); diff --git a/app/src/config/appearance.ts b/app/src/config/appearance.ts index 9054351e8..f36839239 100644 --- a/app/src/config/appearance.ts +++ b/app/src/config/appearance.ts @@ -213,7 +213,7 @@ export const appearance = { } } } - appearance.onSetappearance(response.data); + appearance.onSetAppearance(response.data); if (response.data.hideStatusBar) { document.getElementById("status").classList.add("fn__none"); } else { @@ -253,7 +253,7 @@ export const appearance = { }); }); }, - onSetappearance(data: Config.IAppearance) { + onSetAppearance(data: Config.IAppearance) { if (data.lang !== window.siyuan.config.appearance.lang) { exportLayout({ cb() { diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts index 2edc35ba7..8d87a166c 100644 --- a/app/src/config/bazaar.ts +++ b/app/src/config/bazaar.ts @@ -756,6 +756,10 @@ export const bazaar = { }, async response => { this._genMyHTML(bazaarType, app); bazaar._onBazaar(response, bazaarType, ["icons"].includes(bazaarType)); + // https://github.com/siyuan-note/siyuan/issues/15177 + if (bazaarType === "themes" && response.data.appearance?.themeVer) { + window.siyuan.config.appearance.themeVer = response.data.appearance.themeVer; + } // 更新主题后不需要对该主题进行切换 https://github.com/siyuan-note/siyuan/issues/4966 // https://github.com/siyuan-note/siyuan/issues/5411 if (bazaarType === "themes" && ( @@ -1201,7 +1205,7 @@ export const bazaar = { } element.innerHTML = `
${html}
`; if (reload) { - appearance.onSetappearance(response.data.appearance); + appearance.onSetAppearance(response.data.appearance); } } }; diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts index ac14c859b..26b91f315 100644 --- a/app/src/util/assets.ts +++ b/app/src/util/assets.ts @@ -360,7 +360,7 @@ export const setMode = (modeElementValue: number) => { } } } - appearance.onSetappearance(response.data); + appearance.onSetAppearance(response.data); }); /// #endif }; diff --git a/app/src/window/init.ts b/app/src/window/init.ts index 6fc84be6e..442a24b7d 100644 --- a/app/src/window/init.ts +++ b/app/src/window/init.ts @@ -51,7 +51,7 @@ export const init = (app: App) => { }); initStatus(true); initWindow(app); - appearance.onSetappearance(window.siyuan.config.appearance); + appearance.onSetAppearance(window.siyuan.config.appearance); initAssets(); setInlineStyle(); renderSnippet();