diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl
index 34f540d3..6262a16f 100644
--- a/ui/ui/dashboard.tpl
+++ b/ui/ui/dashboard.tpl
@@ -385,21 +385,24 @@
var latestVersion = data.version;
if (localVersion !== latestVersion) {
$('#version').html('Latest Version: ' + latestVersion);
- Swal.fire({
- icon: 'info',
- title: "New Version Available\nVersion: "+latestVersion,
- toast: true,
- position: 'bottom-right',
- showConfirmButton: true,
- showCloseButton: true,
- timer: 30000,
- confirmButtonText: 'Update Now',
- timerProgressBar: true,
- didOpen: (toast) => {
- toast.addEventListener('mouseenter', Swal.stopTimer)
- toast.addEventListener('mouseleave', Swal.resumeTimer)
- }
- });
+ if(getCookie(latestVersion) != 'done'){
+ Swal.fire({
+ icon: 'info',
+ title: "New Version Available\nVersion: "+latestVersion,
+ toast: true,
+ position: 'bottom-right',
+ showConfirmButton: true,
+ showCloseButton: true,
+ timer: 30000,
+ confirmButtonText: 'Update Now',
+ timerProgressBar: true,
+ didOpen: (toast) => {
+ toast.addEventListener('mouseenter', Swal.stopTimer)
+ toast.addEventListener('mouseleave', Swal.resumeTimer)
+ }
+ });
+ setCookie(latestVersion, 'done', 7);
+ }
}
});
});