feat: unified entry slideover + custom icons + UX fixes

Unified create/edit slideover
- openSlideOver(id) now accepts null for new entries. Same UI
  (icon, name, site, user, password, TOTP, folder, tags) for both
  create and edit. Drops the separate entry modal — no more "save
  first, then add TOTP" two-step.
- "+ New" button, Ctrl+K → New entry, and Ctrl+Shift+A all route
  through the slideover. Ctrl+Shift+A pre-fills the title with the
  foreground window's name.
- Save button visible from the start in new mode (no dirty wait).
- Title shows mode unambiguously: cyan "+ New entry" vs
  "Edit · <name>".

Custom icon upload (soIconField)
- 56×56 preview at the top of every slideover + Upload icon /
  Remove buttons. Same POST /entries/{id}/icon endpoint as the
  auto-fetch path. Validates type / size (64 KB cap matching server).
- Solves the case where DDG doesn't index a domain (self-hosted
  apps, private sites): the user pastes any image and it sticks.

Favicon: privacy-first, DDG only
- Removed the direct-fetch fallback steps (3-5). Privacy stance:
  zero DNS leak outside icons.duckduckgo.com. Domains DDG doesn't
  cover stay icon-less until the user uploads a custom one.
- PM.Favicon.FetchFaviconDataUri takes an optional TFaviconLog
  callback so UMainForm can stream per-step trace into LogLine for
  diagnostics.

Fixes
- Slideover z-index 30 → 50. The topbar's backdrop-filter creates a
  stacking context at z-index 40 which was clipping the slideover
  header (title + close button hidden behind topbar).
- RestoreFromTray no longer un-maximises a maximised window when
  called outside a tray-restore context (Ctrl+Shift+A, Ctrl+Shift+L
  picker, app/focus cmd). SW_RESTORE on a maximised window reverts
  to normal — now we only SW_RESTORE if IsIconic.
- "Show all"/"Show less" per-category state survives renderGrid
  re-renders (healthExpanded map).
- "+ New" and dashboard "Fix" buttons stopPropagation so the
  document-level click-outside handler doesn't close the slideover
  they just opened.
- soDirtyCheck keeps Save visible while in new mode regardless of
  diff.
- openSlideover → openSlideOver typo fix across all call sites.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 00:15:20 +01:00
parent ad5fb21a18
commit 2ef636ce30
8 changed files with 450 additions and 107 deletions
+40 -1
View File
@@ -1226,6 +1226,42 @@ input[type="range"]::-webkit-slider-thumb {
font-style: italic;
text-align: center;
}
.health-more-btn {
display: block;
margin: 8px auto 0;
}
/* ---- Slideover custom icon field ------------------------ */
.so-icon-field {
display: flex;
align-items: center;
gap: 12px;
}
.so-icon-preview {
width: 56px; height: 56px;
display: grid; place-items: center;
background: var(--bg-elev-2);
border-radius: var(--radius-sm);
overflow: hidden;
font-weight: 600;
font-size: 20px;
color: var(--text);
flex-shrink: 0;
}
.so-icon-preview img {
width: 100%; height: 100%;
object-fit: contain;
padding: 6px;
box-sizing: border-box;
}
.so-icon-actions {
display: flex; flex-direction: column; gap: 6px;
}
/* Slideover title — tint the "+ New entry" prefix in accent colour so
the mode is unambiguous without changing the header layout. */
#slideoverTitle.is-new-mode { color: var(--accent); }
#slideoverTitle.is-edit-mode { color: var(--text); }
.btn-xs {
font-size: 11px;
padding: 3px 10px;
@@ -1252,7 +1288,10 @@ input[type="range"]::-webkit-slider-thumb {
transform: translateX(100%);
transition: transform var(--t-base);
display: flex; flex-direction: column;
z-index: 30;
/* Above the topbar (z-index 40) — otherwise the topbar's
backdrop-filter stacking context clips the slideover header
(where the title / close button live) under it. */
z-index: 50;
}
.slideover.is-open { transform: translateX(0); }
.slideover-header {