aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.vscode/launch.json2
-rw-r--r--package.json2
-rw-r--r--src/environment.js11
-rw-r--r--src/index.html2
-rw-r--r--src/index.js2
-rw-r--r--src/lib/Menu.js2
6 files changed, 13 insertions, 8 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 9bd373a4d..f6c20b520 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,7 +10,7 @@
10 "protocol": "inspector", 10 "protocol": "inspector",
11 "env": { 11 "env": {
12 "NODE_ENV": "development", 12 "NODE_ENV": "development",
13 "FRANZ_PLATFORM": "win32" 13 "OS_PLATFORM": "win32"
14 } 14 }
15 }, 15 },
16 { 16 {
diff --git a/package.json b/package.json
index 60e45f7f6..7922eff03 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
13 "start": "electron ./build", 13 "start": "electron ./build",
14 "start:local": "cross-env LOCAL_API=1 yarn start", 14 "start:local": "cross-env LOCAL_API=1 yarn start",
15 "start:live": "cross-env LIVE_API=1 yarn start", 15 "start:live": "cross-env LIVE_API=1 yarn start",
16 "dev": "cross-env NODE_ENV=development FRANZ_PLATFORM=win32 gulp dev", 16 "dev": "cross-env NODE_ENV=development OS_PLATFORM=win32 gulp dev",
17 "lint": "eslint src", 17 "lint": "eslint src",
18 "sign": "gulp sign", 18 "sign": "gulp sign",
19 "prebuild": "gulp build", 19 "prebuild": "gulp build",
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/));
4export const useLiveAPI = process.env.LIVE_API; 4export const useLiveAPI = process.env.LIVE_API;
5export const useLocalAPI = process.env.LOCAL_API; 5export const useLocalAPI = process.env.LOCAL_API;
6 6
7export const isMac = process.platform === 'darwin'; 7let platform = process.platform;
8export const isWindows = process.platform === 'win32'; 8if (process.env.OS_PLATFORM) {
9export const isLinux = process.platform === 'linux'; 9 platform = process.env.OS_PLATFORM;
10}
11
12export const isMac = platform === 'darwin';
13export const isWindows = platform === 'win32';
14export const isLinux = platform === 'linux';
10 15
11export const ctrlKey = isMac ? '⌘' : 'Ctrl'; 16export const ctrlKey = isMac ? '⌘' : 'Ctrl';
12 17
diff --git a/src/index.html b/src/index.html
index bb10d2eaf..6c259e5be 100644
--- a/src/index.html
+++ b/src/index.html
@@ -11,7 +11,7 @@
11 <div class="dev-warning">DEV MODE</div> 11 <div class="dev-warning">DEV MODE</div>
12 <div id="root"></div> 12 <div id="root"></div>
13 <script> 13 <script>
14 document.querySelector('body').classList.add(process.env.FRANZ_PLATFORM ? process.env.FRANZ_PLATFORM : process.platform); 14 document.querySelector('body').classList.add(process.env.OS_PLATFORM ? process.env.OS_PLATFORM : process.platform);
15 15
16 const { isDevMode } = require('./environment'); 16 const { isDevMode } = require('./environment');
17 if (isDevMode) { 17 if (isDevMode) {
diff --git a/src/index.js b/src/index.js
index 170353fb0..e8818af96 100644
--- a/src/index.js
+++ b/src/index.js
@@ -72,7 +72,7 @@ const createWindow = () => {
72 height: mainWindowState.height, 72 height: mainWindowState.height,
73 minWidth: 600, 73 minWidth: 600,
74 minHeight: 500, 74 minHeight: 500,
75 titleBarStyle: process.env.FRANZ_PLATFORM || process.platform === 'win32' ? '' : 'hidden', 75 titleBarStyle: process.env.OS_PLATFORM || process.platform === 'win32' ? '' : 'hidden',
76 frame: false, 76 frame: false,
77 backgroundColor: '#3498db', 77 backgroundColor: '#3498db',
78 autoHideMenuBar: true, 78 autoHideMenuBar: true,
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index ed21315d8..d043dee87 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -126,7 +126,7 @@ export default class FranzMenu {
126 } 126 }
127 127
128 get template() { 128 get template() {
129 return this.currentTemplate; 129 return this.currentTemplate.toJS();
130 } 130 }
131 131
132 _build() { 132 _build() {