diff options
author | 2021-08-05 08:45:37 +0530 | |
---|---|---|
committer | 2021-08-05 08:45:37 +0530 | |
commit | 3336789ba527e0421d0718834afdffd0f85c3b10 (patch) | |
tree | bab95c24baa1454eac0091f5f6726647519b8d38 /src/environment.js | |
parent | Updated 'CHANGELOG.md'. [skip ci] (diff) | |
download | ferdium-app-3336789ba527e0421d0718834afdffd0f85c3b10.tar.gz ferdium-app-3336789ba527e0421d0718834afdffd0f85c3b10.tar.zst ferdium-app-3336789ba527e0421d0718834afdffd0f85c3b10.zip |
refactor: minor refactoring: solve name-clash of env vars vs vars in the program
Diffstat (limited to 'src/environment.js')
-rw-r--r-- | src/environment.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/environment.js b/src/environment.js index a6ad75820..7b560acb6 100644 --- a/src/environment.js +++ b/src/environment.js | |||
@@ -17,7 +17,6 @@ import { | |||
17 | DEV_WS_API, | 17 | DEV_WS_API, |
18 | LOCAL_TODOS_FRONTEND_URL, | 18 | LOCAL_TODOS_FRONTEND_URL, |
19 | PRODUCTION_TODOS_FRONTEND_URL, | 19 | PRODUCTION_TODOS_FRONTEND_URL, |
20 | LIVE_FRANZ_API, | ||
21 | DEFAULT_TODO_SERVICE, | 20 | DEFAULT_TODO_SERVICE, |
22 | SEARCH_ENGINE_DDG, | 21 | SEARCH_ENGINE_DDG, |
23 | iconSizeBias, | 22 | iconSizeBias, |
@@ -56,7 +55,8 @@ export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); | |||
56 | // Replacing app.asar is not beautiful but unfortunately necessary | 55 | // Replacing app.asar is not beautiful but unfortunately necessary |
57 | export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes')); | 56 | export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes')); |
58 | 57 | ||
59 | export const useLiveAPI = process.env.LIVE_API; | 58 | export const useLiveAPI = process.env.USE_LIVE_API; |
59 | const useLocalAPI = process.env.USE_LOCAL_API; | ||
60 | 60 | ||
61 | export const isMac = is.macos; | 61 | export const isMac = is.macos; |
62 | export const isWindows = is.windows; | 62 | export const isWindows = is.windows; |
@@ -75,12 +75,10 @@ let web; | |||
75 | let todos; | 75 | let todos; |
76 | if (!isDevMode || (isDevMode && useLiveAPI)) { | 76 | if (!isDevMode || (isDevMode && useLiveAPI)) { |
77 | api = LIVE_FERDI_API; | 77 | api = LIVE_FERDI_API; |
78 | // api = DEV_FRANZ_API; | ||
79 | wsApi = LIVE_WS_API; | 78 | wsApi = LIVE_WS_API; |
80 | web = LIVE_API_FERDI_WEBSITE; | 79 | web = LIVE_API_FERDI_WEBSITE; |
81 | // web = DEV_API_FRANZ_WEBSITE; | ||
82 | todos = PRODUCTION_TODOS_FRONTEND_URL; | 80 | todos = PRODUCTION_TODOS_FRONTEND_URL; |
83 | } else if (isDevMode && process.env.LOCAL_API) { | 81 | } else if (isDevMode && useLocalAPI) { |
84 | api = LOCAL_API; | 82 | api = LOCAL_API; |
85 | wsApi = LOCAL_WS_API; | 83 | wsApi = LOCAL_WS_API; |
86 | web = LOCAL_API_WEBSITE; | 84 | web = LOCAL_API_WEBSITE; |
@@ -152,10 +150,6 @@ export const DEFAULT_APP_SETTINGS = { | |||
152 | alwaysShowWorkspaces: false, | 150 | alwaysShowWorkspaces: false, |
153 | }; | 151 | }; |
154 | 152 | ||
155 | export function termsBase() { | ||
156 | return window.ferdi.stores.settings.all.app.server !== LIVE_FRANZ_API ? window.ferdi.stores.settings.all.app.server : DEV_API_FRANZ_WEBSITE; | ||
157 | } | ||
158 | |||
159 | export function aboutAppDetails() { | 153 | export function aboutAppDetails() { |
160 | return [ | 154 | return [ |
161 | `Version: ${ferdiVersion}`, | 155 | `Version: ${ferdiVersion}`, |