diff options
author | 2021-08-21 08:07:32 +0530 | |
---|---|---|
committer | 2021-08-21 08:55:38 +0530 | |
commit | b1cf1849f5bfa8f297f78a5ca58d797f466b3086 (patch) | |
tree | 658f3adeb740cf54021dfb6ad951649f0d539e6d /src/config.js | |
parent | refactor(cleanup): remove code that refers to paid subscription (diff) | |
download | ferdium-app-b1cf1849f5bfa8f297f78a5ca58d797f466b3086.tar.gz ferdium-app-b1cf1849f5bfa8f297f78a5ca58d797f466b3086.tar.zst ferdium-app-b1cf1849f5bfa8f297f78a5ca58d797f466b3086.zip |
chore: typescript conversion
Diffstat (limited to 'src/config.js')
-rw-r--r-- | src/config.js | 182 |
1 files changed, 0 insertions, 182 deletions
diff --git a/src/config.js b/src/config.js deleted file mode 100644 index aeaec1089..000000000 --- a/src/config.js +++ /dev/null | |||
@@ -1,182 +0,0 @@ | |||
1 | // Note: This file has now become devoid of all references to values deduced from the runtime process - all those now live in the `environment.js` file | ||
2 | |||
3 | import ms from 'ms'; | ||
4 | |||
5 | export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks | ||
6 | |||
7 | export const LOCAL_HOSTNAME = 'localhost'; | ||
8 | export const LOCAL_PORT = 45569; | ||
9 | export const LOCAL_API = 'http://localhost:3000'; | ||
10 | export const DEV_FRANZ_API = 'https://dev.franzinfra.com'; | ||
11 | |||
12 | export const LIVE_FERDI_API = 'https://api.getferdi.com'; | ||
13 | export const LIVE_FRANZ_API = 'https://api.franzinfra.com'; | ||
14 | |||
15 | // URL used to submit debugger information, see https://github.com/getferdi/debugger | ||
16 | export const DEBUG_API = 'https://debug.getferdi.com'; | ||
17 | |||
18 | export const LOCAL_WS_API = 'ws://localhost:3000'; | ||
19 | export const DEV_WS_API = 'wss://dev.franzinfra.com'; | ||
20 | export const LIVE_WS_API = 'wss://api.franzinfra.com'; | ||
21 | |||
22 | export const LOCAL_API_WEBSITE = 'http://localhost:3333'; | ||
23 | export const DEV_API_FRANZ_WEBSITE = 'https://meetfranz.com'; | ||
24 | export const LIVE_API_FERDI_WEBSITE = 'https://getferdi.com'; | ||
25 | |||
26 | export const STATS_API = 'https://stats.franzinfra.com'; | ||
27 | |||
28 | export const LOCAL_TODOS_FRONTEND_URL = 'http://localhost:4000'; | ||
29 | export const PRODUCTION_TODOS_FRONTEND_URL = 'https://app.franztodos.com'; | ||
30 | export const DEVELOPMENT_TODOS_FRONTEND_URL = 'https://development--franz-todos.netlify.com'; | ||
31 | |||
32 | export const CDN_URL = 'https://cdn.franzinfra.com'; | ||
33 | |||
34 | export const KEEP_WS_LOADED_USID = '0a0aa000-0a0a-49a0-a000-a0a0a0a0a0a0'; | ||
35 | |||
36 | export const HIBERNATION_STRATEGIES = { | ||
37 | 10: 'Extremely Fast Hibernation (10sec)', | ||
38 | 30: 'Very Fast Hibernation (30sec)', | ||
39 | 60: 'Fast Hibernation (1min)', | ||
40 | 300: 'Normal Hibernation (5min)', | ||
41 | 600: 'Slow Hibernation (10min)', | ||
42 | 1800: 'Very Slow Hibernation (30min)', | ||
43 | 3600: 'Extremely Slow Hibernation (1hour)', | ||
44 | }; | ||
45 | |||
46 | export const WAKE_UP_STRATEGIES = { | ||
47 | 0: 'Never wake up', | ||
48 | 10: 'Wake up after 10sec', | ||
49 | 30: 'Wake up after 30sec', | ||
50 | 60: 'Wake up after 1min', | ||
51 | 300: 'Wake up after 5min', | ||
52 | 600: 'Wake up after 10min', | ||
53 | 1800: 'Wake up after 30min', | ||
54 | 3600: 'Wake up after 1hour', | ||
55 | }; | ||
56 | |||
57 | export const NAVIGATION_BAR_BEHAVIOURS = { | ||
58 | custom: 'Show navigation bar on custom websites only', | ||
59 | always: 'Show navigation bar on all services', | ||
60 | never: 'Never show navigation bar', | ||
61 | }; | ||
62 | |||
63 | export const SEARCH_ENGINE_GOOGLE = 'google'; | ||
64 | export const SEARCH_ENGINE_DDG = 'duckDuckGo'; | ||
65 | export const SEARCH_ENGINE_NAMES = { | ||
66 | [SEARCH_ENGINE_GOOGLE]: 'Google', | ||
67 | [SEARCH_ENGINE_DDG]: 'DuckDuckGo', | ||
68 | }; | ||
69 | |||
70 | export const SEARCH_ENGINE_URLS = { | ||
71 | [SEARCH_ENGINE_GOOGLE]: ({ searchTerm }) => `https://www.google.com/search?q=${searchTerm}`, | ||
72 | [SEARCH_ENGINE_DDG]: ({ searchTerm }) => `https://duckduckgo.com/?q=${searchTerm}`, | ||
73 | }; | ||
74 | |||
75 | export const CUSTOM_TODO_SERVICE = 'isUsingCustomTodoService'; | ||
76 | |||
77 | const TODO_TODOIST_URL = 'https://todoist.com/app'; | ||
78 | const TODO_FRANZ_TODOS_URL = 'https://app.franztodos.com'; | ||
79 | const TODO_TICKTICK_URL = 'https://ticktick.com/signin'; | ||
80 | const TODO_MSTODO_URL = 'https://todo.microsoft.com/?app#'; | ||
81 | const TODO_HABITICA_URL = 'https://habitica.com/login'; | ||
82 | const TODO_NOZBE_URL = 'https://app.nozbe.com/#login'; | ||
83 | const TODO_RTM_URL = 'https://www.rememberthemilk.com/login/'; | ||
84 | const TODO_ANYDO_URL = 'https://desktop.any.do/'; | ||
85 | const TODO_GOOGLETASKS_URL = 'https://tasks.google.com/embed/?origin=https%3A%2F%2Fcalendar.google.com&fullWidth=1'; | ||
86 | |||
87 | export const TODO_SERVICE_RECIPE_IDS = { | ||
88 | [TODO_TODOIST_URL]: 'todoist', | ||
89 | [TODO_FRANZ_TODOS_URL]: 'franz-todos', | ||
90 | [TODO_TICKTICK_URL]: 'TickTick', | ||
91 | [TODO_MSTODO_URL]: 'mstodo', | ||
92 | [TODO_HABITICA_URL]: 'habitica', | ||
93 | [TODO_ANYDO_URL]: 'anydo', | ||
94 | }; | ||
95 | |||
96 | export const TODO_APPS = { | ||
97 | [TODO_TODOIST_URL]: 'Todoist', | ||
98 | [TODO_FRANZ_TODOS_URL]: 'Franz Todo', | ||
99 | [TODO_TICKTICK_URL]: 'TickTick', | ||
100 | [TODO_MSTODO_URL]: 'Microsoft To Do', | ||
101 | [TODO_HABITICA_URL]: 'Habitica', | ||
102 | [TODO_NOZBE_URL]: 'Nozbe', | ||
103 | [TODO_RTM_URL]: 'Remember The Milk', | ||
104 | [TODO_ANYDO_URL]: 'Any.do', | ||
105 | [TODO_GOOGLETASKS_URL]: 'Google Tasks', | ||
106 | [CUSTOM_TODO_SERVICE]: 'Other service', | ||
107 | }; | ||
108 | |||
109 | export const DEFAULT_TODO_SERVICE = TODO_FRANZ_TODOS_URL; | ||
110 | export const DEFAULT_TODO_RECIPE_ID = TODO_SERVICE_RECIPE_IDS[DEFAULT_TODO_SERVICE]; | ||
111 | export const DEFAULT_TODO_SERVICE_NAME = TODO_APPS[DEFAULT_TODO_SERVICE]; | ||
112 | |||
113 | export const SIDEBAR_WIDTH = { | ||
114 | 35: 'Extremely slim sidebar', | ||
115 | 45: 'Very slim sidebar', | ||
116 | 55: 'Slim sidebar', | ||
117 | 68: 'Normal sidebar', | ||
118 | 80: 'Wide sidebar', | ||
119 | 90: 'Very wide sidebar', | ||
120 | 100: 'Extremely wide sidebar', | ||
121 | }; | ||
122 | |||
123 | export const ICON_SIZES = { | ||
124 | 0: 'Very small icons', | ||
125 | 10: 'Small icons', | ||
126 | 20: 'Normal icons', | ||
127 | 30: 'Large icons', | ||
128 | 40: 'Very large icons', | ||
129 | }; | ||
130 | // We need a bias to push all icon sizes into positive numbers | ||
131 | // otherwise the settings screen won't sort the sizes correctly. | ||
132 | // The bias should always be the "Normal icons" value | ||
133 | export const iconSizeBias = 20; | ||
134 | |||
135 | export const DEFAULT_FEATURES_CONFIG = { | ||
136 | isServiceProxyEnabled: false, | ||
137 | isAnnouncementsEnabled: true, | ||
138 | isWorkspaceEnabled: false, | ||
139 | isTodosEnabled: true, | ||
140 | }; | ||
141 | |||
142 | export const DEFAULT_WINDOW_OPTIONS = { | ||
143 | width: 800, | ||
144 | height: 600, | ||
145 | x: 0, | ||
146 | y: 0, | ||
147 | }; | ||
148 | |||
149 | export const GITHUB_FRANZ_URL = 'https://github.com/meetfranz'; | ||
150 | export const GITHUB_FERDI_URL = 'https://github.com/getferdi'; | ||
151 | export const FRANZ_SERVICE_REQUEST = `${GITHUB_FERDI_URL}/recipes/issues`; | ||
152 | export const FRANZ_TRANSLATION = 'https://crowdin.com/project/getferdi'; | ||
153 | export const FRANZ_DEV_DOCS = 'http://bit.ly/franz-dev-hub'; | ||
154 | |||
155 | export const GITHUB_ORG_NAME = 'getferdi'; | ||
156 | export const GITHUB_FERDI_REPO_NAME = 'ferdi'; | ||
157 | export const GITHUB_NIGHTLIES_REPO_NAME = 'nightlies'; | ||
158 | |||
159 | export const FILE_SYSTEM_SETTINGS_TYPES = [ | ||
160 | 'app', | ||
161 | 'proxy', | ||
162 | ]; | ||
163 | |||
164 | export const LOCAL_SERVER = 'You are using Ferdi without a server'; | ||
165 | export const SERVER_NOT_LOADED = 'Ferdi::SERVER_NOT_LOADED'; | ||
166 | |||
167 | export const ALLOWED_PROTOCOLS = [ | ||
168 | 'https:', | ||
169 | 'http:', | ||
170 | 'ftp:', | ||
171 | 'ferdi:', | ||
172 | ]; | ||
173 | |||
174 | export const DEFAULT_SETTING_KEEP_ALL_WORKSPACES_LOADED = false; | ||
175 | |||
176 | export const DEFAULT_TODOS_WIDTH = 300; | ||
177 | export const TODOS_MIN_WIDTH = 200; | ||
178 | export const DEFAULT_TODOS_VISIBLE = true; | ||
179 | export const DEFAULT_IS_FEATURE_ENABLED_BY_USER = true; | ||
180 | export const TODOS_PARTITION_ID = 'persist:todos'; | ||
181 | |||
182 | export const CUSTOM_WEBSITE_RECIPE_ID = 'franz-custom-website'; | ||