summaryrefslogtreecommitdiff
path: root/packages/frontend/src/theme.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-03-10 10:05:50 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-03-10 10:05:50 +0900
commit4df9083bf04b72f59b9cb09334c89412e8cb296c (patch)
treeb9f4de12587e97d1d6080e672af37eae4d04d99e /packages/frontend/src/theme.ts
parentfix(frontend, dev): storybookのビルドエラー修正のため、as構文... (diff)
downloadmisskey-4df9083bf04b72f59b9cb09334c89412e8cb296c.tar.gz
misskey-4df9083bf04b72f59b9cb09334c89412e8cb296c.tar.bz2
misskey-4df9083bf04b72f59b9cb09334c89412e8cb296c.zip
fix(frontend): テーマ切り替え時に一部の色が変わらない問題を修正
Diffstat (limited to 'packages/frontend/src/theme.ts')
-rw-r--r--packages/frontend/src/theme.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/frontend/src/theme.ts b/packages/frontend/src/theme.ts
index 0f44d777f9..ed2f1d3164 100644
--- a/packages/frontend/src/theme.ts
+++ b/packages/frontend/src/theme.ts
@@ -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> {