From 63c7c0bc608e7a37d7d83c1344c5e993a299e705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E7=BF=94=E5=AE=87?= Date: Mon, 18 May 2026 20:29:00 +0800 Subject: [PATCH 1/3] feat(ui): toast + confirm dialog + list animations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add operation feedback across the three interactive paths in 看盘侠: - Toast: ObservableObject + view modifier, lime/red/yellow palette matching FundTheme. Auto-dismiss after 2.6s, click to dismiss. - ConfirmDialog: programmatic ask() returning async Bool via a captured CheckedContinuation. Danger flag flips the confirm button to a red palette. - HoldingsView: row remove now asks for confirmation (the trash UI is a hover-only ✕ — easy to misclick); on confirm, row slides out to the leading edge with a spring + a success toast lands. - HoldingsView: position edit Save / Clear surface the right semantic toast (success for save, info for clear). - AddView: adding a fund toasts the name; tapping an already-added row toasts an info reminder rather than silently no-op'ing. Bump version 0.2.0 → 0.3.0 (Info.plist + FundPlugin.version). Co-Authored-By: Claude Opus 4.7 (1M context) --- Info.plist | 4 +- Sources/FundPlugin.swift | 2 +- Sources/ui/AddView.swift | 7 ++ Sources/ui/ConfirmDialog.swift | 178 +++++++++++++++++++++++++++++++++ Sources/ui/ExpandedView.swift | 6 ++ Sources/ui/HoldingsView.swift | 38 ++++++- Sources/ui/Toast.swift | 146 +++++++++++++++++++++++++++ 7 files changed, 376 insertions(+), 5 deletions(-) create mode 100644 Sources/ui/ConfirmDialog.swift create mode 100644 Sources/ui/Toast.swift diff --git a/Info.plist b/Info.plist index 65ee3f4..38df799 100644 --- a/Info.plist +++ b/Info.plist @@ -15,9 +15,9 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.2.0 + 0.3.0 CFBundleVersion - 2 + 3 NSPrincipalClass FundPlugin.FundPlugin