diff options
author | vantezzen <hello@vantezzen.io> | 2019-09-20 12:34:56 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-09-20 12:34:56 +0200 |
commit | 1d41b849cb7840a1611d34f20bfe636fc8b903dc (patch) | |
tree | 85d2fe39d8d805008d1ba1c2f458b0cda9224bea /src/features/quickSwitch/index.js | |
parent | Fix Todos menu (diff) | |
download | ferdium-app-1d41b849cb7840a1611d34f20bfe636fc8b903dc.tar.gz ferdium-app-1d41b849cb7840a1611d34f20bfe636fc8b903dc.tar.zst ferdium-app-1d41b849cb7840a1611d34f20bfe636fc8b903dc.zip |
Implement Quick Switch feature
Diffstat (limited to 'src/features/quickSwitch/index.js')
-rw-r--r-- | src/features/quickSwitch/index.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/features/quickSwitch/index.js b/src/features/quickSwitch/index.js new file mode 100644 index 000000000..c57fad366 --- /dev/null +++ b/src/features/quickSwitch/index.js | |||
@@ -0,0 +1,24 @@ | |||
1 | import { observable } from 'mobx'; | ||
2 | |||
3 | export { default as Component } from './Component'; | ||
4 | |||
5 | const debug = require('debug')('Ferdi:feature:quickSwitch'); | ||
6 | |||
7 | const defaultState = { | ||
8 | isModalVisible: false, | ||
9 | }; | ||
10 | |||
11 | export const state = observable(defaultState); | ||
12 | |||
13 | export default function initialize() { | ||
14 | debug('Initialize quickSwitch feature'); | ||
15 | |||
16 | function showModal() { | ||
17 | state.isModalVisible = true; | ||
18 | } | ||
19 | |||
20 | window.ferdi.features.quickSwitch = { | ||
21 | state, | ||
22 | showModal, | ||
23 | }; | ||
24 | } | ||