Open properties from context menu
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
PLUGIN="u-navigator"
|
||||
VERSION="2026.06.23.r011"
|
||||
VERSION="2026.06.23.r012"
|
||||
PKG_DIR="packages"
|
||||
WORK_DIR=".plugin-build"
|
||||
PKG_NAME="${PLUGIN}-${VERSION}.tgz"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+18
-2
@@ -52,7 +52,6 @@ async function init() {
|
||||
}
|
||||
statusText.textContent = `${state.config.roots.length} Root, ${state.config.readOnly ? 'Read-only' : 'Schreibzugriff aktiv'} · ${APP_VERSION}`;
|
||||
openExplorer(state.config.roots[0].path);
|
||||
openProperties();
|
||||
openQueue();
|
||||
} catch (error) {
|
||||
statusText.textContent = error.message;
|
||||
@@ -82,7 +81,18 @@ function openExplorer(initialPath = state.config?.roots?.[0]?.path) {
|
||||
return win;
|
||||
}
|
||||
|
||||
function openProperties() {
|
||||
function openProperties(entry = state.selectedEntry) {
|
||||
if (entry) {
|
||||
state.selectedEntry = entry;
|
||||
}
|
||||
|
||||
const existing = state.windows.find((item) => item.kind === 'properties');
|
||||
if (existing) {
|
||||
focusWindow(existing);
|
||||
render();
|
||||
return existing;
|
||||
}
|
||||
|
||||
return createWindow('Eigenschaften', 'properties', {
|
||||
width: 420,
|
||||
height: 320,
|
||||
@@ -510,6 +520,11 @@ async function promptTransfer(win, entry, type) {
|
||||
await createJob(type, entry.path, `${targetDir.replace(/\/$/, '')}/${entry.name}`, []);
|
||||
}
|
||||
|
||||
function showPropertiesForEntry(win, entry) {
|
||||
selectEntry(win, entry);
|
||||
openProperties(entry);
|
||||
}
|
||||
|
||||
function showContextMenu(event, win, entry) {
|
||||
const rect = workspace.getBoundingClientRect();
|
||||
state.contextMenu = {
|
||||
@@ -535,6 +550,7 @@ function renderContextMenu() {
|
||||
if (entry.type === 'directory') {
|
||||
actions.push(['Öffnen', () => loadExplorer(win, entry.path)]);
|
||||
}
|
||||
actions.push(['Eigenschaften', () => showPropertiesForEntry(win, entry)]);
|
||||
actions.push(['Umbenennen', () => renameEntry(win, entry)]);
|
||||
actions.push(['Kopieren nach...', () => promptTransfer(win, entry, 'copy')]);
|
||||
actions.push(['Verschieben nach...', () => promptTransfer(win, entry, 'move')]);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE PLUGIN [
|
||||
<!ENTITY name "u-navigator">
|
||||
<!ENTITY author "michael">
|
||||
<!ENTITY version "2026.06.23.r011">
|
||||
<!ENTITY version "2026.06.23.r012">
|
||||
<!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>4b86244d0a4d43a5df4e86fc5569af81</MD5>
|
||||
<MD5>3ab1180514677a7270013846b08706b0</MD5>
|
||||
</FILE>
|
||||
|
||||
<FILE Run="/bin/bash">
|
||||
|
||||
Reference in New Issue
Block a user