diff options
Diffstat (limited to 'src/config.js')
-rw-r--r-- | src/config.js | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/src/config.js b/src/config.js index 789ddd1a0..5bc318545 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -1,14 +1,30 @@ | |||
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 | |||
6 | import { asarPath } from './helpers/asar-helpers'; | ||
3 | 7 | ||
4 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; | 8 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; |
5 | const systemPreferences = process.type === 'renderer' ? electron.remote.systemPreferences : electron.systemPreferences; | 9 | const systemPreferences = process.type === 'renderer' ? electron.remote.systemPreferences : electron.systemPreferences; |
6 | 10 | ||
7 | 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 |
12 | |||
8 | export const LOCAL_API = 'http://localhost:3000'; | 13 | export const LOCAL_API = 'http://localhost:3000'; |
9 | export const DEV_API = 'https://dev.franzinfra.com'; | 14 | export const DEV_API = 'https://dev.franzinfra.com'; |
10 | export const LIVE_API = 'https://api.franzinfra.com'; | 15 | export const LIVE_API = 'https://api.franzinfra.com'; |
11 | export const GA_ID = 'UA-74126766-10'; | 16 | |
17 | export const LOCAL_WS_API = 'ws://localhost:3000'; | ||
18 | export const DEV_WS_API = 'wss://dev.franzinfra.com'; | ||
19 | export const LIVE_WS_API = 'wss://api.franzinfra.com'; | ||
20 | |||
21 | export const LOCAL_API_WEBSITE = 'http://localhost:3333'; | ||
22 | export const DEV_API_WEBSITE = 'https://meetfranz.com'; | ||
23 | export const LIVE_API_WEBSITE = 'https://meetfranz.com'; | ||
24 | |||
25 | export const STATS_API = 'https://stats.franzinfra.com'; | ||
26 | |||
27 | export const GA_ID = !isDevMode ? 'UA-74126766-10' : 'UA-74126766-12'; | ||
12 | 28 | ||
13 | export const DEFAULT_APP_SETTINGS = { | 29 | export const DEFAULT_APP_SETTINGS = { |
14 | autoLaunchInBackground: false, | 30 | autoLaunchInBackground: false, |
@@ -32,11 +48,14 @@ export const DEFAULT_FEATURES_CONFIG = { | |||
32 | isSpellcheckerPremiumFeature: false, | 48 | isSpellcheckerPremiumFeature: false, |
33 | needToWaitToProceed: false, | 49 | needToWaitToProceed: false, |
34 | needToWaitToProceedConfig: { | 50 | needToWaitToProceedConfig: { |
35 | delayOffset: 3600000, | 51 | delayOffset: ms('1h'), |
36 | wait: 10000, | 52 | wait: ms('10s'), |
37 | }, | 53 | }, |
38 | isServiceProxyEnabled: false, | 54 | isServiceProxyEnabled: false, |
39 | isServiceProxyPremiumFeature: true, | 55 | isServiceProxyPremiumFeature: true, |
56 | isAnnouncementsEnabled: true, | ||
57 | isWorkspacePremiumFeature: true, | ||
58 | isWorkspaceEnabled: false, | ||
40 | }; | 59 | }; |
41 | 60 | ||
42 | export const DEFAULT_WINDOW_OPTIONS = { | 61 | export const DEFAULT_WINDOW_OPTIONS = { |
@@ -57,4 +76,10 @@ export const FILE_SYSTEM_SETTINGS_TYPES = [ | |||
57 | export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); | 76 | export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); |
58 | 77 | ||
59 | // Replacing app.asar is not beautiful but unforunately necessary | 78 | // Replacing app.asar is not beautiful but unforunately necessary |
60 | export const DICTIONARY_PATH = path.join(__dirname, 'dictionaries').replace('app.asar', 'app.asar.unpacked'); | 79 | export const DICTIONARY_PATH = asarPath(path.join(__dirname, 'dictionaries')); |
80 | |||
81 | export const ALLOWED_PROTOCOLS = [ | ||
82 | 'https:', | ||
83 | 'http:', | ||
84 | 'ftp:', | ||
85 | ]; | ||