1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-02 00:38:31 +09:00

Reapply the theme first (#3971)

* Reapply the theme first

* Cannot
This commit is contained in:
MeiMei 2019-01-24 18:06:20 +09:00 committed by syuilo
parent e2f7e82cac
commit 225544e985

View File

@ -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)';