Updating presence icons for Windows
BIN
images/icon.ico
Before Width: | Height: | Size: 279 KiB After Width: | Height: | Size: 279 KiB |
@ -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(),
|
||||
|
@ -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;
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
dialog,
|
||||
Event,
|
||||
ipcMain,
|
||||
nativeImage,
|
||||
nativeTheme,
|
||||
RenderProcessGoneDetails,
|
||||
screen,
|
||||
|
@ -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);
|
||||
|
@ -251,5 +251,5 @@
|
||||
"OUT_OF_OFFICE": "Out of office",
|
||||
"BE_RIGHT_BACK": "Be right back"
|
||||
},
|
||||
"My presence": "My presence"
|
||||
"Status": "Status"
|
||||
}
|
||||
|
@ -251,5 +251,5 @@
|
||||
"OUT_OF_OFFICE": "Out of office",
|
||||
"BE_RIGHT_BACK": "Be right back"
|
||||
},
|
||||
"My presence": "My presence"
|
||||
"Status": "Status"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 527 B |
After Width: | Height: | Size: 279 KiB |
BIN
src/renderer/assets/presence-status/windows/dark/brb-tray.ico
Normal file
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 279 KiB |
BIN
src/renderer/assets/presence-status/windows/dark/busy-tray.ico
Normal file
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 527 B |
After Width: | Height: | Size: 279 KiB |
BIN
src/renderer/assets/presence-status/windows/light/brb-tray.ico
Normal file
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 279 KiB |
BIN
src/renderer/assets/presence-status/windows/light/busy-tray.ico
Normal file
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 279 KiB |
After Width: | Height: | Size: 279 KiB |
Before Width: | Height: | Size: 3.9 KiB |