Update prettier/eslint
This commit is contained in:
@@ -1,12 +1,4 @@
|
||||
const {
|
||||
app,
|
||||
BrowserWindow,
|
||||
dialog,
|
||||
ipcMain,
|
||||
Menu,
|
||||
nativeImage,
|
||||
Tray,
|
||||
} = require('electron');
|
||||
const { app, BrowserWindow, dialog, ipcMain, Menu, nativeImage, Tray } = require('electron');
|
||||
const AutoLaunch = require('auto-launch');
|
||||
const Constants = require('../src/constants');
|
||||
const fs = require('fs');
|
||||
@@ -44,8 +36,8 @@ const UpgradeIPC = require('../src/renderer/ipc/UpgradeIPC');
|
||||
const platform = os.platform();
|
||||
|
||||
const dimensions = {
|
||||
height: platform === "win32" || platform === "darwin" ? 420 : 400,
|
||||
width: platform === "win32" ? 468 : 628
|
||||
height: platform === 'win32' || platform === 'darwin' ? 420 : 400,
|
||||
width: platform === 'win32' ? 468 : 628,
|
||||
};
|
||||
|
||||
let isShutdown = false;
|
||||
@@ -146,9 +138,7 @@ const createWindow = () => {
|
||||
platform === 'win32'
|
||||
? path.resolve(path.join(app.getAppPath(), '..\\..\\repertory-ui.exe'))
|
||||
: platform === 'darwin'
|
||||
? path.resolve(
|
||||
path.join(path.dirname(app.getAppPath()), '../MacOS/repertory-ui')
|
||||
)
|
||||
? path.resolve(path.join(path.dirname(app.getAppPath()), '../MacOS/repertory-ui'))
|
||||
: process.env.APPIMAGE;
|
||||
|
||||
const autoLauncher = new AutoLaunch({
|
||||
@@ -206,10 +196,7 @@ const createWindow = () => {
|
||||
]);
|
||||
|
||||
const image = nativeImage.createFromPath(
|
||||
path.join(
|
||||
__dirname,
|
||||
platform === 'darwin' ? '../build/logo_mac.png' : '../build/logo.png'
|
||||
)
|
||||
path.join(__dirname, platform === 'darwin' ? '../build/logo_mac.png' : '../build/logo.png')
|
||||
);
|
||||
mainWindowTray = new Tray(image);
|
||||
|
||||
@@ -232,10 +219,7 @@ const getMainWindow = () => {
|
||||
};
|
||||
|
||||
const loadUiSettings = () => {
|
||||
const settingFile = path.join(
|
||||
helpers.resolvePath(Constants.DATA_LOCATIONS[platform]),
|
||||
'ui.json'
|
||||
);
|
||||
const settingFile = path.join(helpers.resolvePath(Constants.DATA_LOCATIONS[platform]), 'ui.json');
|
||||
try {
|
||||
if (fs.statSync(settingFile).isFile()) {
|
||||
const settings = JSON.parse(fs.readFileSync(settingFile, 'utf8'));
|
||||
@@ -271,17 +255,12 @@ const setTrayImage = (driveInUse) => {
|
||||
image = nativeImage.createFromPath(
|
||||
path.join(
|
||||
__dirname,
|
||||
platform === 'darwin'
|
||||
? '../build/logo_both_mac.png'
|
||||
: '../build/logo_both.png'
|
||||
platform === 'darwin' ? '../build/logo_both_mac.png' : '../build/logo_both.png'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
image = nativeImage.createFromPath(
|
||||
path.join(
|
||||
__dirname,
|
||||
platform === 'darwin' ? '../build/logo_mac.png' : '../build/logo.png'
|
||||
)
|
||||
path.join(__dirname, platform === 'darwin' ? '../build/logo_mac.png' : '../build/logo.png')
|
||||
);
|
||||
}
|
||||
mainWindowTray.setImage(image);
|
||||
|
||||
Reference in New Issue
Block a user