release(v1.6.4): runtime version injection + CI bump/sync; caching tweaks

This commit is contained in:
Ryan
2025-10-24 01:36:30 -04:00
committed by GitHub
parent 88a8857a6f
commit 553bc84404
6 changed files with 74 additions and 13 deletions

View File

@@ -50,6 +50,12 @@ RewriteEngine On
<FilesMatch "\.(js|css)$">
Header set Cache-Control "public, max-age=3600, must-revalidate"
</FilesMatch>
# version.js should always revalidate (it changes on releases)
<FilesMatch "^js/version\.js$">
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "0"
</FilesMatch>
</IfModule>
# -----------------------------

View File

@@ -563,6 +563,7 @@
</div>
</div>
</div>
<script src="js/version.js"></script>
<script type="module" src="js/main.js"></script>
</body>

View File

@@ -4,7 +4,7 @@ import { loadAdminConfigFunc } from './auth.js';
import { showToast, toggleVisibility, attachEnterKeyListener } from './domUtils.js';
import { sendRequest } from './networkUtils.js';
const version = "v1.6.3";
const version = window.APP_VERSION || "dev";
const adminTitle = `${t("admin_panel")} <small style="font-size:12px;color:gray;">${version}</small>`;

2
public/js/version.js Normal file
View File

@@ -0,0 +1,2 @@
// default for dev
window.APP_VERSION = "dev";