Fix Dynamix API routing and menu placement
This commit is contained in:
@@ -40,7 +40,7 @@ Plugins -> Install Plugin -> URL einfuegen -> Install
|
|||||||
Danach oeffnen:
|
Danach oeffnen:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Tools -> U-Navigator
|
U-Navigator
|
||||||
```
|
```
|
||||||
|
|
||||||
Es wird kein extra Webserver und kein Node.js auf Unraid benoetigt.
|
Es wird kein extra Webserver und kein Node.js auf Unraid benoetigt.
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PLUGIN="u-navigator"
|
PLUGIN="u-navigator"
|
||||||
VERSION="0.2.0"
|
VERSION="0.2.1"
|
||||||
PKG_DIR="packages"
|
PKG_DIR="packages"
|
||||||
WORK_DIR=".plugin-build"
|
WORK_DIR=".plugin-build"
|
||||||
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
|
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"
|
Title="U-Navigator"
|
||||||
Icon="folder-open"
|
Icon="folder-open"
|
||||||
---
|
---
|
||||||
|
|||||||
+9
-2
@@ -26,7 +26,10 @@ init();
|
|||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
try {
|
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'}`;
|
statusText.textContent = `${state.config.roots.length} Root, ${state.config.readOnly ? 'Read-only' : 'Schreibzugriff aktiv'}`;
|
||||||
openExplorer(state.config.roots[0].path);
|
openExplorer(state.config.roots[0].path);
|
||||||
openProperties();
|
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', {
|
const win = createWindow('Explorer', 'explorer', {
|
||||||
width: 760,
|
width: 760,
|
||||||
height: 460,
|
height: 460,
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE PLUGIN [
|
<!DOCTYPE PLUGIN [
|
||||||
<!ENTITY name "u-navigator">
|
<!ENTITY name "u-navigator">
|
||||||
<!ENTITY author "michael">
|
<!ENTITY author "michael">
|
||||||
<!ENTITY version "0.2.0">
|
<!ENTITY version "0.2.1">
|
||||||
<!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>47fea71317002e9ea131ca468a870c69</MD5>
|
<MD5>07964e296752a1f40eaf1930dfe2bdbf</MD5>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<FILE Run="/bin/bash">
|
<FILE Run="/bin/bash">
|
||||||
@@ -26,7 +26,7 @@ echo ""
|
|||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo " &name; &version; has been installed."
|
echo " &name; &version; has been installed."
|
||||||
echo ""
|
echo ""
|
||||||
echo " Open: Tools -> U-Navigator"
|
echo " Open: U-Navigator"
|
||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
</INLINE>
|
</INLINE>
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ echo ""
|
|||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo " &name; &version; has been installed."
|
echo " &name; &version; has been installed."
|
||||||
echo ""
|
echo ""
|
||||||
echo " Open: Tools -> U-Navigator"
|
echo " Open: U-Navigator"
|
||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
</INLINE>
|
</INLINE>
|
||||||
|
|||||||
Reference in New Issue
Block a user