diff --git a/images/icon.ico b/images/icon.ico index 2870483e..f93720cb 100644 Binary files a/images/icon.ico and b/images/icon.ico differ diff --git a/src/app/presence-status-handler.ts b/src/app/presence-status-handler.ts index 727c9273..da0010b2 100644 --- a/src/app/presence-status-handler.ts +++ b/src/app/presence-status-handler.ts @@ -116,43 +116,47 @@ class PresenceStatus { const isMana = !!windowHandler.isMana; const contextMenu = Menu.buildFromTemplate([ { - label: i18n.t('My presence')(), + label: i18n.t('Status')(), visible: isMana, - submenu: [ - { - label: i18n.t(EPresenceStatus.AVAILABLE, presenceNamespace)(), - type: 'checkbox', - checked: currentStatus === EPresenceStatus.AVAILABLE, - click: () => { - this.handlePresenceChange(EPresenceStatus.AVAILABLE); - }, - }, - { - label: i18n.t(EPresenceStatus.BUSY, presenceNamespace)(), - type: 'checkbox', - checked: currentStatus === EPresenceStatus.BUSY, - click: () => { - this.handlePresenceChange(EPresenceStatus.BUSY); - }, - }, - { - label: i18n.t(EPresenceStatus.BE_RIGHT_BACK, presenceNamespace)(), - type: 'checkbox', - checked: currentStatus === EPresenceStatus.BE_RIGHT_BACK, - click: () => { - this.handlePresenceChange(EPresenceStatus.BE_RIGHT_BACK); - }, - }, - { - label: i18n.t(EPresenceStatus.OUT_OF_OFFICE, presenceNamespace)(), - type: 'checkbox', - checked: currentStatus === EPresenceStatus.OUT_OF_OFFICE, - click: () => { - this.handlePresenceChange(EPresenceStatus.OUT_OF_OFFICE); - }, - }, - ], + enabled: false, }, + { + label: i18n.t(EPresenceStatus.AVAILABLE, presenceNamespace)(), + type: 'checkbox', + visible: isMana, + checked: currentStatus === EPresenceStatus.AVAILABLE, + click: () => { + this.handlePresenceChange(EPresenceStatus.AVAILABLE); + }, + }, + { + label: i18n.t(EPresenceStatus.BUSY, presenceNamespace)(), + type: 'checkbox', + visible: isMana, + checked: currentStatus === EPresenceStatus.BUSY, + click: () => { + this.handlePresenceChange(EPresenceStatus.BUSY); + }, + }, + { + label: i18n.t(EPresenceStatus.BE_RIGHT_BACK, presenceNamespace)(), + type: 'checkbox', + visible: isMana, + checked: currentStatus === EPresenceStatus.BE_RIGHT_BACK, + click: () => { + this.handlePresenceChange(EPresenceStatus.BE_RIGHT_BACK); + }, + }, + { + label: i18n.t(EPresenceStatus.OUT_OF_OFFICE, presenceNamespace)(), + type: 'checkbox', + visible: isMana, + checked: currentStatus === EPresenceStatus.OUT_OF_OFFICE, + click: () => { + this.handlePresenceChange(EPresenceStatus.OUT_OF_OFFICE); + }, + }, + { type: 'separator', visible: isMana }, { label: i18n.t('Quit Symphony')(), click: () => app.quit(), diff --git a/src/app/stores/presence-status-store.ts b/src/app/stores/presence-status-store.ts index 8b80fb92..c0b31d5a 100644 --- a/src/app/stores/presence-status-store.ts +++ b/src/app/stores/presence-status-store.ts @@ -51,45 +51,45 @@ export class PresenceStatus { const os = isWindowsOS ? 'windows' : isMac ? 'macOS' : 'linux'; const theme = nativeTheme.shouldUseDarkColors ? 'light' : 'dark'; const assetsPath = `src/renderer/assets/presence-status/${os}/${theme}`; - + let fileExtension = 'png'; + let iconPlace = ''; + switch (place) { + case 'tray': + iconPlace = '-tray'; + fileExtension = isWindowsOS ? 'ico' : isMac ? 'png' : 'png'; + break; + case 'thumbnail': + iconPlace = '-thumbnail'; + fileExtension = 'ico'; + break; + default: + break; + } switch (status) { case EPresenceStatus.AVAILABLE: - backgroundImage = `../../../${assetsPath}/${ - place === 'tray' ? 'online-tray.png' : 'online.png' - }`; + backgroundImage = `../../../${assetsPath}/${`available${iconPlace}.${fileExtension}`}`; break; case EPresenceStatus.BUSY: - backgroundImage = `../../../${assetsPath}/${ - place === 'tray' ? 'busy-tray.png' : 'busy.png' - }`; + backgroundImage = `../../../${assetsPath}/busy${iconPlace}.${fileExtension}`; break; case EPresenceStatus.BE_RIGHT_BACK || EPresenceStatus.AWAY: - backgroundImage = `../../../${assetsPath}/${ - place === 'tray' ? 'brb-tray.png' : 'brb.png' - }`; + backgroundImage = `../../../${assetsPath}/brb${iconPlace}.${fileExtension}`; break; case EPresenceStatus.OFFLINE: - backgroundImage = `../../../${assetsPath}/${ - place === 'tray' ? 'offline-tray.png' : 'offline.png' - }`; + backgroundImage = `../../../${assetsPath}/offline${iconPlace}.${fileExtension}`; break; case EPresenceStatus.OUT_OF_OFFICE: - backgroundImage = `../../../${assetsPath}/${ - place === 'tray' ? 'out-of-office-tray.png' : 'out-of-office.png' - }`; + backgroundImage = `../../../${assetsPath}/out-of-office${iconPlace}.${fileExtension}`; break; case EPresenceStatus.IN_A_MEETING: - backgroundImage = `../../../${assetsPath}/${ - place === 'tray' ? 'in-a-meeting-tray.png' : 'in-a-meeting.png' - }`; + backgroundImage = `../../../${assetsPath}/in-a-meeting${iconPlace}.${fileExtension}`; break; case EPresenceStatus.NO_PRESENCE: - backgroundImage = - place === 'tray' ? `../../../${assetsPath}/no-status-tray.png` : ''; + backgroundImage = `../../../${assetsPath}/no-status${iconPlace}.${fileExtension}`; break; default: break; diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index e5eaa4bd..679e4245 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -9,6 +9,7 @@ import { dialog, Event, ipcMain, + nativeImage, nativeTheme, RenderProcessGoneDetails, screen, diff --git a/src/app/window-utils.ts b/src/app/window-utils.ts index b6155379..27b9d627 100644 --- a/src/app/window-utils.ts +++ b/src/app/window-utils.ts @@ -304,14 +304,15 @@ export const showBadgeCount = (count: number): void => { * Creates sys tray */ export const initSysTray = () => { - const defaultSysTrayIcon = 'no-status-tray.png'; + const defaultSysTrayIcon = 'no-status-tray'; + const defaultSysTrayIconExtension = isWindowsOS ? 'ico' : 'png'; const os = isWindowsOS ? 'windows' : isMac ? 'macOS' : 'linux'; const theme = nativeTheme.shouldUseDarkColors ? 'light' : 'dark'; logger.info('theme: ', theme, nativeTheme.themeSource); const assetsPath = `renderer/assets/presence-status/${os}/${theme}`; const defaultSysTrayIconPath = path.join( __dirname, - `../${assetsPath}/${defaultSysTrayIcon}`, + `../${assetsPath}/${defaultSysTrayIcon}.${defaultSysTrayIconExtension}`, ); const backgroundImage = nativeImage.createFromPath(defaultSysTrayIconPath); const tray = new Tray(backgroundImage); diff --git a/src/locale/en-US.json b/src/locale/en-US.json index e1c7bbf7..c7130037 100644 --- a/src/locale/en-US.json +++ b/src/locale/en-US.json @@ -251,5 +251,5 @@ "OUT_OF_OFFICE": "Out of office", "BE_RIGHT_BACK": "Be right back" }, - "My presence": "My presence" + "Status": "Status" } diff --git a/src/locale/en.json b/src/locale/en.json index 508ed76f..3646cd0a 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -251,5 +251,5 @@ "OUT_OF_OFFICE": "Out of office", "BE_RIGHT_BACK": "Be right back" }, - "My presence": "My presence" + "Status": "Status" } diff --git a/src/renderer/assets/presence-status/macOS/dark/online-tray.png b/src/renderer/assets/presence-status/macOS/dark/available-tray.png similarity index 100% rename from src/renderer/assets/presence-status/macOS/dark/online-tray.png rename to src/renderer/assets/presence-status/macOS/dark/available-tray.png diff --git a/src/renderer/assets/presence-status/macOS/light/online-tray.png b/src/renderer/assets/presence-status/macOS/light/available-tray.png similarity index 100% rename from src/renderer/assets/presence-status/macOS/light/online-tray.png rename to src/renderer/assets/presence-status/macOS/light/available-tray.png diff --git a/src/renderer/assets/presence-status/windows/dark/available-thumbnail.ico b/src/renderer/assets/presence-status/windows/dark/available-thumbnail.ico new file mode 100644 index 00000000..64d11d1c Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/available-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/available-tray-old.ico b/src/renderer/assets/presence-status/windows/dark/available-tray-old.ico new file mode 100644 index 00000000..06962a73 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/available-tray-old.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/available-tray.ico b/src/renderer/assets/presence-status/windows/dark/available-tray.ico new file mode 100644 index 00000000..4e6681c8 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/available-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/online.png b/src/renderer/assets/presence-status/windows/dark/available.png similarity index 100% rename from src/renderer/assets/presence-status/windows/dark/online.png rename to src/renderer/assets/presence-status/windows/dark/available.png diff --git a/src/renderer/assets/presence-status/windows/dark/brb-thumbnail.ico b/src/renderer/assets/presence-status/windows/dark/brb-thumbnail.ico new file mode 100644 index 00000000..404b5fad Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/brb-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/brb-tray.ico b/src/renderer/assets/presence-status/windows/dark/brb-tray.ico new file mode 100644 index 00000000..26cc1fde Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/brb-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/brb-tray.png b/src/renderer/assets/presence-status/windows/dark/brb-tray.png deleted file mode 100644 index a23d86cc..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/brb-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/dark/busy-thumbnail.ico b/src/renderer/assets/presence-status/windows/dark/busy-thumbnail.ico new file mode 100644 index 00000000..b5ab1004 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/busy-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/busy-tray.ico b/src/renderer/assets/presence-status/windows/dark/busy-tray.ico new file mode 100644 index 00000000..28fb5330 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/busy-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/busy-tray.png b/src/renderer/assets/presence-status/windows/dark/busy-tray.png deleted file mode 100644 index 7e503584..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/busy-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/dark/in-a-call-tray.png b/src/renderer/assets/presence-status/windows/dark/in-a-call-tray.png deleted file mode 100644 index 0352053a..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/in-a-call-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/dark/in-a-meeting-thumbnail.ico b/src/renderer/assets/presence-status/windows/dark/in-a-meeting-thumbnail.ico new file mode 100644 index 00000000..9326b198 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/in-a-meeting-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/in-a-meeting-tray.ico b/src/renderer/assets/presence-status/windows/dark/in-a-meeting-tray.ico new file mode 100644 index 00000000..590b1c67 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/in-a-meeting-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/no-status-tray.ico b/src/renderer/assets/presence-status/windows/dark/no-status-tray.ico new file mode 100644 index 00000000..a770ac1e Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/no-status-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/no-status-tray.png b/src/renderer/assets/presence-status/windows/dark/no-status-tray.png deleted file mode 100644 index 8c91b5fd..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/no-status-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/dark/offline-thumbnail.ico b/src/renderer/assets/presence-status/windows/dark/offline-thumbnail.ico new file mode 100644 index 00000000..b59cbeea Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/offline-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/offline-tray.ico b/src/renderer/assets/presence-status/windows/dark/offline-tray.ico new file mode 100644 index 00000000..110e2df3 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/offline-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/offline-tray.png b/src/renderer/assets/presence-status/windows/dark/offline-tray.png deleted file mode 100644 index d22fcca3..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/offline-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/dark/online-tray.png b/src/renderer/assets/presence-status/windows/dark/online-tray.png deleted file mode 100644 index 359182d5..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/online-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/dark/out-of-office-thumbnail.ico b/src/renderer/assets/presence-status/windows/dark/out-of-office-thumbnail.ico new file mode 100644 index 00000000..6e961234 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/out-of-office-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/out-of-office-tray.ico b/src/renderer/assets/presence-status/windows/dark/out-of-office-tray.ico new file mode 100644 index 00000000..c8fe31c9 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/dark/out-of-office-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/dark/out-of-office-tray.png b/src/renderer/assets/presence-status/windows/dark/out-of-office-tray.png deleted file mode 100644 index 7bfe9443..00000000 Binary files a/src/renderer/assets/presence-status/windows/dark/out-of-office-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/available-thumbnail.ico b/src/renderer/assets/presence-status/windows/light/available-thumbnail.ico new file mode 100644 index 00000000..64d11d1c Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/available-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/available-tray-old.ico b/src/renderer/assets/presence-status/windows/light/available-tray-old.ico new file mode 100644 index 00000000..06962a73 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/available-tray-old.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/available-tray.ico b/src/renderer/assets/presence-status/windows/light/available-tray.ico new file mode 100644 index 00000000..4e6681c8 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/available-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/online.png b/src/renderer/assets/presence-status/windows/light/available.png similarity index 100% rename from src/renderer/assets/presence-status/windows/light/online.png rename to src/renderer/assets/presence-status/windows/light/available.png diff --git a/src/renderer/assets/presence-status/windows/light/brb-thumbnail.ico b/src/renderer/assets/presence-status/windows/light/brb-thumbnail.ico new file mode 100644 index 00000000..404b5fad Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/brb-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/brb-tray.ico b/src/renderer/assets/presence-status/windows/light/brb-tray.ico new file mode 100644 index 00000000..26cc1fde Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/brb-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/brb-tray.png b/src/renderer/assets/presence-status/windows/light/brb-tray.png deleted file mode 100644 index a23d86cc..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/brb-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/busy-thumbnail.ico b/src/renderer/assets/presence-status/windows/light/busy-thumbnail.ico new file mode 100644 index 00000000..b5ab1004 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/busy-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/busy-tray.ico b/src/renderer/assets/presence-status/windows/light/busy-tray.ico new file mode 100644 index 00000000..28fb5330 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/busy-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/busy-tray.png b/src/renderer/assets/presence-status/windows/light/busy-tray.png deleted file mode 100644 index 7e503584..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/busy-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/in-a-call-tray.png b/src/renderer/assets/presence-status/windows/light/in-a-call-tray.png deleted file mode 100644 index 0352053a..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/in-a-call-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/in-a-meeting-thumbnail.ico b/src/renderer/assets/presence-status/windows/light/in-a-meeting-thumbnail.ico new file mode 100644 index 00000000..9326b198 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/in-a-meeting-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/in-a-meeting-tray.ico b/src/renderer/assets/presence-status/windows/light/in-a-meeting-tray.ico new file mode 100644 index 00000000..590b1c67 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/in-a-meeting-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/no-status-tray.ico b/src/renderer/assets/presence-status/windows/light/no-status-tray.ico new file mode 100644 index 00000000..a770ac1e Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/no-status-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/no-status-tray.png b/src/renderer/assets/presence-status/windows/light/no-status-tray.png deleted file mode 100644 index 8c91b5fd..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/no-status-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/offline-thumbnail.ico b/src/renderer/assets/presence-status/windows/light/offline-thumbnail.ico new file mode 100644 index 00000000..b59cbeea Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/offline-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/offline-tray.ico b/src/renderer/assets/presence-status/windows/light/offline-tray.ico new file mode 100644 index 00000000..110e2df3 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/offline-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/offline-tray.png b/src/renderer/assets/presence-status/windows/light/offline-tray.png deleted file mode 100644 index d22fcca3..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/offline-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/online-tray.png b/src/renderer/assets/presence-status/windows/light/online-tray.png deleted file mode 100644 index 359182d5..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/online-tray.png and /dev/null differ diff --git a/src/renderer/assets/presence-status/windows/light/out-of-office-thumbnail.ico b/src/renderer/assets/presence-status/windows/light/out-of-office-thumbnail.ico new file mode 100644 index 00000000..6e961234 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/out-of-office-thumbnail.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/out-of-office-tray.ico b/src/renderer/assets/presence-status/windows/light/out-of-office-tray.ico new file mode 100644 index 00000000..c8fe31c9 Binary files /dev/null and b/src/renderer/assets/presence-status/windows/light/out-of-office-tray.ico differ diff --git a/src/renderer/assets/presence-status/windows/light/out-of-office-tray.png b/src/renderer/assets/presence-status/windows/light/out-of-office-tray.png deleted file mode 100644 index 7bfe9443..00000000 Binary files a/src/renderer/assets/presence-status/windows/light/out-of-office-tray.png and /dev/null differ