diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-05-26 21:05:50 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 21:05:50 +0530 |
commit | 296ce5ce62bcde6888df291f97105fa912ed7d35 (patch) | |
tree | b28e7d2373f1020c1183469aa3a9feafecede569 /src/config.js | |
parent | Added new entry in context menu: 'Download image' (#1449) (diff) | |
download | ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.tar.gz ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.tar.zst ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.zip |
Replace 'remote' with 'electron/remote' (#1448)
* Locked new version of 'recipes' submodule with corresponding changes.
Diffstat (limited to 'src/config.js')
-rw-r--r-- | src/config.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/config.js b/src/config.js index ecd1aa316..127dcd2dc 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -1,12 +1,9 @@ | |||
1 | import electron from 'electron'; | ||
2 | import isDevMode from 'electron-is-dev'; | ||
3 | import ms from 'ms'; | 1 | import ms from 'ms'; |
4 | import path from 'path'; | 2 | import path from 'path'; |
5 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; | 3 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; |
6 | import { asarPath } from './helpers/asar-helpers'; | 4 | import { asarPath } from './helpers/asar-helpers'; |
7 | 5 | ||
8 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; | 6 | const { app, nativeTheme } = process.type === 'renderer' ? require('@electron/remote') : require('electron'); |
9 | const nativeTheme = process.type === 'renderer' ? electron.remote.nativeTheme : electron.nativeTheme; | ||
10 | 7 | ||
11 | export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks | 8 | export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks |
12 | 9 | ||
@@ -199,6 +196,7 @@ if (process.env.FERDI_APPDATA_DIR != null) { | |||
199 | app.setPath('userData', path.join(app.getPath('appData'), app.name)); | 196 | app.setPath('userData', path.join(app.getPath('appData'), app.name)); |
200 | } | 197 | } |
201 | 198 | ||
199 | export const isDevMode = !app.isPackaged; | ||
202 | if (isDevMode) { | 200 | if (isDevMode) { |
203 | app.setPath('userData', path.join(app.getPath('appData'), `${app.name}Dev`)); | 201 | app.setPath('userData', path.join(app.getPath('appData'), `${app.name}Dev`)); |
204 | } | 202 | } |