fix(frontend): テーマ切り替え時に一部の色が変わらない問題を修正

This commit is contained in:
syuilo
2025-03-10 10:05:50 +09:00
parent 6419af2179
commit 4df9083bf0
6 changed files with 35 additions and 15 deletions

View File

@@ -72,6 +72,9 @@ export function applyTheme(theme: Theme, persist = true) {
timeout = window.setTimeout(() => {
document.documentElement.classList.remove('_themeChanging_');
// 色計算など再度行えるようにクライアント全体に通知
globalEvents.emit('themeChanged');
}, 1000);
const colorScheme = theme.base === 'dark' ? 'dark' : 'light';
@@ -108,7 +111,7 @@ export function applyTheme(theme: Theme, persist = true) {
}
// 色計算など再度行えるようにクライアント全体に通知
globalEvents.emit('themeChanged');
globalEvents.emit('themeChanging');
}
function compile(theme: Theme): Record<string, string> {