summaryrefslogtreecommitdiff
path: root/src/client/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-10-11 00:36:47 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-10-11 00:36:47 +0900
commit816493e01ffe613ba4eca1d56a71a8cbf1099bf6 (patch)
treea7b373e319cb4d158525aa5fd37764e92407458d /src/client/scripts
parentfix ui (diff)
downloadsharkey-816493e01ffe613ba4eca1d56a71a8cbf1099bf6.tar.gz
sharkey-816493e01ffe613ba4eca1d56a71a8cbf1099bf6.tar.bz2
sharkey-816493e01ffe613ba4eca1d56a71a8cbf1099bf6.zip
:art:
Diffstat (limited to 'src/client/scripts')
-rw-r--r--src/client/scripts/theme.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/scripts/theme.ts b/src/client/scripts/theme.ts
index 3fb5666a72..10842b8943 100644
--- a/src/client/scripts/theme.ts
+++ b/src/client/scripts/theme.ts
@@ -1,3 +1,4 @@
+import { globalEvents } from '@client/events';
import * as tinycolor from 'tinycolor2';
export type Theme = {
@@ -62,6 +63,9 @@ export function applyTheme(theme: Theme, persist = true) {
if (persist) {
localStorage.setItem('theme', JSON.stringify(props));
}
+
+ // 色計算など再度行えるようにクライアント全体に通知
+ globalEvents.emit('themeChanged');
}
function compile(theme: Theme): Record<string, string> {