feat(frontend): add theme real-time sync feature

1. 新增ThemeSync组件实现站点主题色无刷新同步
2. 给获取站点设置的接口添加no-store缓存策略确保拿到最新配置
3. 调整主题应用代码的属性设置顺序避免逻辑问题
This commit is contained in:
2026-09-15 05:04:25 +08:00
parent a7b6421840
commit 29db9ae9b5
4 changed files with 75 additions and 2 deletions

View File

@@ -236,8 +236,8 @@ export function applyAccentTheme(input: string | null): void {
if (!el) {
el = document.createElement("style");
el.id = STYLE_ELEMENT_ID;
el.setAttribute("data-accent-source", "runtime");
document.head.appendChild(el);
}
el.setAttribute("data-accent-source", "runtime");
el.textContent = css;
}