diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/UIStore.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stores/UIStore.js b/src/stores/UIStore.js index bee6c8bcf..d37ebe4c7 100644 --- a/src/stores/UIStore.js +++ b/src/stores/UIStore.js | |||
@@ -1,6 +1,8 @@ | |||
1 | import { action, observable, computed } from 'mobx'; | 1 | import { action, observable, computed } from 'mobx'; |
2 | 2 | ||
3 | import Store from './lib/Store'; | 3 | import Store from './lib/Store'; |
4 | import * as themeDefault from '../theme/default'; | ||
5 | import * as themeDark from '../theme/dark'; | ||
4 | 6 | ||
5 | export default class UIStore extends Store { | 7 | export default class UIStore extends Store { |
6 | @observable showServicesUpdatedInfoBar = false; | 8 | @observable showServicesUpdatedInfoBar = false; |
@@ -20,6 +22,14 @@ export default class UIStore extends Store { | |||
20 | return (settings.app.isAppMuted && settings.app.showMessageBadgeWhenMuted) || !settings.isAppMuted; | 22 | return (settings.app.isAppMuted && settings.app.showMessageBadgeWhenMuted) || !settings.isAppMuted; |
21 | } | 23 | } |
22 | 24 | ||
25 | @computed get theme() { | ||
26 | if (this.stores.settings.all.app.darkMode) { | ||
27 | return Object.assign({}, themeDefault, themeDark); | ||
28 | } | ||
29 | |||
30 | return themeDefault; | ||
31 | } | ||
32 | |||
23 | // Actions | 33 | // Actions |
24 | @action _openSettings({ path = '/settings' }) { | 34 | @action _openSettings({ path = '/settings' }) { |
25 | const settingsPath = path !== '/settings' ? `/settings/${path}` : path; | 35 | const settingsPath = path !== '/settings' ? `/settings/${path}` : path; |