From 3abee08b2f4800daaba40da551a3c588f1888673 Mon Sep 17 00:00:00 2001 From: hzm <934585316@qq.com> Date: Tue, 10 Feb 2026 08:41:42 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=88=86=E7=BB=84=E6=B1=87?= =?UTF-8?q?=E6=80=BB=E7=BD=AE=E9=A1=B6=E5=8F=AF=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/Icons.jsx | 20 ++++++++++++++++++++ app/globals.css | 10 ++++++++++ app/page.jsx | 28 +++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/app/components/Icons.jsx b/app/components/Icons.jsx index 27f4c99..62a52cc 100644 --- a/app/components/Icons.jsx +++ b/app/components/Icons.jsx @@ -8,6 +8,26 @@ export function PlusIcon(props) { ); } +export function PinIcon(props) { + return ( + + + + + ); +} + +export function PinOffIcon(props) { + return ( + + + + + + + ); +} + export function UpdateIcon(props) { return ( diff --git a/app/globals.css b/app/globals.css index 2436836..2120723 100644 --- a/app/globals.css +++ b/app/globals.css @@ -420,6 +420,16 @@ input[type="number"] { transform: translateY(0); } +.sticky-toggle-btn { + display: none !important; +} + +@media (max-width: 640px) { + .sticky-toggle-btn { + display: inline-flex !important; + } +} + .icon-button.danger { background: linear-gradient(180deg, #ef4444, #f87171); color: #2b0b0b; diff --git a/app/page.jsx b/app/page.jsx index 12a1c0c..cce54f6 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -9,7 +9,7 @@ import utc from 'dayjs/plugin/utc'; import timezone from 'dayjs/plugin/timezone'; import Announcement from "./components/Announcement"; import { DatePicker, DonateTabs, NumericInput, Stat } from "./components/Common"; -import { ChevronIcon, CloseIcon, CloudIcon, DragIcon, ExitIcon, EyeIcon, EyeOffIcon, GridIcon, ListIcon, LoginIcon, LogoutIcon, MailIcon, PlusIcon, RefreshIcon, SettingsIcon, SortIcon, StarIcon, TrashIcon, UpdateIcon, UserIcon } from "./components/Icons"; +import { ChevronIcon, CloseIcon, CloudIcon, DragIcon, ExitIcon, EyeIcon, EyeOffIcon, GridIcon, ListIcon, LoginIcon, LogoutIcon, MailIcon, PinIcon, PinOffIcon, PlusIcon, RefreshIcon, SettingsIcon, SortIcon, StarIcon, TrashIcon, UpdateIcon, UserIcon } from "./components/Icons"; import githubImg from "./assets/github.svg"; import weChatGroupImg from "./assets/weChatGroup.png"; import { supabase, isSupabaseConfigured } from './lib/supabase'; @@ -1729,6 +1729,7 @@ function CountUp({ value, prefix = '', suffix = '', decimals = 2, className = '' function GroupSummary({ funds, holdings, groupName, getProfit }) { const [showPercent, setShowPercent] = useState(true); const [isMasked, setIsMasked] = useState(false); + const [isSticky, setIsSticky] = useState(false); const rowRef = useRef(null); const [assetSize, setAssetSize] = useState(24); const [metricSize, setMetricSize] = useState(18); @@ -1790,7 +1791,25 @@ function GroupSummary({ funds, holdings, groupName, getProfit }) { if (!summary.hasHolding) return null; return ( - + + + setIsSticky(!isSticky)} + style={{ + position: 'absolute', + top: 4, + right: 4, + width: 24, + height: 24, + padding: 4, + opacity: 0.6, + zIndex: 10, + color: 'var(--muted)' + }} + > + {isSticky ? : } + @@ -1855,6 +1874,7 @@ function GroupSummary({ funds, holdings, groupName, getProfit }) { + ); } @@ -4107,14 +4127,12 @@ export default function HomePage() { ) : ( <> - - - {currentTab !== 'all' && currentTab !== 'fav' && (