73c8f4c7705d

fix ghost word descender clip, card title spacing and line-height, back button two-level settings nav, peach:back dispatches to deck, lock-on-close reads storage on SW restart

time
2026-05-19 02:13 UTC · 5 months ago
machine
koh2
parent
be7d2b7a4585
5 files src/background/index.ts+3 −2src/popup/App.tsx+5 −1src/popup/components/settings/StackDeck.tsx+17 −2src/popup/styles/settings-stack.css+2 −2src/popup/views/Entry.tsx+1 −1
src/background/index.ts+3 −2
@@ -1,6 +1,6 @@11 import { setupMessageHandler } from "./messages";22 import { setupAutoLock } from "./alarms";3-import { getSettings, isUnlocked, lock } from "./vault";3+import { ensureSettingsLoaded, isUnlocked, lock } from "./vault";44 import { isRecoveryConfirmPending } from "./recovery-pending";55 import { denyAllPendingPasskeyRequests } from "./passkey";66 @@ -17,7 +17,8 @@1717     // settings — leaving them stuck blocks the page's navigator.credentials1818     // promise for the full 60s timeout (M8/COR-009).1919     await denyAllPendingPasskeyRequests();20-    if (!isUnlocked() || getSettings().lockOnClose === false) return;20+    const s = await ensureSettingsLoaded();21+    if (!isUnlocked() || s.lockOnClose === false) return;2122     // Skip lock while the user is mid-recovery-confirmation; locking here2223     // would discard the in-memory key needed to re-derive the recovery2324     // words on the next popup open, permanently losing them.

view file

src/popup/App.tsx+5 −1
@@ -515,7 +515,11 @@515515         return;516516       }517517       if (v === "list") { setView("entry"); return; }518-      if (v === "settings" || v === "import" || v === "export" || v === "add" || v === "health") {518+      if (v === "settings") {519+        window.dispatchEvent(new Event("peach:settings-back"));520+        return;521+      }522+      if (v === "import" || v === "export" || v === "add" || v === "health") {519523         handleBack();520524         return;521525       }

view file

src/popup/components/settings/StackDeck.tsx+17 −2
@@ -1,4 +1,4 @@1-import { createMemo, createSignal, For, Show } from "solid-js";1+import { createMemo, createSignal, For, Show, onMount, onCleanup } from "solid-js";22 import { StackCard } from "./StackCard";33 import type { CardId, StackBodies, StackCardSpec } from "./types";44 @@ -17,6 +17,21 @@1717 1818 export function StackDeck(props: StackDeckProps) {1919   const [deckOpen, setDeckOpen] = createSignal(true);20+21+  function handleBack() {22+    if (!deckOpen()) {23+      setDeckOpen(true);24+    } else {25+      props.onBack();26+    }27+  }28+29+  onMount(() => {30+    const listener = () => handleBack();31+    window.addEventListener("peach:settings-back", listener);32+    onCleanup(() => window.removeEventListener("peach:settings-back", listener));33+  });34+2035   const activeIndex = createMemo(() => {2136     const idx = props.cards.findIndex((card) => card.id === props.active);2237     return idx >= 0 ? idx : 0;@@ -27,7 +42,7 @@2742       <div class="stk-mast">2843         <button2944           class="stk-back"30-          onClick={props.onBack}45+          onClick={handleBack}3146           aria-label="Back"3247           type="button"3348         >

view file

src/popup/styles/settings-stack.css+2 −2
@@ -141,12 +141,12 @@141141 .stk-card-title {142142   position: relative;143143   z-index: 1;144-  margin: 0;144+  margin: 6px 0 0;145145   font-family: var(--font-display);146146   font-style: italic;147147   font-weight: 400;148148   font-size: 26px;149-  line-height: 1;149+  line-height: 1.2;150150 }151151 152152 .stk-card-lede {

view file

src/popup/views/Entry.tsx+1 −1
@@ -519,7 +519,7 @@519519       <div520520         class="peach-ghost"521521         aria-hidden="true"522-        style="position:absolute;top:30px;left:12px;right:0;font-family:'Cormorant Garamond',Georgia,serif;font-size:150px;font-style:italic;font-weight:400;color:var(--t0);opacity:var(--peach-ghost-opacity,0.03);pointer-events:none;line-height:1;overflow:hidden;white-space:nowrap;z-index:0;"522+        style="position:absolute;top:30px;left:12px;right:0;font-family:'Cormorant Garamond',Georgia,serif;font-size:150px;font-style:italic;font-weight:400;color:var(--t0);opacity:var(--peach-ghost-opacity,0.03);pointer-events:none;line-height:1.25;overflow:hidden;white-space:nowrap;z-index:0;"523523       >524524         {props.entry?.title || "empty"}525525       </div>

view file