diff options
author | 2018-11-30 14:32:45 +0100 | |
---|---|---|
committer | 2018-11-30 14:32:45 +0100 | |
commit | 3d87c0e45cead95ddb6c11fc6540b82e375bdcf5 (patch) | |
tree | c91f425a39cb585242d6df5b4070de4a2141b3b4 /src/index.js | |
parent | Merge branch 'update/monetization' into develop (diff) | |
download | ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.tar.gz ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.tar.zst ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.zip |
feat(App): Improved spell checker & context menu
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/index.js b/src/index.js index 994531dbf..663f81cc9 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -1,10 +1,16 @@ | |||
1 | import { app, BrowserWindow, shell, ipcMain } from 'electron'; | 1 | import { app, BrowserWindow, shell, ipcMain } from 'electron'; |
2 | |||
2 | import fs from 'fs-extra'; | 3 | import fs from 'fs-extra'; |
3 | import path from 'path'; | 4 | import path from 'path'; |
4 | |||
5 | import windowStateKeeper from 'electron-window-state'; | 5 | import windowStateKeeper from 'electron-window-state'; |
6 | 6 | ||
7 | import { isDevMode, isMac, isWindows, isLinux } from './environment'; | 7 | import { isDevMode, isMac, isWindows, isLinux } from './environment'; |
8 | |||
9 | // DEV MODE: Save user data into FranzDev | ||
10 | if (isDevMode) { | ||
11 | app.setPath('userData', path.join(app.getPath('appData'), 'FranzDev')); | ||
12 | } | ||
13 | /* eslint-disable import/first */ | ||
8 | import ipcApi from './electron/ipc-api'; | 14 | import ipcApi from './electron/ipc-api'; |
9 | import Tray from './lib/Tray'; | 15 | import Tray from './lib/Tray'; |
10 | import Settings from './electron/Settings'; | 16 | import Settings from './electron/Settings'; |
@@ -13,6 +19,7 @@ import { appId } from './package.json'; // eslint-disable-line import/no-unresol | |||
13 | import './electron/exception'; | 19 | import './electron/exception'; |
14 | 20 | ||
15 | import { DEFAULT_APP_SETTINGS } from './config'; | 21 | import { DEFAULT_APP_SETTINGS } from './config'; |
22 | /* eslint-enable import/first */ | ||
16 | 23 | ||
17 | const debug = require('debug')('Franz:App'); | 24 | const debug = require('debug')('Franz:App'); |
18 | 25 | ||
@@ -21,11 +28,6 @@ const debug = require('debug')('Franz:App'); | |||
21 | let mainWindow; | 28 | let mainWindow; |
22 | let willQuitApp = false; | 29 | let willQuitApp = false; |
23 | 30 | ||
24 | // DEV MODE: Save user data into FranzDev | ||
25 | if (isDevMode) { | ||
26 | app.setPath('userData', path.join(app.getPath('appData'), 'FranzDev')); | ||
27 | } | ||
28 | |||
29 | // Ensure that the recipe directory exists | 31 | // Ensure that the recipe directory exists |
30 | fs.emptyDirSync(path.join(app.getPath('userData'), 'recipes', 'temp')); | 32 | fs.emptyDirSync(path.join(app.getPath('userData'), 'recipes', 'temp')); |
31 | fs.ensureFileSync(path.join(app.getPath('userData'), 'window-state.json')); | 33 | fs.ensureFileSync(path.join(app.getPath('userData'), 'window-state.json')); |