|
@@ -195,10 +195,20 @@
|
|
temporaryChatEnabled.set(true);
|
|
temporaryChatEnabled.set(true);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // Check for version updates
|
|
if ($user.role === 'admin') {
|
|
if ($user.role === 'admin') {
|
|
- checkForVersionUpdates();
|
|
|
|
- }
|
|
|
|
|
|
+ // Check if the user has dismissed the update toast in the last 24 hours
|
|
|
|
+ if (localStorage.dismissedUpdateToast) {
|
|
|
|
+ const dismissedUpdateToast = new Date(Number(localStorage.dismissedUpdateToast));
|
|
|
|
+ const now = new Date();
|
|
|
|
|
|
|
|
+ if (now - dismissedUpdateToast > 24 * 60 * 60 * 1000) {
|
|
|
|
+ await checkForVersionUpdates();
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ await checkForVersionUpdates();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
await tick();
|
|
await tick();
|
|
}
|
|
}
|
|
|
|
|