diff options
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r-- | src/stores/SettingsStore.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 8c4cd47eb..df0fc77e9 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -9,7 +9,7 @@ import Request from './lib/Request'; | |||
9 | import { getLocale } from '../helpers/i18n-helpers'; | 9 | import { getLocale } from '../helpers/i18n-helpers'; |
10 | import { API } from '../environment'; | 10 | import { API } from '../environment'; |
11 | 11 | ||
12 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; | 12 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER } from '../config'; |
13 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | 13 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; |
14 | 14 | ||
15 | const debug = require('debug')('Ferdi:SettingsStore'); | 15 | const debug = require('debug')('Ferdi:SettingsStore'); |
@@ -53,6 +53,18 @@ export default class SettingsStore extends Store { | |||
53 | ); | 53 | ); |
54 | 54 | ||
55 | reaction( | 55 | reaction( |
56 | () => this.all.app.server, | ||
57 | (server) => { | ||
58 | if (server === LOCAL_SERVER) { | ||
59 | ipcRenderer.send('startLocalServer'); | ||
60 | } | ||
61 | }, | ||
62 | { | ||
63 | fireImmediately: true, | ||
64 | }, | ||
65 | ); | ||
66 | |||
67 | reaction( | ||
56 | () => this.all.app.locked, | 68 | () => this.all.app.locked, |
57 | () => { | 69 | () => { |
58 | const { router } = window.ferdi.stores; | 70 | const { router } = window.ferdi.stores; |