Preserve explorer scroll position
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
PLUGIN="u-navigator"
|
PLUGIN="u-navigator"
|
||||||
VERSION="0.2.4"
|
VERSION="0.2.5"
|
||||||
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.
@@ -151,6 +151,12 @@ function renderWindow(win) {
|
|||||||
if (win.kind === 'explorer') renderExplorer(body, win);
|
if (win.kind === 'explorer') renderExplorer(body, win);
|
||||||
if (win.kind === 'properties') renderProperties(body);
|
if (win.kind === 'properties') renderProperties(body);
|
||||||
if (win.kind === 'queue') renderQueue(body);
|
if (win.kind === 'queue') renderQueue(body);
|
||||||
|
body.scrollTop = win.data.scrollTop || 0;
|
||||||
|
body.scrollLeft = win.data.scrollLeft || 0;
|
||||||
|
body.addEventListener('scroll', () => {
|
||||||
|
win.data.scrollTop = body.scrollTop;
|
||||||
|
win.data.scrollLeft = body.scrollLeft;
|
||||||
|
});
|
||||||
|
|
||||||
el.append(titlebar, body);
|
el.append(titlebar, body);
|
||||||
if (!win.maximized) {
|
if (!win.maximized) {
|
||||||
@@ -249,7 +255,7 @@ function renderFileTable(entries) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const rows = entries.map((entry) => `
|
const rows = entries.map((entry) => `
|
||||||
<tr class="file-row" draggable="true" data-path="${escapeAttr(entry.path)}">
|
<tr class="file-row ${entry.path === state.selectedEntry?.path ? 'selected' : ''}" draggable="true" data-path="${escapeAttr(entry.path)}">
|
||||||
<td><span class="name-cell"><span class="badge">${icons[entry.type] || 'Item'}</span>${escapeHtml(entry.name)}</span></td>
|
<td><span class="name-cell"><span class="badge">${icons[entry.type] || 'Item'}</span>${escapeHtml(entry.name)}</span></td>
|
||||||
<td>${entry.type}</td>
|
<td>${entry.type}</td>
|
||||||
<td>${entry.type === 'file' ? formatBytes(entry.size) : ''}</td>
|
<td>${entry.type === 'file' ? formatBytes(entry.size) : ''}</td>
|
||||||
|
|||||||
+2
-2
@@ -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.4">
|
<!ENTITY version "0.2.5">
|
||||||
<!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>5574cd115432aaf1b2b34f77a0f89809</MD5>
|
<MD5>41311370d7a9df875faf70da6b5a7ded</MD5>
|
||||||
</FILE>
|
</FILE>
|
||||||
|
|
||||||
<FILE Run="/bin/bash">
|
<FILE Run="/bin/bash">
|
||||||
|
|||||||
Reference in New Issue
Block a user