mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -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 {
|
export interface INotificationData {
|
||||||
id: number;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
text: string;
|
body: string;
|
||||||
image: string;
|
image: string;
|
||||||
|
icon: string;
|
||||||
flash: boolean;
|
flash: boolean;
|
||||||
color: string;
|
color: string;
|
||||||
tag: string;
|
tag: string;
|
||||||
|
@ -320,6 +320,9 @@
|
|||||||
alert('error=' + event.result);
|
alert('error=' + event.result);
|
||||||
};
|
};
|
||||||
ssfNotificationHandler.addEventListener('error', onerror);
|
ssfNotificationHandler.addEventListener('error', onerror);
|
||||||
|
} else if (window.manaSSF) {
|
||||||
|
const callback = () => { console.log('notification clicked') };
|
||||||
|
window.manaSSF.showNotification(notf, callback);
|
||||||
} else {
|
} else {
|
||||||
window.postMessage({ method: 'notification', data: notf }, '*');
|
window.postMessage({ method: 'notification', data: notf }, '*');
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,31 @@ class Notification extends NotificationHandler {
|
|||||||
notificationWindow.displayTimer = timeoutId;
|
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();
|
notificationWindow.showInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user