aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.js')
-rw-r--r--src/config.js35
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 @@
1import electron from 'electron'; 1import electron from 'electron';
2import path from 'path'; 2import path from 'path';
3import isDevMode from 'electron-is-dev';
4import ms from 'ms';
5
6import { asarPath } from './helpers/asar-helpers';
3 7
4const app = process.type === 'renderer' ? electron.remote.app : electron.app; 8const app = process.type === 'renderer' ? electron.remote.app : electron.app;
5const systemPreferences = process.type === 'renderer' ? electron.remote.systemPreferences : electron.systemPreferences; 9const systemPreferences = process.type === 'renderer' ? electron.remote.systemPreferences : electron.systemPreferences;
6 10
7export const CHECK_INTERVAL = 1000 * 3600; // How often should we perform checks 11export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks
12
8export const LOCAL_API = 'http://localhost:3000'; 13export const LOCAL_API = 'http://localhost:3000';
9export const DEV_API = 'https://dev.franzinfra.com'; 14export const DEV_API = 'https://dev.franzinfra.com';
10export const LIVE_API = 'https://api.franzinfra.com'; 15export const LIVE_API = 'https://api.franzinfra.com';
11export const GA_ID = 'UA-74126766-10'; 16
17export const LOCAL_WS_API = 'ws://localhost:3000';
18export const DEV_WS_API = 'wss://dev.franzinfra.com';
19export const LIVE_WS_API = 'wss://api.franzinfra.com';
20
21export const LOCAL_API_WEBSITE = 'http://localhost:3333';
22export const DEV_API_WEBSITE = 'https://meetfranz.com';
23export const LIVE_API_WEBSITE = 'https://meetfranz.com';
24
25export const STATS_API = 'https://stats.franzinfra.com';
26
27export const GA_ID = !isDevMode ? 'UA-74126766-10' : 'UA-74126766-12';
12 28
13export const DEFAULT_APP_SETTINGS = { 29export 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
42export const DEFAULT_WINDOW_OPTIONS = { 61export const DEFAULT_WINDOW_OPTIONS = {
@@ -57,4 +76,10 @@ export const FILE_SYSTEM_SETTINGS_TYPES = [
57export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); 76export 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
60export const DICTIONARY_PATH = path.join(__dirname, 'dictionaries').replace('app.asar', 'app.asar.unpacked'); 79export const DICTIONARY_PATH = asarPath(path.join(__dirname, 'dictionaries'));
80
81export const ALLOWED_PROTOCOLS = [
82 'https:',
83 'http:',
84 'ftp:',
85];