diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-03-03 08:43:51 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-03-03 08:43:51 +0900 |
| commit | 4de75448b681b77e91e23ad0efc8bdcae7cb0853 (patch) | |
| tree | be3058bf5278d3ad8366a0793e10e69cef3b23a8 /src/client/app/theme.ts | |
| parent | Improve log view (diff) | |
| download | sharkey-4de75448b681b77e91e23ad0efc8bdcae7cb0853.tar.gz sharkey-4de75448b681b77e91e23ad0efc8bdcae7cb0853.tar.bz2 sharkey-4de75448b681b77e91e23ad0efc8bdcae7cb0853.zip | |
テーマの切り替えをなめらかに
Diffstat (limited to 'src/client/app/theme.ts')
| -rw-r--r-- | src/client/app/theme.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/app/theme.ts b/src/client/app/theme.ts index ff5a845b51..1aa1984abd 100644 --- a/src/client/app/theme.ts +++ b/src/client/app/theme.ts @@ -43,6 +43,12 @@ export const builtinThemes = [ ]; export function applyTheme(theme: Theme, persisted = true) { + document.documentElement.classList.add('change-theme'); + + setTimeout(() => { + document.documentElement.classList.remove('change-theme'); + }, 500); + // Deep copy const _theme = JSON.parse(JSON.stringify(theme)); |