Cache bust plugin assets

This commit is contained in:
Mikei386
2026-06-23 07:00:26 +02:00
parent 068973ab9b
commit d7a62eb15e
6 changed files with 10 additions and 6 deletions
+2 -1
View File
@@ -2,7 +2,7 @@
set -eu
PLUGIN="u-navigator"
VERSION="2026.06.23.r005"
VERSION="2026.06.23.r006"
PKG_DIR="packages"
WORK_DIR=".plugin-build"
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
@@ -13,6 +13,7 @@ mkdir -p "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/assets" "$PKG_DIR"
cp -R plugin-root/usr "$WORK_DIR/"
cp server/public/app.js "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/assets/app.js"
cp server/public/styles.css "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/assets/styles.css"
perl -0pi -e "s/__VERSION__/${VERSION}/g" "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/U-Navigator.page"
tar -czf "$PKG_DIR/$PKG_NAME" -C "$WORK_DIR" usr
rm -rf "$WORK_DIR"
Binary file not shown.
Binary file not shown.
@@ -4,8 +4,9 @@ Icon="folder-open"
---
<?PHP
$plugin = "u-navigator";
$version = "__VERSION__";
?>
<link rel="stylesheet" href="/plugins/<?=$plugin?>/assets/styles.css">
<link rel="stylesheet" href="/plugins/<?=$plugin?>/assets/styles.css?v=<?=$version?>">
<div class="u-nav app-shell">
<header class="topbar">
<div>
@@ -22,5 +23,6 @@ $plugin = "u-navigator";
</div>
<script>
window.UNAV_API_BASE = "/plugins/<?=$plugin?>/api";
window.UNAV_VERSION = "<?=$version?>";
</script>
<script src="/plugins/<?=$plugin?>/assets/app.js"></script>
<script src="/plugins/<?=$plugin?>/assets/app.js?v=<?=$version?>"></script>
+2 -1
View File
@@ -1,6 +1,7 @@
const workspace = document.querySelector('#workspace');
const statusText = document.querySelector('#statusText');
const API_BASE = window.UNAV_API_BASE || '/api';
const APP_VERSION = window.UNAV_VERSION || 'dev';
const state = {
config: null,
windows: [],
@@ -48,7 +49,7 @@ async function init() {
if (!state.config.roots?.length) {
throw new Error('No U-Navigator roots configured');
}
statusText.textContent = `${state.config.roots.length} Root, ${state.config.readOnly ? 'Read-only' : 'Schreibzugriff aktiv'}`;
statusText.textContent = `${state.config.roots.length} Root, ${state.config.readOnly ? 'Read-only' : 'Schreibzugriff aktiv'} · ${APP_VERSION}`;
openExplorer(state.config.roots[0].path);
openProperties();
openQueue();
+2 -2
View File
@@ -1,7 +1,7 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "u-navigator">
<!ENTITY author "michael">
<!ENTITY version "2026.06.23.r005">
<!ENTITY version "2026.06.23.r006">
<!ENTITY package "&name;-&version;.tgz">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/u-navigator.plg">
@@ -14,7 +14,7 @@
<FILE Name="/boot/config/plugins/&name;/&package;">
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
<MD5>1e5eb8df508f7a4e46a4c13336302d16</MD5>
<MD5>6079415588844c2e4a3f8aa43f949bd4</MD5>
</FILE>
<FILE Run="/bin/bash">