35710e90bb08

remove Small text-size option; force Settings html/body and ghost buttons dark regardless of global theme (v3.6.53)

time
2026-05-20 01:27 UTC · 5 months ago
machine
koh2
parent
d87a4e8869d5
7 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/popup/App.tsx+6 −37src/popup/styles/settings-stack.css+18 −0src/popup/styles/vars.css+0 −7src/popup/views/Settings.tsx+1 −2
manifest.firefox.json+1 −1
@@ -2,7 +2,7 @@22   "_comment_audio_capture": "Firefox does not honor the Chrome 'audioCapture' optional_permission — getUserMedia in WebExtensions is gated solely by the runtime permission prompt. Microphone access for chirp pairing works from the popup under the existing '<all_urls>' host permission; no manifest entry is required or accepted here.",33   "manifest_version": 3,44   "name": "Peach",5-  "version": "3.6.52",5+  "version": "3.6.53",66   "description": "Zero-knowledge password manager",77   "browser_specific_settings": {88     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "3.6.52",4+  "version": "3.6.53",55   "description": "Zero-knowledge password manager",66   "action": {77     "default_popup": "src/popup/index.html",

view file

package.json+1 −1
@@ -1,6 +1,6 @@11 {22   "name": "peach",3-  "version": "3.6.52",3+  "version": "3.6.53",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/popup/App.tsx+6 −37
@@ -228,18 +228,6 @@228228   async function applyTextSize(size: "small" | "medium" | "large") {229229     setTextSize(size);230230     await sendMessage({ type: "UPDATE_SETTINGS", payload: { textSize: size } });231-    // Small zoom shrinks the html element itself, leaving a black strip in the232-    // already-open popup frame. Reload so Chrome measures fresh 294px dimensions.233-    if (size === "small" && chrome.storage.session) {234-      await chrome.storage.session.set({235-        peach_size_restore: {236-          view: view(),237-          entryId: selectedEntry()?.id ?? null,238-          settingsCard: settingsActiveCard(),239-        },240-      });241-      window.location.reload();242-    }243231   }244232 245233   async function applyReduceMotion(enabled: boolean) {@@ -408,35 +396,16 @@408396 409397     // Check for pending session-storage notices from the background.410398     if (chrome.storage.session) {411-      const session = await chrome.storage.session.get([412-        "pendingProGate",413-        "pendingProNotice",414-        "peach_size_restore",415-      ]) as Record<string, unknown>;416-      const proGate = session.pendingProGate as { feature?: string } | undefined;417-      const proNotice = session.pendingProNotice as { feature?: string } | undefined;418-      if (proGate?.feature) {399+      const session = await chrome.storage.session.get(["pendingProGate", "pendingProNotice"]) as400+        Record<string, { feature?: string } | undefined>;401+      if (session.pendingProGate?.feature) {419402         await chrome.storage.session.remove("pendingProGate");420-        setUpgradeHighlight((proGate.feature as ProFeature) ?? null);403+        setUpgradeHighlight((session.pendingProGate.feature as ProFeature) ?? null);421404         setSettingsInitialSection("license");422405         setView("settings");423-      } else if (proNotice?.feature) {406+      } else if (session.pendingProNotice?.feature) {424407         await chrome.storage.session.remove("pendingProNotice");425-        setPendingProNotice({ feature: proNotice.feature ?? "" });426-      }427-      const r = session.peach_size_restore as428-        { view: View; entryId: string | null; settingsCard: string } | undefined;429-      if (r) {430-        await chrome.storage.session.remove("peach_size_restore");431-        if (r.settingsCard) setSettingsActiveCard(r.settingsCard);432-        if (r.view === "settings") {433-          setView("settings");434-        } else if (r.view === "entry" && r.entryId) {435-          const entry = entries().find((e) => e.id === r.entryId);436-          if (entry) { setSelectedEntry(entry); setView("entry"); }437-        } else if (r.view !== "lock") {438-          setView(r.view);439-        }408+        setPendingProNotice({ feature: session.pendingProNotice.feature ?? "" });440409       }441410     }442411 

view file

src/popup/styles/settings-stack.css+18 −0
@@ -523,6 +523,24 @@523523   color: var(--peach-t0);524524 }525525 526+/* Force html/body backgrounds dark when Settings is mounted so the popup527+   frame chrome doesn't go white in light theme. */528+html:has(.peach-settings-overlay),529+html:has(.peach-settings-overlay) body {530+  background: #0C0A06;531+}532+533+/* Beat the .light .peach-btn--ghost rule in popup.css which would otherwise534+   paint Settings buttons with the light-theme surface color. */535+.peach-settings-overlay .stk-card .peach-btn--ghost:not(.peach-icon-btn) {536+  background: color-mix(in srgb, var(--peach-t0) 8%, transparent);537+  border-color: color-mix(in srgb, var(--peach-t0) 22%, transparent);538+  color: var(--peach-t0);539+}540+.peach-settings-overlay .stk-card .peach-btn--ghost:not(.peach-icon-btn):hover {541+  background: color-mix(in srgb, var(--peach-t0) 16%, transparent);542+}543+526544 .peach-settings-overlay .stk-shell {527545   background: var(--peach-bg);528546 }

view file

src/popup/styles/vars.css+0 −7
@@ -229,17 +229,10 @@229229    dense Vault and Health views don't clip the fixed-size popup surface.230230    The CSS custom property is also exposed so desktop / mobile builds can231231    use a calc() multiplier on layouts that don't fit `zoom` semantics. */232-[data-text-size="small"]  { --peach-text-scale: 0.92; }233232 [data-text-size="medium"] { --peach-text-scale: 1; }234233 [data-text-size="large"]  { --peach-text-scale: 1.08; }235-/* large: zoom on html so Chrome auto-expands the popup frame to 346×561px.236-   small: zoom on body (not html) so html still fills the 320px frame —237-   avoids the black strip that appears when the popup is already open and238-   the user switches size; html background (#0C0A06) matches body background239-   and covers the gap invisibly. */240234 html { background: var(--bg); }241235 html[data-text-size="large"] { zoom: 1.08; }242-html[data-text-size="small"] body { zoom: 0.92; }243236 244237 /* ─── Reduced motion ───────────────────────────────────────────────────245238    User-explicit setting OR OS-level prefers-reduced-motion both collapse

view file

src/popup/views/Settings.tsx+1 −2
@@ -1237,8 +1237,7 @@12371237   }12381238 12391239   function renderAppearance() {1240-    const sizeOptions: Array<{ id: "small" | "medium" | "large"; label: string }> = [1241-      { id: "small", label: "Small" },1240+    const sizeOptions: Array<{ id: "medium" | "large"; label: string }> = [12421241       { id: "medium", label: "Default" },12431242       { id: "large", label: "Large" },12441243     ];

view file