Move Navigator out of Tools menu
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PLUGIN="u-navigator"
|
PLUGIN="u-navigator"
|
||||||
VERSION="2026.06.23.r033"
|
VERSION="2026.06.23.r034"
|
||||||
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="Navigator"
|
||||||
Title="U-Navigator"
|
Title="U-Navigator"
|
||||||
Icon="u-navigator/u-navigator.svg"
|
Icon="u-navigator/u-navigator.svg"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
Menu="Buttons:99"
|
|
||||||
Title="Navigator"
|
|
||||||
Icon="icon-u-folder"
|
|
||||||
Code="f07b"
|
|
||||||
---
|
|
||||||
<script>
|
|
||||||
(() => {
|
|
||||||
const targetHref = '/Tools/U-Navigator';
|
|
||||||
const targetText = 'NAVIGATOR';
|
|
||||||
|
|
||||||
function normalize(text) {
|
|
||||||
return String(text || '').trim().toUpperCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
function injectUNavigatorNav() {
|
|
||||||
if (document.querySelector('a[href="/Tools/U-Navigator"], a[data-u-navigator-nav="true"]')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const links = [...document.querySelectorAll('a')];
|
|
||||||
const toolsLink = links.find((link) => {
|
|
||||||
const text = normalize(link.textContent);
|
|
||||||
const href = link.getAttribute('href') || '';
|
|
||||||
return text === 'WERKZEUGE' || text === 'TOOLS' || href === '/Tools';
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!toolsLink) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const wrapper = toolsLink.parentElement?.tagName === 'LI' ? toolsLink.parentElement : toolsLink;
|
|
||||||
const isListItem = wrapper.tagName === 'LI';
|
|
||||||
const item = isListItem ? document.createElement('li') : document.createElement('a');
|
|
||||||
const link = isListItem ? document.createElement('a') : item;
|
|
||||||
link.className = toolsLink.className || '';
|
|
||||||
link.href = targetHref;
|
|
||||||
link.textContent = targetText;
|
|
||||||
link.setAttribute('data-u-navigator-nav', 'true');
|
|
||||||
link.classList.remove('active', 'selected', 'on');
|
|
||||||
|
|
||||||
if (isListItem) {
|
|
||||||
item.className = wrapper.className || '';
|
|
||||||
item.classList.remove('active', 'selected', 'on');
|
|
||||||
item.appendChild(link);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (location.pathname === targetHref) {
|
|
||||||
toolsLink.classList.remove('active', 'selected', 'on');
|
|
||||||
wrapper.classList?.remove('active', 'selected', 'on');
|
|
||||||
link.classList.add('active');
|
|
||||||
item.classList?.add('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
wrapper.insertAdjacentElement('afterend', item);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.readyState === 'loading') {
|
|
||||||
document.addEventListener('DOMContentLoaded', injectUNavigatorNav);
|
|
||||||
} else {
|
|
||||||
injectUNavigatorNav();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
+5
-4
@@ -1,14 +1,14 @@
|
|||||||
<!DOCTYPE PLUGIN [
|
<!DOCTYPE PLUGIN [
|
||||||
<!ENTITY name "u-navigator">
|
<!ENTITY name "u-navigator">
|
||||||
<!ENTITY author "Michael Roll">
|
<!ENTITY author "Michael Roll">
|
||||||
<!ENTITY version "2026.06.23.r033">
|
<!ENTITY version "2026.06.23.r034">
|
||||||
<!ENTITY package "&name;-&version;.tgz">
|
<!ENTITY package "&name;-&version;.tgz">
|
||||||
<!ENTITY pluginURL "https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/u-navigator.plg">
|
<!ENTITY pluginURL "https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/u-navigator.plg">
|
||||||
<!ENTITY support "https://git.casaderoll.de/michael/Unraid-Navigator">
|
<!ENTITY support "https://git.casaderoll.de/michael/Unraid-Navigator">
|
||||||
<!ENTITY icon "folder-open">
|
<!ENTITY icon "folder-open">
|
||||||
<!ENTITY description "Unraid File Navigator: Dynamix-integrierter Dateimanager mit mehreren Explorer-Fenstern, Symbol- und Listenansicht, Rechtsklickmenue, Eigenschaften, Uploads sowie Move/Copy-Jobs.">
|
<!ENTITY description "Unraid File Navigator: Dynamix-integrierter Dateimanager mit mehreren Explorer-Fenstern, Symbol- und Listenansicht, Rechtsklickmenue, Eigenschaften, Uploads sowie Move/Copy-Jobs.">
|
||||||
]>
|
]>
|
||||||
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Tools/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Navigator/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
||||||
|
|
||||||
<DESCRIPTION>&description;</DESCRIPTION>
|
<DESCRIPTION>&description;</DESCRIPTION>
|
||||||
<SUPPORT>&support;</SUPPORT>
|
<SUPPORT>&support;</SUPPORT>
|
||||||
@@ -24,19 +24,20 @@
|
|||||||
|
|
||||||
<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>e177322bdc973f908a6559401170656c</MD5>
|
<MD5>6407145791c8baae3dfc04a6aa45c8c4</MD5>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<FILE Run="/bin/bash">
|
<FILE Run="/bin/bash">
|
||||||
<INLINE>
|
<INLINE>
|
||||||
mkdir -p /boot/config/plugins/&name;
|
mkdir -p /boot/config/plugins/&name;
|
||||||
tar -xzf /boot/config/plugins/&name;/&package; -C /
|
tar -xzf /boot/config/plugins/&name;/&package; -C /
|
||||||
|
rm -f /usr/local/emhttp/plugins/&name;/U-NavigatorNav.page
|
||||||
find /boot/config/plugins/&name; -type f -name "&name;-*.tgz" ! -name "&package;" -delete
|
find /boot/config/plugins/&name; -type f -name "&name;-*.tgz" ! -name "&package;" -delete
|
||||||
echo ""
|
echo ""
|
||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo " &name; &version; has been installed."
|
echo " &name; &version; has been installed."
|
||||||
echo ""
|
echo ""
|
||||||
echo " Open: U-Navigator"
|
echo " Open: Navigator"
|
||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
</INLINE>
|
</INLINE>
|
||||||
|
|||||||
+3
-2
@@ -8,7 +8,7 @@
|
|||||||
<!ENTITY icon "folder-open">
|
<!ENTITY icon "folder-open">
|
||||||
<!ENTITY description "Unraid File Navigator: Dynamix-integrierter Dateimanager mit mehreren Explorer-Fenstern, Symbol- und Listenansicht, Rechtsklickmenue, Eigenschaften, Uploads sowie Move/Copy-Jobs.">
|
<!ENTITY description "Unraid File Navigator: Dynamix-integrierter Dateimanager mit mehreren Explorer-Fenstern, Symbol- und Listenansicht, Rechtsklickmenue, Eigenschaften, Uploads sowie Move/Copy-Jobs.">
|
||||||
]>
|
]>
|
||||||
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Tools/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Navigator/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
||||||
|
|
||||||
<DESCRIPTION>&description;</DESCRIPTION>
|
<DESCRIPTION>&description;</DESCRIPTION>
|
||||||
<SUPPORT>&support;</SUPPORT>
|
<SUPPORT>&support;</SUPPORT>
|
||||||
@@ -31,12 +31,13 @@
|
|||||||
<INLINE>
|
<INLINE>
|
||||||
mkdir -p /boot/config/plugins/&name;
|
mkdir -p /boot/config/plugins/&name;
|
||||||
tar -xzf /boot/config/plugins/&name;/&package; -C /
|
tar -xzf /boot/config/plugins/&name;/&package; -C /
|
||||||
|
rm -f /usr/local/emhttp/plugins/&name;/U-NavigatorNav.page
|
||||||
find /boot/config/plugins/&name; -type f -name "&name;-*.tgz" ! -name "&package;" -delete
|
find /boot/config/plugins/&name; -type f -name "&name;-*.tgz" ! -name "&package;" -delete
|
||||||
echo ""
|
echo ""
|
||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo " &name; &version; has been installed."
|
echo " &name; &version; has been installed."
|
||||||
echo ""
|
echo ""
|
||||||
echo " Open: U-Navigator"
|
echo " Open: Navigator"
|
||||||
echo "-----------------------------------------------------------"
|
echo "-----------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
</INLINE>
|
</INLINE>
|
||||||
|
|||||||
Reference in New Issue
Block a user