Vanessa 2025-06-29 23:07:26 +08:00
parent 681bae81c5
commit aa1e2b4957
5 changed files with 10 additions and 6 deletions

View file

@ -68,7 +68,7 @@ export const onGetConfig = (isStart: boolean, app: App) => {
initBar(app); initBar(app);
initStatus(); initStatus();
initWindow(app); initWindow(app);
appearance.onSetappearance(window.siyuan.config.appearance); appearance.onSetAppearance(window.siyuan.config.appearance);
initAssets(); initAssets();
setInlineStyle(); setInlineStyle();
renderSnippet(); renderSnippet();

View file

@ -213,7 +213,7 @@ export const appearance = {
} }
} }
} }
appearance.onSetappearance(response.data); appearance.onSetAppearance(response.data);
if (response.data.hideStatusBar) { if (response.data.hideStatusBar) {
document.getElementById("status").classList.add("fn__none"); document.getElementById("status").classList.add("fn__none");
} else { } else {
@ -253,7 +253,7 @@ export const appearance = {
}); });
}); });
}, },
onSetappearance(data: Config.IAppearance) { onSetAppearance(data: Config.IAppearance) {
if (data.lang !== window.siyuan.config.appearance.lang) { if (data.lang !== window.siyuan.config.appearance.lang) {
exportLayout({ exportLayout({
cb() { cb() {

View file

@ -756,6 +756,10 @@ export const bazaar = {
}, async response => { }, async response => {
this._genMyHTML(bazaarType, app); this._genMyHTML(bazaarType, app);
bazaar._onBazaar(response, bazaarType, ["icons"].includes(bazaarType)); 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/4966
// https://github.com/siyuan-note/siyuan/issues/5411 // https://github.com/siyuan-note/siyuan/issues/5411
if (bazaarType === "themes" && ( if (bazaarType === "themes" && (
@ -1201,7 +1205,7 @@ export const bazaar = {
} }
element.innerHTML = `<div class="b3-cards">${html}</div>`; element.innerHTML = `<div class="b3-cards">${html}</div>`;
if (reload) { if (reload) {
appearance.onSetappearance(response.data.appearance); appearance.onSetAppearance(response.data.appearance);
} }
} }
}; };

View file

@ -360,7 +360,7 @@ export const setMode = (modeElementValue: number) => {
} }
} }
} }
appearance.onSetappearance(response.data); appearance.onSetAppearance(response.data);
}); });
/// #endif /// #endif
}; };

View file

@ -51,7 +51,7 @@ export const init = (app: App) => {
}); });
initStatus(true); initStatus(true);
initWindow(app); initWindow(app);
appearance.onSetappearance(window.siyuan.config.appearance); appearance.onSetAppearance(window.siyuan.config.appearance);
initAssets(); initAssets();
setInlineStyle(); setInlineStyle();
renderSnippet(); renderSnippet();