feat(frontend): add theme real-time sync feature
1. 新增ThemeSync组件实现站点主题色无刷新同步 2. 给获取站点设置的接口添加no-store缓存策略确保拿到最新配置 3. 调整主题应用代码的属性设置顺序避免逻辑问题
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user