From f1ad57ab3be44b5c867d7442f94525432a39d281 Mon Sep 17 00:00:00 2001 From: Rob Sassack <91514586+robsassack@users.noreply.github.com> Date: Mon, 24 Oct 2022 06:16:22 -0400 Subject: [PATCH] Update banner refresh (#3677) robsassack * Added refresh on click to update banner * Minimized added CSS --- frontend/src/ts/elements/notifications.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/ts/elements/notifications.ts b/frontend/src/ts/elements/notifications.ts index 6a243182a..de5a814bb 100644 --- a/frontend/src/ts/elements/notifications.ts +++ b/frontend/src/ts/elements/notifications.ts @@ -178,6 +178,15 @@ class Notification { } ); } + // NOTE: This need to be changed if the update banner text is changed + if (this.message.includes("please refresh")) { + // add pointer when refresh is needed + $(`#bannerCenter .banner[id='${this.id}']`).css("cursor", "pointer"); + // refresh on clicking banner + $(`#bannerCenter .banner[id='${this.id}']`).on("click", () => { + window.location.reload(); + }); + } } if (this.duration > 0) { setTimeout(() => {