[MM-22618] Reorder tab menu items to match tab order (#1198)
* reorder tab menu items to match tab order * now reorder menu items on tray icon
This commit is contained in:
parent
59bc03d6ab
commit
e00f803fd3
|
@ -241,7 +241,7 @@ function createTemplate(mainWindow, config, isDev) {
|
|||
}, {
|
||||
role: 'close',
|
||||
accelerator: 'CmdOrCtrl+W',
|
||||
}, separatorItem, ...teams.slice(0, 9).map((team, i) => {
|
||||
}, separatorItem, ...teams.slice(0, 9).sort((teamA, teamB) => teamA.order - teamB.order).map((team, i) => {
|
||||
return {
|
||||
label: team.name,
|
||||
accelerator: `CmdOrCtrl+${i + 1}`,
|
||||
|
|
|
@ -9,7 +9,7 @@ function createTemplate(mainWindow, config, isDev) {
|
|||
const settingsURL = isDev ? 'http://localhost:8080/browser/settings.html' : `file://${app.getAppPath()}/browser/settings.html`;
|
||||
const teams = config.teams;
|
||||
const template = [
|
||||
...teams.slice(0, 9).map((team, i) => {
|
||||
...teams.slice(0, 9).sort((teamA, teamB) => teamA.order - teamB.order).map((team, i) => {
|
||||
return {
|
||||
label: team.name,
|
||||
click: () => {
|
||||
|
|
Loading…
Reference in a new issue