diff options
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 3 | ||||
-rw-r--r-- | src/config.ts | 58 | ||||
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 3 | ||||
-rw-r--r-- | src/environment.ts | 67 | ||||
-rw-r--r-- | src/features/appearance/index.ts | 3 | ||||
-rw-r--r-- | src/index.js | 3 | ||||
-rw-r--r-- | src/internal-server/app/Controllers/Http/UserController.js | 2 | ||||
-rw-r--r-- | src/stores/AppStore.js | 3 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 3 | ||||
-rw-r--r-- | src/webview/recipe.js | 2 |
10 files changed, 69 insertions, 78 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 819d0a9e6..123ab4c2d 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -12,9 +12,8 @@ import ToggleRaw from '../../ui/ToggleRaw'; | |||
12 | import Select from '../../ui/Select'; | 12 | import Select from '../../ui/Select'; |
13 | import Input from '../../ui/Input'; | 13 | import Input from '../../ui/Input'; |
14 | 14 | ||
15 | import { FRANZ_TRANSLATION, GITHUB_FRANZ_URL } from '../../../config'; | 15 | import { DEFAULT_APP_SETTINGS, FRANZ_TRANSLATION, GITHUB_FRANZ_URL } from '../../../config'; |
16 | import { | 16 | import { |
17 | DEFAULT_APP_SETTINGS, | ||
18 | isMac, | 17 | isMac, |
19 | isWindows, | 18 | isWindows, |
20 | lockFerdiShortcutKey, | 19 | lockFerdiShortcutKey, |
diff --git a/src/config.ts b/src/config.ts index 667b0a962..fe9145021 100644 --- a/src/config.ts +++ b/src/config.ts | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | import ms from 'ms'; | 3 | import ms from 'ms'; |
4 | 4 | ||
5 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; | ||
6 | |||
5 | export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks | 7 | export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks |
6 | 8 | ||
7 | export const LOCAL_HOSTNAME = 'localhost'; | 9 | export const LOCAL_HOSTNAME = 'localhost'; |
@@ -176,3 +178,59 @@ export const TODOS_PARTITION_ID = 'persist:todos'; | |||
176 | export const CUSTOM_WEBSITE_RECIPE_ID = 'franz-custom-website'; | 178 | export const CUSTOM_WEBSITE_RECIPE_ID = 'franz-custom-website'; |
177 | 179 | ||
178 | export const DEFAULT_SERVICE_ORDER = 99; // something high enough that it gets added to the end of the already-added services on the left sidebar | 180 | export const DEFAULT_SERVICE_ORDER = 99; // something high enough that it gets added to the end of the already-added services on the left sidebar |
181 | |||
182 | export const DEFAULT_APP_SETTINGS = { | ||
183 | autoLaunchInBackground: false, | ||
184 | runInBackground: true, | ||
185 | reloadAfterResume: true, | ||
186 | enableSystemTray: true, | ||
187 | startMinimized: false, | ||
188 | confirmOnQuit: false, | ||
189 | minimizeToSystemTray: false, | ||
190 | closeToSystemTray: false, | ||
191 | privateNotifications: false, | ||
192 | clipboardNotifications: true, | ||
193 | notifyTaskBarOnMessage: false, | ||
194 | showDisabledServices: true, | ||
195 | showMessageBadgeWhenMuted: true, | ||
196 | showDragArea: false, | ||
197 | enableSpellchecking: true, | ||
198 | spellcheckerLanguage: 'en-us', | ||
199 | darkMode: false, | ||
200 | splitMode: false, | ||
201 | locale: '', | ||
202 | fallbackLocale: 'en-US', | ||
203 | beta: false, | ||
204 | isAppMuted: false, | ||
205 | enableGPUAcceleration: true, | ||
206 | |||
207 | // Ferdi specific options | ||
208 | server: LIVE_FERDI_API, | ||
209 | predefinedTodoServer: DEFAULT_TODO_SERVICE, | ||
210 | autohideMenuBar: false, | ||
211 | lockingFeatureEnabled: false, | ||
212 | locked: false, | ||
213 | lockedPassword: '', | ||
214 | useTouchIdToUnlock: true, | ||
215 | scheduledDNDEnabled: false, | ||
216 | scheduledDNDStart: '17:00', | ||
217 | scheduledDNDEnd: '09:00', | ||
218 | hibernateOnStartup: true, | ||
219 | hibernationStrategy: '300', // seconds | ||
220 | wakeUpStrategy: '300', // seconds | ||
221 | inactivityLock: 0, | ||
222 | automaticUpdates: true, | ||
223 | universalDarkMode: true, | ||
224 | userAgentPref: '', | ||
225 | adaptableDarkMode: true, | ||
226 | accentColor: DEFAULT_ACCENT_COLOR, | ||
227 | serviceRibbonWidth: 68, | ||
228 | iconSize: iconSizeBias, | ||
229 | sentry: false, | ||
230 | nightly: false, | ||
231 | navigationBarBehaviour: 'custom', | ||
232 | searchEngine: SEARCH_ENGINE_DDG, | ||
233 | useVerticalStyle: false, | ||
234 | alwaysShowWorkspaces: false, | ||
235 | liftSingleInstanceLock: false, | ||
236 | }; | ||
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 36b9e949b..1b05644f9 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -10,6 +10,7 @@ import TodosStore from '../../features/todos/store'; | |||
10 | import Form from '../../lib/Form'; | 10 | import Form from '../../lib/Form'; |
11 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 11 | import { APP_LOCALES, SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
12 | import { | 12 | import { |
13 | DEFAULT_APP_SETTINGS, | ||
13 | HIBERNATION_STRATEGIES, | 14 | HIBERNATION_STRATEGIES, |
14 | SIDEBAR_WIDTH, | 15 | SIDEBAR_WIDTH, |
15 | ICON_SIZES, | 16 | ICON_SIZES, |
@@ -20,7 +21,7 @@ import { | |||
20 | DEFAULT_IS_FEATURE_ENABLED_BY_USER, | 21 | DEFAULT_IS_FEATURE_ENABLED_BY_USER, |
21 | WAKE_UP_STRATEGIES, | 22 | WAKE_UP_STRATEGIES, |
22 | } from '../../config'; | 23 | } from '../../config'; |
23 | import { DEFAULT_APP_SETTINGS, isMac } from '../../environment'; | 24 | import { isMac } from '../../environment'; |
24 | 25 | ||
25 | import { getSelectOptions } from '../../helpers/i18n-helpers'; | 26 | import { getSelectOptions } from '../../helpers/i18n-helpers'; |
26 | import { hash } from '../../helpers/password-helpers'; | 27 | import { hash } from '../../helpers/password-helpers'; |
diff --git a/src/environment.ts b/src/environment.ts index 99002367f..ce2a77e7a 100644 --- a/src/environment.ts +++ b/src/environment.ts | |||
@@ -1,13 +1,6 @@ | |||
1 | import os from 'os'; | 1 | // Note: This file has now become devoid of all references to values deduced from the remote process - all those now live in the `environment-remote.js` file |
2 | |||
3 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; | ||
4 | 2 | ||
5 | import { | 3 | import os from 'os'; |
6 | LIVE_FERDI_API, | ||
7 | DEFAULT_TODO_SERVICE, | ||
8 | SEARCH_ENGINE_DDG, | ||
9 | iconSizeBias, | ||
10 | } from './config'; | ||
11 | 4 | ||
12 | export const isMac = process.platform === 'darwin'; | 5 | export const isMac = process.platform === 'darwin'; |
13 | export const isWindows = process.platform === 'win32'; | 6 | export const isWindows = process.platform === 'win32'; |
@@ -47,59 +40,3 @@ export const addNewServiceShortcutKey = (isAccelerator = true) => | |||
47 | `${cmdOrCtrlShortcutKey(isAccelerator)}+N`; | 40 | `${cmdOrCtrlShortcutKey(isAccelerator)}+N`; |
48 | export const settingsShortcutKey = (isAccelerator = true) => | 41 | export const settingsShortcutKey = (isAccelerator = true) => |
49 | `${cmdOrCtrlShortcutKey(isAccelerator)}+${isMac ? ',' : 'P'}`; | 42 | `${cmdOrCtrlShortcutKey(isAccelerator)}+${isMac ? ',' : 'P'}`; |
50 | |||
51 | export const DEFAULT_APP_SETTINGS = { | ||
52 | autoLaunchInBackground: false, | ||
53 | runInBackground: true, | ||
54 | reloadAfterResume: true, | ||
55 | enableSystemTray: true, | ||
56 | startMinimized: false, | ||
57 | confirmOnQuit: false, | ||
58 | minimizeToSystemTray: false, | ||
59 | closeToSystemTray: false, | ||
60 | privateNotifications: false, | ||
61 | clipboardNotifications: true, | ||
62 | notifyTaskBarOnMessage: false, | ||
63 | showDisabledServices: true, | ||
64 | showMessageBadgeWhenMuted: true, | ||
65 | showDragArea: false, | ||
66 | enableSpellchecking: true, | ||
67 | spellcheckerLanguage: 'en-us', | ||
68 | darkMode: false, | ||
69 | splitMode: false, | ||
70 | locale: '', | ||
71 | fallbackLocale: 'en-US', | ||
72 | beta: false, | ||
73 | isAppMuted: false, | ||
74 | enableGPUAcceleration: true, | ||
75 | |||
76 | // Ferdi specific options | ||
77 | server: LIVE_FERDI_API, | ||
78 | predefinedTodoServer: DEFAULT_TODO_SERVICE, | ||
79 | autohideMenuBar: false, | ||
80 | lockingFeatureEnabled: false, | ||
81 | locked: false, | ||
82 | lockedPassword: '', | ||
83 | useTouchIdToUnlock: true, | ||
84 | scheduledDNDEnabled: false, | ||
85 | scheduledDNDStart: '17:00', | ||
86 | scheduledDNDEnd: '09:00', | ||
87 | hibernateOnStartup: true, | ||
88 | hibernationStrategy: '300', // seconds | ||
89 | wakeUpStrategy: '300', // seconds | ||
90 | inactivityLock: 0, | ||
91 | automaticUpdates: true, | ||
92 | universalDarkMode: true, | ||
93 | userAgentPref: '', | ||
94 | adaptableDarkMode: true, | ||
95 | accentColor: DEFAULT_ACCENT_COLOR, | ||
96 | serviceRibbonWidth: 68, | ||
97 | iconSize: iconSizeBias, | ||
98 | sentry: false, | ||
99 | nightly: false, | ||
100 | navigationBarBehaviour: 'custom', | ||
101 | searchEngine: SEARCH_ENGINE_DDG, | ||
102 | useVerticalStyle: false, | ||
103 | alwaysShowWorkspaces: false, | ||
104 | liftSingleInstanceLock: false, | ||
105 | }; | ||
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts index cb2f937eb..bb93507dc 100644 --- a/src/features/appearance/index.ts +++ b/src/features/appearance/index.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | import color from 'color'; | 1 | import color from 'color'; |
2 | import { reaction } from 'mobx'; | 2 | import { reaction } from 'mobx'; |
3 | import { iconSizeBias } from '../../config'; | 3 | import { DEFAULT_APP_SETTINGS, iconSizeBias } from '../../config'; |
4 | import { DEFAULT_APP_SETTINGS } from '../../environment'; | ||
5 | 4 | ||
6 | const STYLE_ELEMENT_ID = 'custom-appearance-style'; | 5 | const STYLE_ELEMENT_ID = 'custom-appearance-style'; |
7 | 6 | ||
diff --git a/src/index.js b/src/index.js index 6035d08a4..ed37134c9 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -10,10 +10,9 @@ import ms from 'ms'; | |||
10 | 10 | ||
11 | require('@electron/remote/main').initialize(); | 11 | require('@electron/remote/main').initialize(); |
12 | 12 | ||
13 | import { DEFAULT_WINDOW_OPTIONS } from './config'; | 13 | import { DEFAULT_APP_SETTINGS, DEFAULT_WINDOW_OPTIONS } from './config'; |
14 | 14 | ||
15 | import { | 15 | import { |
16 | DEFAULT_APP_SETTINGS, | ||
17 | isMac, | 16 | isMac, |
18 | isWindows, | 17 | isWindows, |
19 | isLinux, | 18 | isLinux, |
diff --git a/src/internal-server/app/Controllers/Http/UserController.js b/src/internal-server/app/Controllers/Http/UserController.js index 9bbd2ff6e..25b5277bd 100644 --- a/src/internal-server/app/Controllers/Http/UserController.js +++ b/src/internal-server/app/Controllers/Http/UserController.js | |||
@@ -7,7 +7,7 @@ const btoa = require('btoa'); | |||
7 | const fetch = require('node-fetch'); | 7 | const fetch = require('node-fetch'); |
8 | const { v4: uuid } = require('uuid'); | 8 | const { v4: uuid } = require('uuid'); |
9 | const crypto = require('crypto'); | 9 | const crypto = require('crypto'); |
10 | const { DEFAULT_APP_SETTINGS } = require('../../../../environment'); | 10 | const { DEFAULT_APP_SETTINGS } = require('../../../../config'); |
11 | const { API_VERSION } = require('../../../../environment-remote'); | 11 | const { API_VERSION } = require('../../../../environment-remote'); |
12 | const { default: userAgent } = require('../../../../helpers/userAgent-helpers'); | 12 | const { default: userAgent } = require('../../../../helpers/userAgent-helpers'); |
13 | 13 | ||
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 83e6a899b..3d9d2b551 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -16,9 +16,8 @@ import { readJsonSync } from 'fs-extra'; | |||
16 | 16 | ||
17 | import Store from './lib/Store'; | 17 | import Store from './lib/Store'; |
18 | import Request from './lib/Request'; | 18 | import Request from './lib/Request'; |
19 | import { CHECK_INTERVAL } from '../config'; | 19 | import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; |
20 | import { | 20 | import { |
21 | DEFAULT_APP_SETTINGS, | ||
22 | isMac, | 21 | isMac, |
23 | electronVersion, | 22 | electronVersion, |
24 | osRelease, | 23 | osRelease, |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 4b203101a..ec80fee7c 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -2,8 +2,7 @@ import { ipcRenderer } from 'electron'; | |||
2 | import { getCurrentWindow } from '@electron/remote'; | 2 | import { getCurrentWindow } from '@electron/remote'; |
3 | import { action, computed, observable, reaction } from 'mobx'; | 3 | import { action, computed, observable, reaction } from 'mobx'; |
4 | import localStorage from 'mobx-localstorage'; | 4 | import localStorage from 'mobx-localstorage'; |
5 | import { FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER } from '../config'; | 5 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER } from '../config'; |
6 | import { DEFAULT_APP_SETTINGS } from '../environment'; | ||
7 | import { hash } from '../helpers/password-helpers'; | 6 | import { hash } from '../helpers/password-helpers'; |
8 | import Request from './lib/Request'; | 7 | import Request from './lib/Request'; |
9 | import Store from './lib/Store'; | 8 | import Store from './lib/Store'; |
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index 892b08e54..5cab28c09 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -45,7 +45,7 @@ import { | |||
45 | getSpellcheckerLocaleByFuzzyIdentifier, | 45 | getSpellcheckerLocaleByFuzzyIdentifier, |
46 | } from './spellchecker'; | 46 | } from './spellchecker'; |
47 | 47 | ||
48 | import { DEFAULT_APP_SETTINGS } from '../environment'; | 48 | import { DEFAULT_APP_SETTINGS } from '../config'; |
49 | 49 | ||
50 | const debug = require('debug')('Ferdi:Plugin'); | 50 | const debug = require('debug')('Ferdi:Plugin'); |
51 | 51 | ||