aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/SettingsStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-11-30 14:32:45 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-11-30 14:32:45 +0100
commit3d87c0e45cead95ddb6c11fc6540b82e375bdcf5 (patch)
treec91f425a39cb585242d6df5b4070de4a2141b3b4 /src/stores/SettingsStore.js
parentMerge branch 'update/monetization' into develop (diff)
downloadferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.tar.gz
ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.tar.zst
ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.zip
feat(App): Improved spell checker & context menu
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r--src/stores/SettingsStore.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js
index b62ac15e0..4a42ed924 100644
--- a/src/stores/SettingsStore.js
+++ b/src/stores/SettingsStore.js
@@ -5,8 +5,10 @@ import localStorage from 'mobx-localstorage';
5import Store from './lib/Store'; 5import Store from './lib/Store';
6import Request from './lib/Request'; 6import Request from './lib/Request';
7import CachedRequest from './lib/CachedRequest'; 7import CachedRequest from './lib/CachedRequest';
8import { getLocale } from '../helpers/i18n-helpers';
8 9
9import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; 10import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config';
11import { SPELLCHECKER_LOCALES } from '../i18n/languages';
10 12
11const { systemPreferences } = remote; 13const { systemPreferences } = remote;
12const debug = require('debug')('Franz:SettingsStore'); 14const debug = require('debug')('Franz:SettingsStore');
@@ -41,7 +43,6 @@ export default class SettingsStore extends Store {
41 }); 43 });
42 44
43 this.fileSystemSettingsTypes.forEach((type) => { 45 this.fileSystemSettingsTypes.forEach((type) => {
44 console.log(type);
45 ipcRenderer.send('getAppSettings', type); 46 ipcRenderer.send('getAppSettings', type);
46 }); 47 });
47 } 48 }
@@ -157,10 +158,18 @@ export default class SettingsStore extends Store {
157 158
158 // Enable dark mode once 159 // Enable dark mode once
159 if (!this.all.migration['5.0.0-beta.19-settings']) { 160 if (!this.all.migration['5.0.0-beta.19-settings']) {
161 const spellcheckerLanguage = getLocale({
162 locale: this.stores.settings.app.locale,
163 locales: SPELLCHECKER_LOCALES,
164 defaultLocale: DEFAULT_APP_SETTINGS.spellcheckerLanguage,
165 fallbackLocale: DEFAULT_APP_SETTINGS.spellcheckerLanguage,
166 });
167
160 this.actions.settings.update({ 168 this.actions.settings.update({
161 type: 'app', 169 type: 'app',
162 data: { 170 data: {
163 darkMode: systemPreferences.isDarkMode(), 171 darkMode: systemPreferences.isDarkMode(),
172 spellcheckerLanguage,
164 }, 173 },
165 }); 174 });
166 175