diff options
author | 2018-02-22 17:03:33 +0100 | |
---|---|---|
committer | 2018-02-22 17:03:33 +0100 | |
commit | 136be27ef9185f48262d3ff0e7f754bb5590de45 (patch) | |
tree | 790bbd79821a8e355e277c04616d39a7b280f8c1 /src/environment.js | |
parent | remove electron frame for Windows testing on macOS (diff) | |
download | ferdium-app-136be27ef9185f48262d3ff0e7f754bb5590de45.tar.gz ferdium-app-136be27ef9185f48262d3ff0e7f754bb5590de45.tar.zst ferdium-app-136be27ef9185f48262d3ff0e7f754bb5590de45.zip |
override platform in code and simulate different environment
[MINOR] REFACTOR rename `FRANZ_PLATFORM` to `OS_PLATFORM`
[MINOR] FIX propTypes for `electron-react-titlebar`
Diffstat (limited to 'src/environment.js')
-rw-r--r-- | src/environment.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/environment.js b/src/environment.js index e185120c0..4dca0807d 100644 --- a/src/environment.js +++ b/src/environment.js | |||
@@ -4,9 +4,14 @@ export const isDevMode = Boolean(process.execPath.match(/[\\/]electron/)); | |||
4 | export const useLiveAPI = process.env.LIVE_API; | 4 | export const useLiveAPI = process.env.LIVE_API; |
5 | export const useLocalAPI = process.env.LOCAL_API; | 5 | export const useLocalAPI = process.env.LOCAL_API; |
6 | 6 | ||
7 | export const isMac = process.platform === 'darwin'; | 7 | let platform = process.platform; |
8 | export const isWindows = process.platform === 'win32'; | 8 | if (process.env.OS_PLATFORM) { |
9 | export const isLinux = process.platform === 'linux'; | 9 | platform = process.env.OS_PLATFORM; |
10 | } | ||
11 | |||
12 | export const isMac = platform === 'darwin'; | ||
13 | export const isWindows = platform === 'win32'; | ||
14 | export const isLinux = platform === 'linux'; | ||
10 | 15 | ||
11 | export const ctrlKey = isMac ? '⌘' : 'Ctrl'; | 16 | export const ctrlKey = isMac ? '⌘' : 'Ctrl'; |
12 | 17 | ||