diff options
author | 2020-02-21 17:06:47 +0100 | |
---|---|---|
committer | 2020-02-21 17:06:47 +0100 | |
commit | 5d36215319d5037a38cb8b4499233465918d4523 (patch) | |
tree | 549cbf0d3814a4204e7e549f2a18fbf76fb82e49 /src | |
parent | Improve bug report template (diff) | |
download | ferdium-app-5d36215319d5037a38cb8b4499233465918d4523.tar.gz ferdium-app-5d36215319d5037a38cb8b4499233465918d4523.tar.zst ferdium-app-5d36215319d5037a38cb8b4499233465918d4523.zip |
Replace deprecated call to getName, use name instead
Diffstat (limited to 'src')
-rw-r--r-- | src/config.js | 9 | ||||
-rw-r--r-- | src/index.js | 8 | ||||
-rw-r--r-- | src/lib/Menu.js | 2 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/config.js b/src/config.js index d19a4b8b4..895852ed8 100644 --- a/src/config.js +++ b/src/config.js | |||
@@ -1,8 +1,7 @@ | |||
1 | import electron from 'electron'; | 1 | import electron from 'electron'; |
2 | import path from 'path'; | ||
3 | import isDevMode from 'electron-is-dev'; | 2 | import isDevMode from 'electron-is-dev'; |
4 | import ms from 'ms'; | 3 | import ms from 'ms'; |
5 | 4 | import path from 'path'; | |
6 | import { asarPath } from './helpers/asar-helpers'; | 5 | import { asarPath } from './helpers/asar-helpers'; |
7 | 6 | ||
8 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; | 7 | const app = process.type === 'renderer' ? electron.remote.app : electron.app; |
@@ -126,11 +125,11 @@ if (process.env.FERDI_APPDATA_DIR != null) { | |||
126 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | 125 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); |
127 | app.setPath('userData', path.join(app.getPath('appData'))); | 126 | app.setPath('userData', path.join(app.getPath('appData'))); |
128 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { | 127 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { |
129 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}AppData`); | 128 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.name}AppData`); |
130 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}AppData`)); | 129 | app.setPath('userData', path.join(app.getPath('appData'), `${app.name}AppData`)); |
131 | } else if (process.platform === 'win32') { | 130 | } else if (process.platform === 'win32') { |
132 | app.setPath('appData', process.env.APPDATA); | 131 | app.setPath('appData', process.env.APPDATA); |
133 | app.setPath('userData', path.join(app.getPath('appData'), app.getName())); | 132 | app.setPath('userData', path.join(app.getPath('appData'), app.name)); |
134 | } | 133 | } |
135 | 134 | ||
136 | export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); | 135 | export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); |
diff --git a/src/index.js b/src/index.js index 46230abd6..167d3897a 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -14,15 +14,15 @@ if (process.env.FERDI_APPDATA_DIR != null) { | |||
14 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); | 14 | app.setPath('appData', process.env.FERDI_APPDATA_DIR); |
15 | app.setPath('userData', path.join(app.getPath('appData'))); | 15 | app.setPath('userData', path.join(app.getPath('appData'))); |
16 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { | 16 | } else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { |
17 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}AppData`); | 17 | app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.name}AppData`); |
18 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}AppData`)); | 18 | app.setPath('userData', path.join(app.getPath('appData'), `${app.name}AppData`)); |
19 | } else if (process.platform === 'win32') { | 19 | } else if (process.platform === 'win32') { |
20 | app.setPath('appData', process.env.APPDATA); | 20 | app.setPath('appData', process.env.APPDATA); |
21 | app.setPath('userData', path.join(app.getPath('appData'), app.getName())); | 21 | app.setPath('userData', path.join(app.getPath('appData'), app.name)); |
22 | } | 22 | } |
23 | 23 | ||
24 | if (isDevMode) { | 24 | if (isDevMode) { |
25 | app.setPath('userData', path.join(app.getPath('appData'), `${app.getName()}Dev`)); | 25 | app.setPath('userData', path.join(app.getPath('appData'), `${app.name}Dev`)); |
26 | } | 26 | } |
27 | 27 | ||
28 | /* eslint-disable import/first */ | 28 | /* eslint-disable import/first */ |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 6167f1c59..f2669a106 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -825,7 +825,7 @@ export default class FranzMenu { | |||
825 | }); | 825 | }); |
826 | 826 | ||
827 | tpl.unshift({ | 827 | tpl.unshift({ |
828 | label: isMac ? app.getName() : intl.formatMessage(menuItems.file), | 828 | label: isMac ? app.name : intl.formatMessage(menuItems.file), |
829 | accelerator: 'Alt+F', | 829 | accelerator: 'Alt+F', |
830 | submenu: [ | 830 | submenu: [ |
831 | { | 831 | { |