diff options
author | 2021-08-08 00:01:37 +0000 | |
---|---|---|
committer | 2021-08-08 05:31:37 +0530 | |
commit | 97d51a7763b14c92ee71ff9a012311dd9498d803 (patch) | |
tree | bd36005031ecb1148f27aa541e7a92a5e3aa4c0c /src/electron/ipc-api/appIndicator.js | |
parent | 5.6.1-nightly.17 [skip ci] (diff) | |
download | ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.gz ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.zst ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.zip |
refactor: path-references refactoring and using 'import' instead of 'require' (#1752)
* refactor references to 'userData' and 'appData' directories to move hardcoding into single location
* convert to es6 for lower memory usage as per https://codesource.io/the-difference-between-import-and-require-in-javascript/
Diffstat (limited to 'src/electron/ipc-api/appIndicator.js')
-rw-r--r-- | src/electron/ipc-api/appIndicator.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/electron/ipc-api/appIndicator.js b/src/electron/ipc-api/appIndicator.js index 0691e5170..c6c261d0f 100644 --- a/src/electron/ipc-api/appIndicator.js +++ b/src/electron/ipc-api/appIndicator.js | |||
@@ -1,5 +1,5 @@ | |||
1 | import { app, ipcMain } from 'electron'; | 1 | import { app, ipcMain } from 'electron'; |
2 | import path from 'path'; | 2 | import { join } from 'path'; |
3 | import { autorun } from 'mobx'; | 3 | import { autorun } from 'mobx'; |
4 | import { isMac, isWindows, isLinux } from '../../environment'; | 4 | import { isMac, isWindows, isLinux } from '../../environment'; |
5 | 5 | ||
@@ -9,7 +9,7 @@ const FILE_EXTENSION = isWindows ? 'ico' : 'png'; | |||
9 | let isTrayIconEnabled; | 9 | let isTrayIconEnabled; |
10 | 10 | ||
11 | function getAsset(type, asset) { | 11 | function getAsset(type, asset) { |
12 | return path.join( | 12 | return join( |
13 | __dirname, '..', '..', 'assets', 'images', type, process.platform, `${asset}.${FILE_EXTENSION}`, | 13 | __dirname, '..', '..', 'assets', 'images', type, process.platform, `${asset}.${FILE_EXTENSION}`, |
14 | ); | 14 | ); |
15 | } | 15 | } |