Cache bust plugin assets
This commit is contained in:
+2
-1
@@ -2,7 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PLUGIN="u-navigator"
|
PLUGIN="u-navigator"
|
||||||
VERSION="2026.06.23.r005"
|
VERSION="2026.06.23.r006"
|
||||||
PKG_DIR="packages"
|
PKG_DIR="packages"
|
||||||
WORK_DIR=".plugin-build"
|
WORK_DIR=".plugin-build"
|
||||||
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
|
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 -R plugin-root/usr "$WORK_DIR/"
|
||||||
cp server/public/app.js "$WORK_DIR/usr/local/emhttp/plugins/${PLUGIN}/assets/app.js"
|
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"
|
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
|
tar -czf "$PKG_DIR/$PKG_NAME" -C "$WORK_DIR" usr
|
||||||
rm -rf "$WORK_DIR"
|
rm -rf "$WORK_DIR"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -4,8 +4,9 @@ Icon="folder-open"
|
|||||||
---
|
---
|
||||||
<?PHP
|
<?PHP
|
||||||
$plugin = "u-navigator";
|
$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">
|
<div class="u-nav app-shell">
|
||||||
<header class="topbar">
|
<header class="topbar">
|
||||||
<div>
|
<div>
|
||||||
@@ -22,5 +23,6 @@ $plugin = "u-navigator";
|
|||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
window.UNAV_API_BASE = "/plugins/<?=$plugin?>/api";
|
window.UNAV_API_BASE = "/plugins/<?=$plugin?>/api";
|
||||||
|
window.UNAV_VERSION = "<?=$version?>";
|
||||||
</script>
|
</script>
|
||||||
<script src="/plugins/<?=$plugin?>/assets/app.js"></script>
|
<script src="/plugins/<?=$plugin?>/assets/app.js?v=<?=$version?>"></script>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
const workspace = document.querySelector('#workspace');
|
const workspace = document.querySelector('#workspace');
|
||||||
const statusText = document.querySelector('#statusText');
|
const statusText = document.querySelector('#statusText');
|
||||||
const API_BASE = window.UNAV_API_BASE || '/api';
|
const API_BASE = window.UNAV_API_BASE || '/api';
|
||||||
|
const APP_VERSION = window.UNAV_VERSION || 'dev';
|
||||||
const state = {
|
const state = {
|
||||||
config: null,
|
config: null,
|
||||||
windows: [],
|
windows: [],
|
||||||
@@ -48,7 +49,7 @@ async function init() {
|
|||||||
if (!state.config.roots?.length) {
|
if (!state.config.roots?.length) {
|
||||||
throw new Error('No U-Navigator roots configured');
|
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);
|
openExplorer(state.config.roots[0].path);
|
||||||
openProperties();
|
openProperties();
|
||||||
openQueue();
|
openQueue();
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE PLUGIN [
|
<!DOCTYPE PLUGIN [
|
||||||
<!ENTITY name "u-navigator">
|
<!ENTITY name "u-navigator">
|
||||||
<!ENTITY author "michael">
|
<!ENTITY author "michael">
|
||||||
<!ENTITY version "2026.06.23.r005">
|
<!ENTITY version "2026.06.23.r006">
|
||||||
<!ENTITY package "&name;-&version;.tgz">
|
<!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">
|
<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;">
|
<FILE Name="/boot/config/plugins/&name;/&package;">
|
||||||
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
|
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
|
||||||
<MD5>1e5eb8df508f7a4e46a4c13336302d16</MD5>
|
<MD5>6079415588844c2e4a3f8aa43f949bd4</MD5>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<FILE Run="/bin/bash">
|
<FILE Run="/bin/bash">
|
||||||
|
|||||||
Reference in New Issue
Block a user