From 816493e01ffe613ba4eca1d56a71a8cbf1099bf6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Oct 2021 00:36:47 +0900 Subject: :art: --- src/client/scripts/theme.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/scripts/theme.ts') 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 { -- cgit v1.2.3-freya