Restore Navigator top menu entry
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
PLUGIN="u-navigator"
|
||||
VERSION="2026.06.23.r034"
|
||||
VERSION="2026.06.23.r035"
|
||||
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="Navigator"
|
||||
Menu="Tools"
|
||||
Title="U-Navigator"
|
||||
Icon="u-navigator/u-navigator.svg"
|
||||
---
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
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>
|
||||
+3
-4
@@ -1,14 +1,14 @@
|
||||
<!DOCTYPE PLUGIN [
|
||||
<!ENTITY name "u-navigator">
|
||||
<!ENTITY author "Michael Roll">
|
||||
<!ENTITY version "2026.06.23.r034">
|
||||
<!ENTITY version "2026.06.23.r035">
|
||||
<!ENTITY package "&name;-&version;.tgz">
|
||||
<!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 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.">
|
||||
]>
|
||||
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Navigator/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
||||
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Tools/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
||||
|
||||
<DESCRIPTION>&description;</DESCRIPTION>
|
||||
<SUPPORT>&support;</SUPPORT>
|
||||
@@ -24,14 +24,13 @@
|
||||
|
||||
<FILE Name="/boot/config/plugins/&name;/&package;">
|
||||
<URL>https://git.casaderoll.de/michael/Unraid-Navigator/raw/branch/main/packages/&package;</URL>
|
||||
<MD5>6407145791c8baae3dfc04a6aa45c8c4</MD5>
|
||||
<MD5>e2a3296496baf42be1d6695613c30275</MD5>
|
||||
</FILE>
|
||||
|
||||
<FILE Run="/bin/bash">
|
||||
<INLINE>
|
||||
mkdir -p /boot/config/plugins/&name;
|
||||
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
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------"
|
||||
|
||||
+1
-2
@@ -8,7 +8,7 @@
|
||||
<!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.">
|
||||
]>
|
||||
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Navigator/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
||||
<PLUGIN name="U-Navigator" author="&author;" version="&version;" launch="Tools/U-Navigator" pluginURL="&pluginURL;" support="&support;" icon="&icon;" description="&description;" overview="&description;" Overview="&description;">
|
||||
|
||||
<DESCRIPTION>&description;</DESCRIPTION>
|
||||
<SUPPORT>&support;</SUPPORT>
|
||||
@@ -31,7 +31,6 @@
|
||||
<INLINE>
|
||||
mkdir -p /boot/config/plugins/&name;
|
||||
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
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------"
|
||||
|
||||
Reference in New Issue
Block a user