diff --git a/web/src/components/MailView.tsx b/web/src/components/MailView.tsx index 4cc5098..6dac534 100644 --- a/web/src/components/MailView.tsx +++ b/web/src/components/MailView.tsx @@ -676,6 +676,9 @@ function ReplyBar({ // 抄送默认收起:多数回复不需要它,常驻一行输入框只会挤掉正文空间。 // 原邮件带抄送时自动展开并预填 —— 「回复全部」是人在这种场景下的默认预期 const [ccOpen, setCcOpen] = useState(false); + const [budgetEditing, setBudgetEditing] = useState(false); + const [budgetBusy, setBudgetBusy] = useState(false); + const [maxRoundsDraft, setMaxRoundsDraft] = useState(''); const [attachments, setAttachments] = useState([]); const [busy, setBusy] = useState(false); const [error, setError] = useState(null); @@ -684,6 +687,8 @@ function ReplyBar({ const fetchSessions = useSessionStore(s => s.fetchSessions); const fetchContacts = useContactStore(s => s.fetchContacts); const selectSession = useSessionStore(s => s.selectSession); + const budget = useSessionStore(s => s.budget); + const setBudget = useSessionStore(s => s.setBudget); const me = useAuthStore(s => s.user?.username || ''); if (!replyTo) return null; @@ -774,6 +779,58 @@ function ReplyBar({
{error && {error}}
+ {budget && !budgetEditing && ( + + )} + {budget && budgetEditing && ( + + 预算 + setMaxRoundsDraft(e.target.value)} + inputMode="numeric" + placeholder="不限" + autoFocus + className="w-14 text-xs border border-gray-300 rounded px-1.5 py-0.5 focus:outline-none focus:ring-2 focus:ring-blue-100" + /> + + + + )}