Skip to content

Commit 175b4eb

Browse files
author
Alexander Phillips
committed
Align Docker privacy toggle with Basic view control
1 parent 43fbaed commit 175b4eb

9 files changed

Lines changed: 36 additions & 14 deletions
-14.3 MB
Binary file not shown.

archive/folderview.plus-2026.04.12.06.txz.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.

archive/folderview.plus-2026.04.13.01.txz.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eb1a14eaaccaad379fbd4607ca8ba210b4d9676031cd7c02342a570dce1863d9 folderview.plus-2026.04.15.09.txz

folderview.plus.plg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66
<!ENTITY launch "Settings/FolderViewPlus">
77
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
88
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/dev/folderview.plus.plg">
9-
<!ENTITY version "2026.04.15.07">
10-
<!ENTITY md5 "9e0a0e51ea0e0c8ecbba8d5ef8471aef">
9+
<!ENTITY version "2026.04.15.09">
10+
<!ENTITY md5 "ec079b16ca9c9da35134a709d8923cba">
1111
]>
1212

1313
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" icon="folder-icon.png" support="https://forums.unraid.net/topic/197631-plugin-folderview-plus/" min="7.0.0">
1414
<CHANGES>
1515

16+
###2026.04.15.09
17+
- Fix: Mount the Docker runtime privacy toggle inside the Basic view control cluster so it stays right-aligned and vertically aligned with the host toggle.
18+
- Privacy: Expand Docker runtime toggle anchor detection to reuse the host toolbar cluster before falling back to a standalone row.
19+
20+
1621
###2026.04.15.07
1722
- Feature: Add a Docker runtime privacy toggle beside the Basic view switch.
1823
- Privacy: Persist Docker blur mode directly from the Docker tab and keep the runtime toggle in sync after host re-renders.

src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/scripts/docker.js

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3004,8 +3004,10 @@ const findDockerRuntimeListViewToggleAnchor = () => {
30043004
return null;
30053005
}
30063006
const scopes = [
3007+
table.previousElementSibling,
30073008
table.parentElement,
30083009
table.parentElement?.parentElement,
3010+
table.closest('.panel')?.querySelector(':scope > .panel-body'),
30093011
document.body
30103012
].filter(Boolean);
30113013
const switchSelector = 'input[type="checkbox"], .switch-button, .switch-button-background';
@@ -3016,11 +3018,21 @@ const findDockerRuntimeListViewToggleAnchor = () => {
30163018
if (!text.includes('basic view')) {
30173019
continue;
30183020
}
3019-
if (candidate.querySelector(switchSelector)) {
3020-
return candidate;
3021-
}
3022-
if (candidate.parentElement && candidate.parentElement.querySelector(switchSelector)) {
3023-
return candidate.parentElement;
3021+
const clusterCandidates = [
3022+
candidate,
3023+
candidate.closest('label'),
3024+
candidate.closest('div'),
3025+
candidate.parentElement,
3026+
candidate.parentElement?.closest('div')
3027+
].filter(Boolean);
3028+
for (const cluster of clusterCandidates) {
3029+
const clusterText = String(cluster.textContent || '').replace(/\s+/g, ' ').trim().toLowerCase();
3030+
if (!clusterText.includes('basic view')) {
3031+
continue;
3032+
}
3033+
if (cluster.querySelector(switchSelector)) {
3034+
return cluster;
3035+
}
30243036
}
30253037
}
30263038
}
@@ -3049,10 +3061,10 @@ const ensureDockerRuntimePrivacyFallbackHost = () => {
30493061

30503062
const resolveDockerRuntimePrivacyToggleMount = () => {
30513063
const anchor = findDockerRuntimeListViewToggleAnchor();
3052-
if (anchor && anchor.parentElement) {
3064+
if (anchor) {
30533065
return {
30543066
anchor,
3055-
host: anchor.parentElement,
3067+
host: anchor,
30563068
fallback: false
30573069
};
30583070
}
@@ -3081,10 +3093,10 @@ const renderDockerRuntimePrivacyToggle = () => {
30813093
shell = document.createElement('div');
30823094
shell.id = DOCKER_RUNTIME_PRIVACY_TOGGLE_SHELL_ID;
30833095
}
3084-
shell.className = `fvplus-docker-runtime-toggle-shell${mount.fallback ? ' is-fallback' : ''}`;
3096+
shell.className = `fvplus-docker-runtime-toggle-shell${mount.fallback ? ' is-fallback' : ' is-inline-cluster'}`;
30853097
if (mount.anchor) {
3086-
if (mount.anchor.nextElementSibling !== shell) {
3087-
mount.anchor.insertAdjacentElement('afterend', shell);
3098+
if (mount.host.firstElementChild !== shell) {
3099+
mount.host.insertBefore(shell, mount.host.firstChild);
30883100
}
30893101
} else if (mount.host.firstElementChild !== shell) {
30903102
mount.host.insertBefore(shell, mount.host.firstChild);

src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/styles/docker.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ th.fvplus-runtime-resizable .fvplus-runtime-col-resizer:focus-visible::before {
163163
vertical-align: middle;
164164
}
165165

166+
.fvplus-docker-runtime-toggle-shell.is-inline-cluster {
167+
margin-left: 0;
168+
margin-right: 0.85rem;
169+
}
170+
166171
.fvplus-docker-runtime-toggle-shell.is-fallback {
167172
margin-left: 0;
168173
}

tests/privacy-mode-contract.test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ test('privacy mode toggles runtime body classes and ships masking selectors acro
5555
assert.match(settingsCss, /\.bulk-item-name/);
5656
assert.match(dockerCss, /body\.fvplus-privacy-docker-runtime/);
5757
assert.match(dockerCss, /\.fvplus-docker-runtime-toggle-shell/);
58+
assert.match(dockerCss, /\.fvplus-docker-runtime-toggle-shell\.is-inline-cluster/);
5859
assert.match(dockerCss, /\.fvplus-docker-runtime-toggle-label/);
5960
assert.match(dockerCss, /\.fvplus-docker-runtime-toolbar-controls/);
6061
assert.match(dockerCss, /\.fv-docker-member-menu-name/);

0 commit comments

Comments
 (0)