mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
SDA-2091 - Only pass required data via IPC (#1003)
This commit is contained in:
parent
d382d46ea1
commit
b7bafe932f
@ -119,8 +119,9 @@ type Theme = '' | 'light' | 'dark';
|
||||
export interface INotificationData {
|
||||
id: number;
|
||||
title: string;
|
||||
text: string;
|
||||
body: string;
|
||||
image: string;
|
||||
icon: string;
|
||||
flash: boolean;
|
||||
color: string;
|
||||
tag: string;
|
||||
|
@ -320,6 +320,9 @@
|
||||
alert('error=' + event.result);
|
||||
};
|
||||
ssfNotificationHandler.addEventListener('error', onerror);
|
||||
} else if (window.manaSSF) {
|
||||
const callback = () => { console.log('notification clicked') };
|
||||
window.manaSSF.showNotification(notf, callback);
|
||||
} else {
|
||||
window.postMessage({ method: 'notification', data: notf }, '*');
|
||||
}
|
||||
|
@ -192,7 +192,31 @@ class Notification extends NotificationHandler {
|
||||
notificationWindow.displayTimer = timeoutId;
|
||||
}
|
||||
|
||||
notificationWindow.webContents.send('notification-data', data);
|
||||
const {
|
||||
title,
|
||||
company,
|
||||
body,
|
||||
image,
|
||||
icon,
|
||||
id,
|
||||
color,
|
||||
flash,
|
||||
isExternal,
|
||||
theme,
|
||||
} = data;
|
||||
|
||||
notificationWindow.webContents.send('notification-data', {
|
||||
title,
|
||||
company,
|
||||
body,
|
||||
image,
|
||||
icon,
|
||||
id,
|
||||
color,
|
||||
flash,
|
||||
isExternal,
|
||||
theme,
|
||||
});
|
||||
notificationWindow.showInactive();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user