From dbd1f8706d5b5c6f1af118b2a0ca1383724e552b Mon Sep 17 00:00:00 2001 From: YewFence Date: Wed, 8 Jul 2026 14:21:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=85=A8=E5=AE=BD?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=A7=86=E5=9B=BE=E5=8A=9F=E8=83=BD=20(#1079?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(mailbox): add list view mode - Add a toggleable list view for the mailbox, with a settings option and back button. - deselect mail on second click in list view - set current mail on row click in multi-action mode * feat(mailbox): add configurable body preview line clamp Allow users to set the number of preview lines (0–5) for mail body in the list view via a slider in Appearance settings. Includes i18n support for the new option and its "Off" state. * chore: clarify some i18n message in settings include the following changes: - The original "Mailbox Split Size" to "Left list width in two-column mailbox view" - The description of new feature "Full-width mailbox list view" sync all languages with the updated message * docs: update changelog with recent UI improvements - Added mailbox full-width list view and body preview lines settings - Extended left panel width ratio range to 0 - Included English changelog translations * docs: fix CHANGELOG improvements types * fix: enable mail list preview line clamp settings on mobile --- CHANGELOG.md | 5 + CHANGELOG_EN.md | 5 + frontend/src/components/MailBox.vue | 166 +++++++++++++++++++++-- frontend/src/components/SendBox.vue | 28 +++- frontend/src/i18n/locales/source/de.ts | 6 +- frontend/src/i18n/locales/source/es.ts | 6 +- frontend/src/i18n/locales/source/ja.ts | 6 +- frontend/src/i18n/locales/source/ptBR.ts | 6 +- frontend/src/i18n/message-registry.ts | 20 ++- frontend/src/store/index.js | 4 + frontend/src/views/common/Appearance.vue | 18 ++- 11 files changed, 247 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f80796..3f016f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ ### Features +- feat: |Frontend| 邮箱新增「邮箱全宽列表视图」开关(在外观设置中控制),开启后默认全宽列表展示邮件标题与正文预览,点击单封邮件再展开为双栏,再次点击同一封邮件可回到列表视图;多选模式下点击邮件会同步切换勾选状态与右侧预览,并禁用同邮件点击收回列表,展开时双栏左侧列表宽度仍遵循「邮箱双栏视图左侧列表宽度占比」配置;默认关闭,保留原有双栏行为 +- feat: |Frontend| 邮箱全宽列表视图新增「正文预览行数」配置(在外观设置中控制),可设置邮件正文预览的最大行数,默认 2 行,0 表示关闭预览 + ### Bug Fixes - fix: |AI 提取| 强化提示词,要求 AI 保持邮件原始链接域名,避免小模型改写验证链接域名导致错误跳转(issue #1072) @@ -18,6 +21,8 @@ ### Improvements +- feat: |Frontend| 「邮箱双栏视图左侧列表宽度占比」最小值由 0.25 放宽至 0,左侧列表可完全折叠使正文近乎全屏,刻度增加 0 点;收件箱与发件箱的双栏拆分同步生效,并优化外观设置文案以明确该比例控制左侧邮件列表宽度 + ## v1.9.0 ### Features diff --git a/CHANGELOG_EN.md b/CHANGELOG_EN.md index 8972664..cffca04 100644 --- a/CHANGELOG_EN.md +++ b/CHANGELOG_EN.md @@ -10,6 +10,9 @@ ### Features +- feat: |Frontend| Add a "Full-width mailbox list view" toggle in Appearance settings. When enabled, the mailbox shows a full-width list of subjects and body previews by default; clicking a mail expands it into the two-pane split view, clicking the same mail again returns to the list view; in multi-select mode, clicking a mail updates both its checked state and the right-side preview while disabling same-mail collapse, and the split width still follows the "Left list width in two-column mailbox view" setting. Defaults to off, preserving the original two-pane behavior +- feat: |Frontend| Add "Body Preview Lines" in Appearance settings for the full-width mailbox list view, allowing runtime control over the body-preview clamp. It defaults to 2 lines, and 0 disables previews + ### Bug Fixes - fix: |AI Extract| Strengthen the prompt to keep original link domains from the email, preventing small models from rewriting verification-link domains (issue #1072) @@ -18,6 +21,8 @@ ### Improvements +- feat: |Frontend| Lower the "Left list width in two-column mailbox view" minimum from 0.25 to 0 so the left list pane can fully collapse for a near-fullscreen content view, with a 0 mark added; applies to both the inbox and send-box two-pane splits, and clarifies the Appearance setting label so it is clear the value controls the left mail list width + ## v1.9.0 ### Features diff --git a/frontend/src/components/MailBox.vue b/frontend/src/components/MailBox.vue index 30d6271..ce16d66 100644 --- a/frontend/src/components/MailBox.vue +++ b/frontend/src/components/MailBox.vue @@ -60,7 +60,7 @@ const props = defineProps({ const localFilterKeyword = ref('') const { - isDark, mailboxSplitSize, indexTab, loading, useUTCDate, + isDark, mailboxSplitSize, mailListView, mailListPreviewLineClamp, indexTab, loading, useUTCDate, autoRefresh, configAutoRefreshInterval, sendMailModel } = useGlobalState() const autoRefreshInterval = ref(configAutoRefreshInterval.value) @@ -71,6 +71,12 @@ const count = ref(0) const page = ref(1) const pageSize = ref(20) +const mailListPreviewLineClampValue = computed(() => { + const value = Number(mailListPreviewLineClamp.value) + if (!Number.isFinite(value)) return 0 + return Math.min(5, Math.max(0, Math.round(value))) +}) + // Computed property for filtered data (only filter current page) const data = computed(() => { if (!localFilterKeyword.value || localFilterKeyword.value.trim() === '') { @@ -183,7 +189,7 @@ const refresh = async () => { count.value = totalCount; } curMail.value = null; - if (!isMobile.value && data.value.length > 0) { + if (!isMobile.value && !mailListView.value && data.value.length > 0) { curMail.value = data.value[0]; } } catch (error) { @@ -202,6 +208,11 @@ const backFirstPageAndRefresh = async () => { const clickRow = async (row) => { if (multiActionMode.value) { row.checked = !row.checked; + curMail.value = row; + return; + } + if (mailListView.value && curMail.value?.id === row.id) { + curMail.value = null; return; } curMail.value = row; @@ -375,8 +386,13 @@ onBeforeUnmount(() => { clearable /> - + +