feat: 消息气泡长文字支持「展开全部/收起全部」折叠

- 新增 CollapsibleText 组件:超过 8 行文字自动折叠,按行高对齐裁切,底部柔和渐隐遮罩暗示有更多内容
- 折叠按钮左对齐,胶囊样式 + chevron 图标,hover 浅背景高亮,点击 chevron 旋转 180°
- 应用到全部 5 种气泡:Text/ImageWithText/Album/Video/FileDoc
- 动画统一使用 motion 包的 EASE_OUT 缓动,尊重 reducedMotion=user
- i18n 七种语言新增 showMore/showLess 文案
This commit is contained in:
TerryM
2026-05-29 23:49:59 +08:00
parent a7792c117d
commit b283ba74da
7 changed files with 170 additions and 12 deletions

View File

@@ -45,6 +45,8 @@ const zhDict: Dict = {
downloading: "下载中…",
downloadOk: "下载完成",
downloadFail: "下载失败,请重试",
showMore: "展开全部",
showLess: "收起全部",
share: "分享",
langLabel: "语言",
admin: "后台",
@@ -175,6 +177,8 @@ const enDict: Dict = {
downloading: "Downloading…",
downloadOk: "Download complete",
downloadFail: "Download failed, please retry",
showMore: "Show all",
showLess: "Show less",
share: "Share",
langLabel: "Language",
admin: "Admin",
@@ -291,6 +295,8 @@ const languageNames: Record<Lang, Dict> = {
},
ja: {
brand: "ARK ライブラリー",
showMore: "すべて表示",
showLess: "閉じる",
lang_zh_CN: "中国語",
lang_en: "英語",
lang_ja: "日本語",
@@ -301,6 +307,8 @@ const languageNames: Record<Lang, Dict> = {
},
ko: {
brand: "ARK 라이브러리",
showMore: "모두 보기",
showLess: "접기",
lang_zh_CN: "중국어",
lang_en: "영어",
lang_ja: "일본어",
@@ -311,6 +319,8 @@ const languageNames: Record<Lang, Dict> = {
},
vi: {
brand: "Thư viện ARK",
showMore: "Xem tất cả",
showLess: "Thu gọn",
lang_zh_CN: "Tiếng Trung",
lang_en: "Tiếng Anh",
lang_ja: "Tiếng Nhật",
@@ -321,6 +331,8 @@ const languageNames: Record<Lang, Dict> = {
},
id: {
brand: "Perpustakaan ARK",
showMore: "Lihat semua",
showLess: "Tutup",
lang_zh_CN: "Bahasa Tionghoa",
lang_en: "Bahasa Inggris",
lang_ja: "Bahasa Jepang",
@@ -331,6 +343,8 @@ const languageNames: Record<Lang, Dict> = {
},
ms: {
brand: "Perpustakaan ARK",
showMore: "Lihat semua",
showLess: "Tutup",
lang_zh_CN: "Bahasa Cina",
lang_en: "Bahasa Inggeris",
lang_ja: "Bahasa Jepun",