🎨
This commit is contained in:
parent
a0c9fd75d7
commit
816493e01f
4 changed files with 21 additions and 4 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue