aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/SettingsStore.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-10-18 20:53:41 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2019-10-18 20:53:41 +0200
commitaf506f40edb1c9c339cc86baf40baccf2dc6da62 (patch)
treed5efae2f9374ee11d645096208424d59812a9a58 /src/stores/SettingsStore.js
parentMerge branch 'develop' into local-server (diff)
downloadferdium-app-af506f40edb1c9c339cc86baf40baccf2dc6da62.tar.gz
ferdium-app-af506f40edb1c9c339cc86baf40baccf2dc6da62.tar.zst
ferdium-app-af506f40edb1c9c339cc86baf40baccf2dc6da62.zip
Develop local server feature
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r--src/stores/SettingsStore.js14
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';
9import { getLocale } from '../helpers/i18n-helpers'; 9import { getLocale } from '../helpers/i18n-helpers';
10import { API } from '../environment'; 10import { API } from '../environment';
11 11
12import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; 12import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER } from '../config';
13import { SPELLCHECKER_LOCALES } from '../i18n/languages'; 13import { SPELLCHECKER_LOCALES } from '../i18n/languages';
14 14
15const debug = require('debug')('Ferdi:SettingsStore'); 15const 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;