SDA-4092: Clean Buttons (#1768)

This commit is contained in:
NguyenTranHoangSym 2023-03-14 17:14:42 +07:00 committed by GitHub
parent 828df78d57
commit f8db9e57d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -322,7 +322,11 @@ ipcMain.on(
* This gets called from mana, when user logs out
*/
case apiCmds.closeAllWrapperWindows:
const main = windowHandler.getMainWindow();
terminateC9Shell();
main?.setThumbarButtons([]);
presenceStatus.updateSignedOutContextMenu();
windowHandler.closeAllWindows();
break;
case apiCmds.setZoomLevel:

View File

@ -213,6 +213,18 @@ class PresenceStatus {
tray?.setContextMenu(contextMenu);
};
public updateSignedOutContextMenu = () => {
const tray = presenceStatusStore.getCurrentTray();
const contextDefault = Menu.buildFromTemplate([
{
label: i18n.t('Quit Symphony')(),
click: () => app.quit(),
},
]);
tray?.setContextMenu(contextDefault);
};
private handlePresenceChange = (
statusCategory: EPresenceStatusCategory,
statusGroup: EPresenceStatusGroup,