Skip to content

Commit

Permalink
Merge pull request #5988 from rak-phillip/bugfix/5854-snapshots-disab…
Browse files Browse the repository at this point in the history
…le-quit

Disable quit in tray during snapshot process
  • Loading branch information
rak-phillip authored Nov 17, 2023
2 parents f86b862 + babe2be commit 986a836
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/rancher-desktop/main/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export class Tray {
},
{ type: 'separator' },
{
id: 'quit',
label: 'Quit Rancher Desktop',
role: 'quit',
type: 'normal',
Expand Down Expand Up @@ -351,11 +352,11 @@ export class Tray {
networkStatusItem.label = `Network status: ${ this.currentNetworkStatus }`;
}

for (const item of this.contextMenuItems) {
if (item.id === 'preferences' || item.id === 'dashboard' || item.id === 'contexts') {
this.contextMenuItems
.filter(item => item.id && ['preferences', 'dashboard', 'contexts', 'quit'].includes(item.id))
.forEach((item) => {
item.enabled = !this.backendIsLocked;
}
}
});

const contextMenu = Electron.Menu.buildFromTemplate(this.contextMenuItems);

Expand Down

0 comments on commit 986a836

Please sign in to comment.