diff --git a/CHANGELOG.md b/CHANGELOG.md index ab2ba78..3b902c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ ## Changelog +### v0.98.2 — drive-card action clarity: dedupe + self-documenting labels (2026-07-02) + +User feedback: two "Leválasztás" buttons per drive, and four near-synonymous labels (Letiltás / +Leválasztás / Eltávolítás / Leszerelés) for very different operations. storage.html only: + +- **Dedupe:** the agent-level eject no longer renders on a card that already offers the registry + safe-disconnect (enrichCard passes `hasSafeDisconnect`, detected from the card's own + storageDisconnect button) — one detach affordance per card. Non-USB registered drives (no + safe-disconnect) and unregistered drives keep the agent eject. +- **Labels + tooltips (endpoints unchanged):** Letiltás/Engedélyezés → "Új telepítések + letiltása/engedélyezése"; registry Leválasztás → "Biztonságos leválasztás" (apps stop, safe + unplug, reconnectable); Eltávolítás → "Eltávolítás a listából" (registry-entry removal only, + data untouched); Leszerelés → "Végleges leszerelés" (permanent, optional migrate-first); agent + Törlés… → "Formázás…" (that's what it does). Every action button carries an explanatory `title`. + + ### v0.98.1 — drive-card spacing: enrichment rows no longer touch (2026-07-02) User feedback: on the Meghajtók cards the agent tag row ("Felhasználói adat", "lassú", uuid) and the diff --git a/controller/internal/web/templates/storage.html b/controller/internal/web/templates/storage.html index 9b1a67d..e99a1e5 100644 --- a/controller/internal/web/templates/storage.html +++ b/controller/internal/web/templates/storage.html @@ -126,25 +126,25 @@ {{$.CSRFField}} - + {{else}}
{{$.CSRFField}} - +
{{end}} {{if .IsUSB}} - + {{end}} {{if and (not .IsDefault) (eq .AppCount 0)}}
{{$.CSRFField}} - +
{{end}} {{if and (gt .AppCount 0) .HasOtherPaths}} @@ -157,7 +157,7 @@ {{end}} - + {{end}} @@ -290,7 +290,7 @@ window.__registeredPaths=[{{range .StoragePaths}}{{if .Path}}"{{.Path}}",{{end}} return '
' +'
'+hum(d.used_bytes)+' / '+hum(d.total_bytes)+' ('+pct.toFixed(0)+'%)
'; } - function actions(d, registered){ + function actions(d, registered, hasSafeDisconnect){ // Destructive controls ONLY for user-data drives that are mounted under /mnt. System/backup get none. if(d.role!=='user-data' || !d.mount_path || d.mount_path.indexOf('/mnt/')!==0) return ''; var dev = esc(d.backing_device||''), mpRaw = esc(d.mount_path), reg = esc(regKey(d)); @@ -304,9 +304,13 @@ window.__registeredPaths=[{{range .StoragePaths}}{{if .Path}}"{{.Path}}",{{end}} if(!registered[regKey(d)]){ btns += ' '; } - btns += ''; - if(d.backing_device){ btns += ' '; } - return '
'+btns+'
'; + // Dedupe: if the registry card already offers "Biztonságos leválasztás" (USB safe-disconnect), + // don't render the overlapping agent-level eject next to it — one detach affordance per card. + if(!hasSafeDisconnect){ + btns += ''; + } + if(d.backing_device){ btns += (btns?' ':'') + ''; } + return btns ? '
'+btns+'
' : ''; } // Unified drive view (D1): the agent disk list ENRICHES the registry cards in place // (role tag + durable-id + agent-only actions), and two extra groups render below: @@ -328,12 +332,14 @@ window.__registeredPaths=[{{range .StoragePaths}}{{if .Path}}"{{.Path}}",{{end}} function enrichCard(d, registered){ var slot=document.getElementById('agent-extra-'+regKey(d)); if(!slot) return false; + var card=slot.closest('.storage-path-item'); + var hasSafeDisconnect=!!(card && card.querySelector('[onclick^="storageDisconnect"]')); var extra='
' +''+roleTag(d.role)+'' +(d.class?''+classTag(d)+'':'') +(d.durable_id?''+esc(d.durable_id)+'':'') +'
' - +actions(d,registered); + +actions(d,registered,hasSafeDisconnect); slot.innerHTML=extra; return true; }