summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-01-24 18:06:20 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-01-24 18:06:20 +0900
commit225544e9856cb1416ca277d68c2e68bc3912a07d (patch)
tree940086d6a6b317b37c509fff87c2f215071641b6 /src/client/app
parent外部サービス認証情報の配信 (#3975) (diff)
downloadsharkey-225544e9856cb1416ca277d68c2e68bc3912a07d.tar.gz
sharkey-225544e9856cb1416ca277d68c2e68bc3912a07d.tar.bz2
sharkey-225544e9856cb1416ca277d68c2e68bc3912a07d.zip
Reapply the theme first (#3971)
* Reapply the theme first * Cannot
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/init.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/app/init.ts b/src/client/app/init.ts
index 5b26f4866d..2f18030f0d 100644
--- a/src/client/app/init.ts
+++ b/src/client/app/init.ts
@@ -387,6 +387,18 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void,
});
//#endregion
+ // Reapply current theme
+ try {
+ const themeName = os.store.state.device.darkmode ? os.store.state.device.darkTheme : os.store.state.device.lightTheme;
+ const themes = os.store.state.device.themes.concat(builtinThemes);
+ const theme = themes.find(t => t.id == themeName);
+ if (theme) {
+ applyTheme(theme);
+ }
+ } catch (e) {
+ console.log(`Cannot reapply theme. ${e}`);
+ }
+
//#region shadow
const shadow = '0 3px 8px rgba(0, 0, 0, 0.2)';
const shadowRight = '4px 0 4px rgba(0, 0, 0, 0.1)';