diff options
author | 2019-02-11 14:43:31 +0100 | |
---|---|---|
committer | 2019-02-11 14:43:31 +0100 | |
commit | c128a9b8469e876803f6f501ca1685607740c068 (patch) | |
tree | 2a96d73f637580d23716efd7511d5b1c63372537 | |
parent | Add option to login via deep link (diff) | |
download | ferdium-app-c128a9b8469e876803f6f501ca1685607740c068.tar.gz ferdium-app-c128a9b8469e876803f6f501ca1685607740c068.tar.zst ferdium-app-c128a9b8469e876803f6f501ca1685607740c068.zip |
Update electron-window-state
-rw-r--r-- | package-lock.json | 29 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | src/environment.js | 6 | ||||
-rw-r--r-- | src/index.js | 15 |
4 files changed, 22 insertions, 31 deletions
diff --git a/package-lock.json b/package-lock.json index 81031a76c..50383111c 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -3977,11 +3977,6 @@ | |||
3977 | "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", | 3977 | "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", |
3978 | "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" | 3978 | "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" |
3979 | }, | 3979 | }, |
3980 | "deep-equal": { | ||
3981 | "version": "1.0.1", | ||
3982 | "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", | ||
3983 | "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" | ||
3984 | }, | ||
3985 | "deep-extend": { | 3980 | "deep-extend": { |
3986 | "version": "0.6.0", | 3981 | "version": "0.6.0", |
3987 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", | 3982 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", |
@@ -4620,6 +4615,11 @@ | |||
4620 | "unixify": "1.0.0" | 4615 | "unixify": "1.0.0" |
4621 | } | 4616 | } |
4622 | }, | 4617 | }, |
4618 | "electron-is-dev": { | ||
4619 | "version": "1.0.1", | ||
4620 | "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-1.0.1.tgz", | ||
4621 | "integrity": "sha512-iwM3EotA9HTXqMGpQRkR/kT8OZqBbdfHTnlwcxsjSLYqY8svvsq0MuujsWCn3/vtgRmDv/PC/gKUUpoZvi5C1w==" | ||
4622 | }, | ||
4623 | "electron-osx-sign": { | 4623 | "electron-osx-sign": { |
4624 | "version": "0.4.11", | 4624 | "version": "0.4.11", |
4625 | "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.11.tgz", | 4625 | "resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.11.tgz", |
@@ -4752,23 +4752,12 @@ | |||
4752 | } | 4752 | } |
4753 | }, | 4753 | }, |
4754 | "electron-window-state": { | 4754 | "electron-window-state": { |
4755 | "version": "4.1.1", | 4755 | "version": "5.0.3", |
4756 | "resolved": "https://registry.npmjs.org/electron-window-state/-/electron-window-state-4.1.1.tgz", | 4756 | "resolved": "https://registry.npmjs.org/electron-window-state/-/electron-window-state-5.0.3.tgz", |
4757 | "integrity": "sha1-azT9wxs4UU3+yLfI97XUrdtnYy0=", | 4757 | "integrity": "sha512-1mNTwCfkolXl3kMf50yW3vE2lZj0y92P/HYWFBrb+v2S/pCka5mdwN3cagKm458A7NjndSwijynXgcLWRodsVg==", |
4758 | "requires": { | 4758 | "requires": { |
4759 | "deep-equal": "^1.0.1", | 4759 | "jsonfile": "^4.0.0", |
4760 | "jsonfile": "^2.2.3", | ||
4761 | "mkdirp": "^0.5.1" | 4760 | "mkdirp": "^0.5.1" |
4762 | }, | ||
4763 | "dependencies": { | ||
4764 | "jsonfile": { | ||
4765 | "version": "2.4.0", | ||
4766 | "resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", | ||
4767 | "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", | ||
4768 | "requires": { | ||
4769 | "graceful-fs": "^4.1.6" | ||
4770 | } | ||
4771 | } | ||
4772 | } | 4761 | } |
4773 | }, | 4762 | }, |
4774 | "email-addresses": { | 4763 | "email-addresses": { |
diff --git a/package.json b/package.json index c91ad1bb2..03267c136 100644 --- a/package.json +++ b/package.json | |||
@@ -39,9 +39,10 @@ | |||
39 | "electron-dl": "1.12.0", | 39 | "electron-dl": "1.12.0", |
40 | "electron-fetch": "1.3.0", | 40 | "electron-fetch": "1.3.0", |
41 | "electron-hunspell": "0.1.1", | 41 | "electron-hunspell": "0.1.1", |
42 | "electron-is-dev": "1.0.1", | ||
42 | "electron-react-titlebar": "0.8.1", | 43 | "electron-react-titlebar": "0.8.1", |
43 | "electron-updater": "4.0.6", | 44 | "electron-updater": "4.0.6", |
44 | "electron-window-state": "^4.1.0", | 45 | "electron-window-state": "5.0.3", |
45 | "fs-extra": "7.0.1", | 46 | "fs-extra": "7.0.1", |
46 | "gulp-cli": "1.2.2", | 47 | "gulp-cli": "1.2.2", |
47 | "hex-to-rgba": "1.0.2", | 48 | "hex-to-rgba": "1.0.2", |
diff --git a/src/environment.js b/src/environment.js index e1762129b..73b1c7ab2 100644 --- a/src/environment.js +++ b/src/environment.js | |||
@@ -1,10 +1,12 @@ | |||
1 | import isDev from 'electron-is-dev'; | ||
2 | |||
1 | import { LIVE_API, DEV_API, LOCAL_API } from './config'; | 3 | import { LIVE_API, DEV_API, LOCAL_API } from './config'; |
2 | 4 | ||
3 | export const isDevMode = Boolean(process.execPath.match(/[\\/]electron/)); | 5 | export const isDevMode = isDev; |
4 | export const useLiveAPI = process.env.LIVE_API; | 6 | export const useLiveAPI = process.env.LIVE_API; |
5 | export const useLocalAPI = process.env.LOCAL_API; | 7 | export const useLocalAPI = process.env.LOCAL_API; |
6 | 8 | ||
7 | let platform = process.platform; | 9 | let { platform } = process; |
8 | if (process.env.OS_PLATFORM) { | 10 | if (process.env.OS_PLATFORM) { |
9 | platform = process.env.OS_PLATFORM; | 11 | platform = process.env.OS_PLATFORM; |
10 | } | 12 | } |
diff --git a/src/index.js b/src/index.js index 8d3b04845..494fa97f1 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -4,24 +4,23 @@ import { | |||
4 | shell, | 4 | shell, |
5 | ipcMain, | 5 | ipcMain, |
6 | } from 'electron'; | 6 | } from 'electron'; |
7 | import isDevMode from 'electron-is-dev'; | ||
7 | import fs from 'fs-extra'; | 8 | import fs from 'fs-extra'; |
8 | import path from 'path'; | 9 | import path from 'path'; |
9 | import windowStateKeeper from 'electron-window-state'; | 10 | import windowStateKeeper from 'electron-window-state'; |
10 | 11 | ||
12 | // Set app directory before loading user modules | ||
13 | if (isDevMode) { | ||
14 | app.setPath('userData', path.join(app.getPath('appData'), 'FranzDev')); | ||
15 | } | ||
16 | |||
17 | /* eslint-disable import/first */ | ||
11 | import { | 18 | import { |
12 | isDevMode, | ||
13 | isMac, | 19 | isMac, |
14 | isWindows, | 20 | isWindows, |
15 | isLinux, | 21 | isLinux, |
16 | } from './environment'; | 22 | } from './environment'; |
17 | |||
18 | import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; | 23 | import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; |
19 | |||
20 | // DEV MODE: Save user data into FranzDev | ||
21 | if (isDevMode) { | ||
22 | app.setPath('userData', path.join(app.getPath('appData'), 'FranzDev')); | ||
23 | } | ||
24 | /* eslint-disable import/first */ | ||
25 | import ipcApi from './electron/ipc-api'; | 24 | import ipcApi from './electron/ipc-api'; |
26 | import Tray from './lib/Tray'; | 25 | import Tray from './lib/Tray'; |
27 | import Settings from './electron/Settings'; | 26 | import Settings from './electron/Settings'; |