diff options
Diffstat (limited to 'src/config.js')
-rw-r--r-- | src/config.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/config.js b/src/config.js index aecba45be..479572edb 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -1,15 +1,18 @@ | |||
1 | import electron from 'electron'; | 1 | import electron from 'electron'; |
2 | import path from 'path'; | 2 | import path from 'path'; |
3 | import isDevMode from 'electron-is-dev'; | ||
4 | import ms from 'ms'; | ||
5 | |||
3 | import { asarPath } from './helpers/asar-helpers'; | 6 | import { asarPath } from './helpers/asar-helpers'; |
4 | 7 | ||
5 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; | 8 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; |
6 | const systemPreferences = process.type === 'renderer' ? electron.remote.systemPreferences : electron.systemPreferences; | 9 | const systemPreferences = process.type === 'renderer' ? electron.remote.systemPreferences : electron.systemPreferences; |
7 | 10 | ||
8 | export const CHECK_INTERVAL = 1000 * 3600; // How often should we perform checks | 11 | export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks |
9 | export const LOCAL_API = 'http://localhost:3000'; | 12 | export const LOCAL_API = 'http://localhost:3000'; |
10 | export const DEV_API = 'https://dev.franzinfra.com'; | 13 | export const DEV_API = 'https://dev.franzinfra.com'; |
11 | export const LIVE_API = 'https://api.franzinfra.com'; | 14 | export const LIVE_API = 'https://api.franzinfra.com'; |
12 | export const GA_ID = 'UA-74126766-10'; | 15 | export const GA_ID = !isDevMode ? 'UA-74126766-10' : 'UA-74126766-12'; |
13 | 16 | ||
14 | export const DEFAULT_APP_SETTINGS = { | 17 | export const DEFAULT_APP_SETTINGS = { |
15 | autoLaunchInBackground: false, | 18 | autoLaunchInBackground: false, |
@@ -33,8 +36,8 @@ export const DEFAULT_FEATURES_CONFIG = { | |||
33 | isSpellcheckerPremiumFeature: false, | 36 | isSpellcheckerPremiumFeature: false, |
34 | needToWaitToProceed: false, | 37 | needToWaitToProceed: false, |
35 | needToWaitToProceedConfig: { | 38 | needToWaitToProceedConfig: { |
36 | delayOffset: 3600000, | 39 | delayOffset: ms('1h'), |
37 | wait: 10000, | 40 | wait: ms('10s'), |
38 | }, | 41 | }, |
39 | isServiceProxyEnabled: false, | 42 | isServiceProxyEnabled: false, |
40 | isServiceProxyPremiumFeature: true, | 43 | isServiceProxyPremiumFeature: true, |
@@ -59,3 +62,9 @@ export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); | |||
59 | 62 | ||
60 | // Replacing app.asar is not beautiful but unforunately necessary | 63 | // Replacing app.asar is not beautiful but unforunately necessary |
61 | export const DICTIONARY_PATH = asarPath(path.join(__dirname, 'dictionaries')); | 64 | export const DICTIONARY_PATH = asarPath(path.join(__dirname, 'dictionaries')); |
65 | |||
66 | export const ALLOWED_PROTOCOLS = [ | ||
67 | 'https:', | ||
68 | 'http:', | ||
69 | 'ftp:', | ||
70 | ]; | ||