invoke yarn fix:js
to adopt the updated eslint rules. No other changes are included.
This commit is contained in:
@@ -10,7 +10,7 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
const settingsURL = isDev ? 'http://localhost:8080/browser/settings.html' : `file://${electron.app.getAppPath()}/browser/settings.html`;
|
||||
|
||||
const separatorItem = {
|
||||
type: 'separator'
|
||||
type: 'separator',
|
||||
};
|
||||
|
||||
var appName = electron.app.getName();
|
||||
@@ -23,21 +23,21 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
click() {
|
||||
electron.dialog.showMessageBox(mainWindow, {
|
||||
buttons: ['OK'],
|
||||
message: `${appName} Desktop ${electron.app.getVersion()}`
|
||||
message: `${appName} Desktop ${electron.app.getVersion()}`,
|
||||
});
|
||||
}
|
||||
},
|
||||
}, separatorItem, {
|
||||
label: 'Preferences...',
|
||||
accelerator: 'CmdOrCtrl+,',
|
||||
click() {
|
||||
mainWindow.loadURL(settingsURL);
|
||||
}
|
||||
},
|
||||
}] : [{
|
||||
label: 'Settings...',
|
||||
accelerator: 'CmdOrCtrl+,',
|
||||
click() {
|
||||
mainWindow.loadURL(settingsURL);
|
||||
}
|
||||
},
|
||||
}];
|
||||
|
||||
if (buildConfig.enableServerManagement === true) {
|
||||
@@ -45,49 +45,49 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
label: 'Sign in to Another Server',
|
||||
click() {
|
||||
mainWindow.webContents.send('add-server');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
platformAppMenu = platformAppMenu.concat(process.platform === 'darwin' ? [
|
||||
separatorItem, {
|
||||
role: 'hide'
|
||||
role: 'hide',
|
||||
}, {
|
||||
role: 'hideothers'
|
||||
role: 'hideothers',
|
||||
}, {
|
||||
role: 'unhide'
|
||||
role: 'unhide',
|
||||
}, separatorItem, {
|
||||
role: 'quit'
|
||||
role: 'quit',
|
||||
}] : [separatorItem, {
|
||||
role: 'quit',
|
||||
accelerator: 'CmdOrCtrl+Q',
|
||||
click() {
|
||||
electron.app.quit();
|
||||
}
|
||||
},
|
||||
}]
|
||||
);
|
||||
|
||||
template.push({
|
||||
label: '&' + firstMenuName,
|
||||
submenu: [
|
||||
...platformAppMenu
|
||||
]
|
||||
...platformAppMenu,
|
||||
],
|
||||
});
|
||||
template.push({
|
||||
label: '&Edit',
|
||||
submenu: [{
|
||||
role: 'undo'
|
||||
role: 'undo',
|
||||
}, {
|
||||
role: 'redo'
|
||||
role: 'redo',
|
||||
}, separatorItem, {
|
||||
role: 'cut'
|
||||
role: 'cut',
|
||||
}, {
|
||||
role: 'copy'
|
||||
role: 'copy',
|
||||
}, {
|
||||
role: 'paste'
|
||||
role: 'paste',
|
||||
}, {
|
||||
role: 'selectall'
|
||||
}]
|
||||
role: 'selectall',
|
||||
}],
|
||||
});
|
||||
template.push({
|
||||
label: '&View',
|
||||
@@ -102,7 +102,7 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
focusedWindow.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}, {
|
||||
label: 'Clear Cache and Reload',
|
||||
accelerator: 'Shift+CmdOrCtrl+R',
|
||||
@@ -116,25 +116,25 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}, {
|
||||
role: 'togglefullscreen'
|
||||
role: 'togglefullscreen',
|
||||
}, separatorItem, {
|
||||
role: 'resetzoom'
|
||||
role: 'resetzoom',
|
||||
}, {
|
||||
role: 'zoomin'
|
||||
role: 'zoomin',
|
||||
}, {
|
||||
label: 'Zoom In (hidden)',
|
||||
accelerator: 'CmdOrCtrl+=',
|
||||
visible: false,
|
||||
role: 'zoomin'
|
||||
role: 'zoomin',
|
||||
}, {
|
||||
role: 'zoomout'
|
||||
role: 'zoomout',
|
||||
}, {
|
||||
label: 'Zoom Out (hidden)',
|
||||
accelerator: 'CmdOrCtrl+Shift+-',
|
||||
visible: false,
|
||||
role: 'zoomout'
|
||||
role: 'zoomout',
|
||||
}, separatorItem, {
|
||||
label: 'Toggle Developer Tools',
|
||||
accelerator: (() => {
|
||||
@@ -147,8 +147,8 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
if (focusedWindow) {
|
||||
focusedWindow.toggleDevTools();
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
}],
|
||||
});
|
||||
template.push({
|
||||
label: '&History',
|
||||
@@ -161,7 +161,7 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
} else if (focusedWindow.webContents.canGoBack()) {
|
||||
focusedWindow.goBack();
|
||||
}
|
||||
}
|
||||
},
|
||||
}, {
|
||||
label: 'Forward',
|
||||
accelerator: process.platform === 'darwin' ? 'Cmd+]' : 'Alt+Right',
|
||||
@@ -171,17 +171,17 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
} else if (focusedWindow.webContents.canGoForward()) {
|
||||
focusedWindow.goForward();
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
}],
|
||||
});
|
||||
|
||||
const teams = settings.mergeDefaultTeams(config.teams);
|
||||
const windowMenu = {
|
||||
label: '&Window',
|
||||
submenu: [{
|
||||
role: 'minimize'
|
||||
role: 'minimize',
|
||||
}, {
|
||||
role: 'close'
|
||||
role: 'close',
|
||||
}, separatorItem, ...teams.slice(0, 9).map((team, i) => {
|
||||
return {
|
||||
label: team.name,
|
||||
@@ -189,7 +189,7 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
click() {
|
||||
mainWindow.show(); // for OS X
|
||||
mainWindow.webContents.send('switch-tab', i);
|
||||
}
|
||||
},
|
||||
};
|
||||
}), separatorItem, {
|
||||
label: 'Select Next Server',
|
||||
@@ -197,15 +197,15 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
click() {
|
||||
mainWindow.webContents.send('select-next-tab');
|
||||
},
|
||||
enabled: (teams.length > 1)
|
||||
enabled: (teams.length > 1),
|
||||
}, {
|
||||
label: 'Select Previous Server',
|
||||
accelerator: 'Ctrl+Shift+Tab',
|
||||
click() {
|
||||
mainWindow.webContents.send('select-previous-tab');
|
||||
},
|
||||
enabled: (teams.length > 1)
|
||||
}]
|
||||
enabled: (teams.length > 1),
|
||||
}],
|
||||
};
|
||||
template.push(windowMenu);
|
||||
var submenu = [];
|
||||
@@ -214,13 +214,13 @@ function createTemplate(mainWindow, config, isDev) {
|
||||
label: 'Learn More...',
|
||||
click() {
|
||||
electron.shell.openExternal(buildConfig.helpLink);
|
||||
}
|
||||
},
|
||||
});
|
||||
submenu.push(separatorItem);
|
||||
}
|
||||
submenu.push({
|
||||
label: `Version ${electron.app.getVersion()}`,
|
||||
enabled: false
|
||||
enabled: false,
|
||||
});
|
||||
template.push({label: '&Help', submenu});
|
||||
return template;
|
||||
@@ -231,5 +231,5 @@ function createMenu(mainWindow, config, isDev) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createMenu
|
||||
createMenu,
|
||||
};
|
||||
|
Reference in New Issue
Block a user