Fix Dynamix API routing and menu placement

This commit is contained in:
Mikei386
2026-06-22 22:27:19 +02:00
parent ae5e192eac
commit 51c8e7ac4d
8 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ Plugins -> Install Plugin -> URL einfuegen -> Install
Danach oeffnen:
```text
Tools -> U-Navigator
U-Navigator
```
Es wird kein extra Webserver und kein Node.js auf Unraid benoetigt.
+1 -1
View File
@@ -2,7 +2,7 @@
set -eu
PLUGIN="u-navigator"
VERSION="0.2.0"
VERSION="0.2.1"
PKG_DIR="packages"
WORK_DIR=".plugin-build"
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
Menu="Tools"
Menu="U-Navigator"
Title="U-Navigator"
Icon="folder-open"
---
+9 -2
View File
@@ -26,7 +26,10 @@ init();
async function init() {
try {
state.config = await api(apiUrl('config'));
state.config = await api(apiUrl('config.php'));
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'}`;
openExplorer(state.config.roots[0].path);
openProperties();
@@ -36,7 +39,11 @@ async function init() {
}
}
function openExplorer(initialPath = state.config?.roots[0]?.path) {
function openExplorer(initialPath = state.config?.roots?.[0]?.path) {
if (!initialPath) {
statusText.textContent = 'Kein Root-Pfad konfiguriert';
return null;
}
const win = createWindow('Explorer', 'explorer', {
width: 760,
height: 460,
+3 -3
View File
@@ -1,7 +1,7 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "u-navigator">
<!ENTITY author "michael">
<!ENTITY version "0.2.0">
<!ENTITY version "0.2.1">
<!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>47fea71317002e9ea131ca468a870c69</MD5>
<MD5>07964e296752a1f40eaf1930dfe2bdbf</MD5>
</FILE>
<FILE Run="/bin/bash">
@@ -26,7 +26,7 @@ echo ""
echo "-----------------------------------------------------------"
echo " &name; &version; has been installed."
echo ""
echo " Open: Tools -> U-Navigator"
echo " Open: U-Navigator"
echo "-----------------------------------------------------------"
echo ""
</INLINE>
+1 -1
View File
@@ -26,7 +26,7 @@ echo ""
echo "-----------------------------------------------------------"
echo " &name; &version; has been installed."
echo ""
echo " Open: Tools -> U-Navigator"
echo " Open: U-Navigator"
echo "-----------------------------------------------------------"
echo ""
</INLINE>