diff --git a/src/index.php b/src/index.php index 5d9dfeb..85e82aa 100644 --- a/src/index.php +++ b/src/index.php @@ -127,7 +127,8 @@ class SyncedTimer "soundEnabled" => $userdata["soundEnabled"], "repeatEnabled" => $userdata["repeatEnabled"], "currentServerTime" => floor(microtime(true) * 1000), - ) + ), + "version" => $GLOBALS["VERSION"], ))); } else { http_response_code(404); diff --git a/src/static/js/synced-timer.js b/src/static/js/synced-timer.js index 0e16843..95b57ae 100644 --- a/src/static/js/synced-timer.js +++ b/src/static/js/synced-timer.js @@ -21,6 +21,10 @@ document.addEventListener('alpine:init', () => { return; } + if(response.version != activeSyncedTimerVersion) { + location.reload() + } + this.currentData = response.data Alpine.store("audioPlayback").isDisabledByServer = !this.currentData.soundEnabled this.header = this.currentData.header diff --git a/src/theme.php b/src/theme.php index 462bd6f..1e3655b 100644 --- a/src/theme.php +++ b/src/theme.php @@ -370,6 +370,7 @@ class LandingpageTheme