aee880956950

fix: Move Sync now to global status (v4.3.4)

time
2026-07-27 22:09 UTC · 3 months ago
machine
koh2
parent
ccb6a770acb0
5 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/popup/views/Settings.tsx+15 −12src/popup/views/contracts.test.tsx+12 −0
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "4.3.3",4+  "version": "4.3.4",55   "description": "Zero-knowledge password manager",66   "browser_specific_settings": {77     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "4.3.3",4+  "version": "4.3.4",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": "4.3.3",3+  "version": "4.3.4",44   "description": "Zero-knowledge password manager",55   "license": "GPL-3.0-only",66   "type": "module",

view file

src/popup/views/Settings.tsx+15 −12
@@ -1583,6 +1583,21 @@15831583               {syncFlash() ?? lastSyncLine()}15841584             </span>15851585           </div>1586+          <Show when={pairedDevices().length > 0}>1587+            <div class="peach-settings-row peach-settings-row--meta">1588+              <span class="peach-settings-value" style="color:var(--peach-t2)">1589+                {(syncSummary().entriesSent ?? 0) + (syncSummary().entriesReceived ?? 0) > 01590+                  ? `${syncSummary().entriesSent ?? 0} sent · ${syncSummary().entriesReceived ?? 0} received`1591+                  : ""}1592+              </span>1593+              <button1594+                class="peach-btn peach-btn--subtle peach-btn--sm"1595+                aria-label="Sync this vault now"1596+                disabled={syncStatus() === "syncing"}1597+                onClick={() => void syncNow()}1598+              >{syncStatus() === "syncing" ? "syncing…" : "sync now"}</button>1599+            </div>1600+          </Show>15861601 15871602           <p class="peach-settings-sub-label">ADD A DEVICE</p>15881603           <button@@ -1653,18 +1668,6 @@16531668                 </div>16541669               )}16551670             </For>1656-            <div class="peach-settings-row peach-settings-row--meta">1657-              <span class="peach-settings-value" style="color:var(--peach-t2)">1658-                {(syncSummary().entriesSent ?? 0) + (syncSummary().entriesReceived ?? 0) > 01659-                  ? `${syncSummary().entriesSent ?? 0} sent · ${syncSummary().entriesReceived ?? 0} received`1660-                  : ""}1661-              </span>1662-              <button1663-                class="peach-btn peach-btn--subtle peach-btn--sm"1664-                disabled={syncStatus() === "syncing"}1665-                onClick={() => void syncNow()}1666-              >{syncStatus() === "syncing" ? "syncing…" : "sync now"}</button>1667-            </div>16681671           </Show>16691672 16701673           <Show when={pendingVouched().length > 0}>

view file

src/popup/views/contracts.test.tsx+12 −0
@@ -505,6 +505,18 @@505505     expect(container.textContent).toContain("PAIRED DEVICES");506506     expect(container.textContent).toContain("June's Phone");507507     expect(container.textContent).toContain("Android");508+    const syncNowButton = container.querySelector<HTMLButtonElement>(509+      'button[aria-label="Sync this vault now"]',510+    )!;511+    const labels = Array.from(container.querySelectorAll(".peach-settings-sub-label"));512+    const addDeviceLabel = labels.find((label) => label.textContent?.includes("ADD A DEVICE"))!;513+    const pairedDevicesLabel = labels.find((label) => label.textContent?.includes("PAIRED DEVICES"))!;514+    expect(515+      syncNowButton.compareDocumentPosition(addDeviceLabel) & Node.DOCUMENT_POSITION_FOLLOWING,516+    ).toBeTruthy();517+    expect(518+      syncNowButton.compareDocumentPosition(pairedDevicesLabel) & Node.DOCUMENT_POSITION_FOLLOWING,519+    ).toBeTruthy();508520 509521     Array.from(container.querySelectorAll("button"))510522       .find((b) => (b.textContent ?? "").trim() === "remove")!

view file