fix: default mailbox selector while loading
Docker Release / Check web and api (push) Waiting to run
Docker Release / Resolve release tag (push) Blocked by required conditions
Docker Release / Build and publish all-in-one (push) Blocked by required conditions
Docker Release / Build and publish api (push) Blocked by required conditions
Docker Release / Build and publish web (push) Blocked by required conditions
Docker Release / Build and publish dovecot (push) Blocked by required conditions
Docker Release / Build and publish postfix (push) Blocked by required conditions
Docker Release / Build and publish rspamd (push) Blocked by required conditions
Docker Release / Create GitHub release (push) Blocked by required conditions
Docker Release / Check web and api (push) Waiting to run
Docker Release / Resolve release tag (push) Blocked by required conditions
Docker Release / Build and publish all-in-one (push) Blocked by required conditions
Docker Release / Build and publish api (push) Blocked by required conditions
Docker Release / Build and publish web (push) Blocked by required conditions
Docker Release / Build and publish dovecot (push) Blocked by required conditions
Docker Release / Build and publish postfix (push) Blocked by required conditions
Docker Release / Build and publish rspamd (push) Blocked by required conditions
Docker Release / Create GitHub release (push) Blocked by required conditions
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
## 本次更新
|
||||||
|
|
||||||
|
### 移除“加载邮箱”过渡文案
|
||||||
|
|
||||||
|
- 刷新邮箱页面时,邮箱选择器从第一帧开始显示“全部邮箱”。
|
||||||
|
- 邮箱列表在后台加载,不再显示不存在的“加载邮箱...”状态。
|
||||||
|
- 接口确认当前账号没有邮箱后,选择器才显示“未注册邮箱”。
|
||||||
|
|
||||||
|
### 验证
|
||||||
|
|
||||||
|
- 已通过前端 TypeScript 检查、生产构建和 shadcn/ui 检查。
|
||||||
|
|
||||||
|
**完整更新日志**:[v1.2.10...v1.2.11](https://github.com/zxyszx/NewSzxcn-Email/compare/v1.2.10...v1.2.11)
|
||||||
@@ -69,7 +69,6 @@ const exactTranslations: Record<string, Translation> = {
|
|||||||
"暂无标签": { "zh-TW": "暫無標籤", en: "No labels" },
|
"暂无标签": { "zh-TW": "暫無標籤", en: "No labels" },
|
||||||
"收起侧栏": { "zh-TW": "收合側欄", en: "Collapse sidebar" },
|
"收起侧栏": { "zh-TW": "收合側欄", en: "Collapse sidebar" },
|
||||||
"选择邮箱": { "zh-TW": "選擇信箱", en: "Select mailbox" },
|
"选择邮箱": { "zh-TW": "選擇信箱", en: "Select mailbox" },
|
||||||
"加载邮箱...": { "zh-TW": "載入信箱...", en: "Loading mailboxes..." },
|
|
||||||
"未注册邮箱": { "zh-TW": "未註冊信箱", en: "Unregistered mailbox" },
|
"未注册邮箱": { "zh-TW": "未註冊信箱", en: "Unregistered mailbox" },
|
||||||
"没有可用邮箱": { "zh-TW": "沒有可用信箱", en: "No mailboxes available" },
|
"没有可用邮箱": { "zh-TW": "沒有可用信箱", en: "No mailboxes available" },
|
||||||
"邮箱地址已复制": { "zh-TW": "信箱地址已複製", en: "Mailbox address copied" },
|
"邮箱地址已复制": { "zh-TW": "信箱地址已複製", en: "Mailbox address copied" },
|
||||||
|
|||||||
@@ -3252,7 +3252,7 @@ function MailboxSwitcher({ collapsed, mailboxes, loading, selectedMailboxId, sel
|
|||||||
const [mailboxQuery, setMailboxQuery] = React.useState("")
|
const [mailboxQuery, setMailboxQuery] = React.useState("")
|
||||||
const isAllSelected = selectedMailboxId === "all"
|
const isAllSelected = selectedMailboxId === "all"
|
||||||
const mailboxUnavailable = loading || mailboxes.length === 0
|
const mailboxUnavailable = loading || mailboxes.length === 0
|
||||||
const displayAddress = loading ? "加载邮箱..." : mailboxes.length === 0 ? "未注册邮箱" : isAllSelected ? "全部邮箱" : selectedMailbox?.address || "选择邮箱"
|
const displayAddress = loading ? "全部邮箱" : mailboxes.length === 0 ? "未注册邮箱" : isAllSelected ? "全部邮箱" : selectedMailbox?.address || "选择邮箱"
|
||||||
const selectedUnreadCount = isAllSelected ? unreadCount : (selectedMailbox?.unreadCount ?? unreadCount)
|
const selectedUnreadCount = isAllSelected ? unreadCount : (selectedMailbox?.unreadCount ?? unreadCount)
|
||||||
const normalizedQuery = mailboxQuery.trim().toLowerCase()
|
const normalizedQuery = mailboxQuery.trim().toLowerCase()
|
||||||
const showAllMailboxOption = !normalizedQuery || "全部邮箱".includes(normalizedQuery) || "all".includes(normalizedQuery)
|
const showAllMailboxOption = !normalizedQuery || "全部邮箱".includes(normalizedQuery) || "all".includes(normalizedQuery)
|
||||||
|
|||||||
Reference in New Issue
Block a user