diff options
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 | } | ||