Parties :
' +
`
${stats.partiesGagnees}/${stats.partiesJouees}
` +
"
" +
`
1/6 :
${stats.repartition[1]}
` +
diff --git a/ts/notificationMessage.ts b/ts/notificationMessage.ts
index bcc08d5..b34f36e 100644
--- a/ts/notificationMessage.ts
+++ b/ts/notificationMessage.ts
@@ -1,19 +1,28 @@
export default class NotificationMessage {
private static _notificationArea: HTMLElement = document.getElementById("notification") as HTMLElement;
+ private static _notificationPanelArea: HTMLElement = document.getElementById("panel-fenetre-notification") as HTMLElement;
private static _currentTimeout: NodeJS.Timeout | undefined;
public static ajouterNotification(message: string): void {
+ this.ajouterNotificationDiv(this._notificationArea, message);
+ }
+
+ public static ajouterNotificationPanel(message: string): void {
+ this.ajouterNotificationDiv(this._notificationPanelArea, message);
+ }
+
+ private static ajouterNotificationDiv(div: HTMLElement, message: string): void {
if (this._currentTimeout) {
clearTimeout(this._currentTimeout);
this._currentTimeout = undefined;
}
- this._notificationArea.innerHTML = message;
- this._notificationArea.style.opacity = "1";
+ div.innerHTML = message;
+ div.style.opacity = "1";
this._currentTimeout = setTimeout(
(() => {
- this._notificationArea.style.opacity = "0";
+ div.style.opacity = "0";
this._currentTimeout = setTimeout(
(() => {
- this._notificationArea.innerHTML = " ";
+ div.innerHTML = " ";
this._currentTimeout = undefined;
}).bind(this),
1000