diff --git a/.github/release-notes/v1.2.26.md b/.github/release-notes/v1.2.26.md new file mode 100644 index 0000000..33c1ddb --- /dev/null +++ b/.github/release-notes/v1.2.26.md @@ -0,0 +1,7 @@ +- 修复手机端删除自定义文件夹时菜单先消失、确认框无法显示的问题,文件夹菜单现在与移动侧栏保持在同一交互层中。 +- 删除文件夹前会稳定显示确认信息,提交后显示处理中状态,避免重复操作;文件夹内邮件仍会安全移回收件箱。 +- 修复手机侧栏中新建文件夹弹窗被侧栏遮挡或立即关闭的问题,侧栏退出后再打开创建界面。 +- 重做手机端“新建规则 / 编辑规则”布局:标题、表单与底部操作区改为纵向结构,内容区域可独立滚动。 +- 优化规则条件与动作的窄屏排列,字段和运算符并排、输入框独占一行,添加与删除按钮保持易点击且不会挤出屏幕。 +- 规则底部创建和取消按钮固定可见并适配手机安全区域,多条件、多动作时仍可顺畅滚动和提交。 +- 优化通用确认弹窗的手机宽度和按钮触控尺寸,减少误触并避免贴边显示。 diff --git a/VERSION b/VERSION index 8060c02..cba64f4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.25 +1.2.26 diff --git a/apps/web/src/components/confirm-dialog.tsx b/apps/web/src/components/confirm-dialog.tsx index fe1c0c3..cf4da4e 100644 --- a/apps/web/src/components/confirm-dialog.tsx +++ b/apps/web/src/components/confirm-dialog.tsx @@ -26,12 +26,12 @@ export function ConfirmDialog({ }: ConfirmDialogProps) { return ( - + {title} {description &&
{description}
} - + diff --git a/apps/web/src/pages/mail.tsx b/apps/web/src/pages/mail.tsx index 86f60d9..d935686 100644 --- a/apps/web/src/pages/mail.tsx +++ b/apps/web/src/pages/mail.tsx @@ -961,6 +961,14 @@ export function MailPage() { function closeSidebarContextMenu() { setSidebarContextMenu(null) } + function runAfterClosingMobileSidebar(action: () => void) { + if (!isMobile) { + action() + return + } + if (mobileSidebarOpen) setMobileSidebarOpen(false) + window.setTimeout(action, 250) + } function activateSidebarItem(item: MailMenuItem) { if (item.type === "starred") openStarred() else if (item.type === "scheduled") openScheduled() @@ -1432,7 +1440,7 @@ export function MailPage() {
文件夹 {canManageFolders && ( - )} @@ -1553,6 +1561,34 @@ export function MailPage() { } + { + closeSidebarContextMenu() + activateSidebarItem(item) + }} + onRefresh={() => { + closeSidebarContextMenu() + void refreshMailData() + }} + onCreateFolder={() => { + closeSidebarContextMenu() + runAfterClosingMobileSidebar(() => setFolderDialogOpen(true)) + }} + onMove={(item, action) => { + closeSidebarContextMenu() + moveSidebarFolder(item, action) + }} + onDelete={(item) => { + closeSidebarContextMenu() + runAfterClosingMobileSidebar(() => confirmDeleteFolder(item)) + }} + /> ) @@ -1871,34 +1907,6 @@ export function MailPage() { active ? removeLabel.mutate({ id: message.id, labelId: label.id }) : addLabel.mutate({ id: message.id, label }) }} /> - { - closeSidebarContextMenu() - activateSidebarItem(item) - }} - onRefresh={() => { - closeSidebarContextMenu() - void refreshMailData() - }} - onCreateFolder={() => { - closeSidebarContextMenu() - setFolderDialogOpen(true) - }} - onMove={(item, action) => { - closeSidebarContextMenu() - moveSidebarFolder(item, action) - }} - onDelete={(item) => { - closeSidebarContextMenu() - confirmDeleteFolder(item) - }} - /> { if (!open) setPendingConfirm(null) }} onConfirm={() => pendingConfirm?.onConfirm()} /> diff --git a/apps/web/src/pages/profile.tsx b/apps/web/src/pages/profile.tsx index 3039605..cad3e3a 100644 --- a/apps/web/src/pages/profile.tsx +++ b/apps/web/src/pages/profile.tsx @@ -2336,13 +2336,13 @@ function RuleDialog({ open, onOpenChange, mailboxes, labels, verifiedEmails, pen return ( - - + + {initialRule ? "编辑规则" : "新建规则"}
-
- setName(event.target.value)} placeholder="我的规则" /> +
+ setName(event.target.value)} placeholder="我的规则" />
@@ -2355,18 +2355,20 @@ function RuleDialog({ open, onOpenChange, mailboxes, labels, verifiedEmails, pen
{conditions.map((condition, index) => ( -
+
- updateCondition(index, { value: event.target.value })} placeholder={conditionPlaceholder(condition.field)} /> - - + updateCondition(index, { value: event.target.value })} placeholder={conditionPlaceholder(condition.field)} /> +
+ + +
))}
@@ -2376,14 +2378,16 @@ function RuleDialog({ open, onOpenChange, mailboxes, labels, verifiedEmails, pen
执行以下动作
{actions.map((action, index) => ( -
+
- updateAction(index, patch)} /> - - {action.type !== "forward" && } +
updateAction(index, patch)} />
+
+ + +
))}
@@ -2394,13 +2398,13 @@ function RuleDialog({ open, onOpenChange, mailboxes, labels, verifiedEmails, pen
-
+
- +
- + @@ -2458,7 +2462,7 @@ function verifiedRuleForwardTargets(value: string, verifiedEmails: string[]) { function RuleCheckbox({ checked, onCheckedChange, label }: { checked: boolean; onCheckedChange: (checked: boolean) => void; label: string }) { const id = React.useId() - return
onCheckedChange(value === true)} />
+ return
onCheckedChange(value === true)} />
} function RuleListItem({ item, index, count, mailboxLabel, pending, onEdit, onToggle, onMove, onApply, onDelete }: { item: MailRule; index: number; count: number; mailboxLabel: string; pending: boolean; onEdit: () => void; onToggle: () => void; onMove: (direction: "up" | "down") => void; onApply: () => void; onDelete: (id: string) => void }) {