From 7fd9c0cf43fbe0bfe19790de91b19971dd5a3aed Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 1 Oct 2026 11:40:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(viral-video):=20=E7=B4=A0=E6=9D=90=E5=BA=93?= =?UTF-8?q?=E9=9F=B3=E9=A2=91=E9=80=89=E6=8B=A9=E5=BC=B9=E7=AA=97=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=E7=AC=A6=E6=98=BE=E7=A4=BA=E4=BF=AE=E5=A4=8D+?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=A6=81=E7=94=A8=E6=80=81=E5=8F=AF=E8=A7=81?= =?UTF-8?q?=E6=80=A7=E5=8A=A0=E5=9B=BA=20(#2120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 素材库音频选择弹窗占位符修复(PR #2120) --- .../src/pages/viral-video/ViralVideoPage.css | 43 +++++++++++++++++++ .../components/AssetPickerModal.tsx | 18 +++++++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/apps/web/src/pages/viral-video/ViralVideoPage.css b/apps/web/src/pages/viral-video/ViralVideoPage.css index f3d314d08..fdbb0202b 100644 --- a/apps/web/src/pages/viral-video/ViralVideoPage.css +++ b/apps/web/src/pages/viral-video/ViralVideoPage.css @@ -1142,6 +1142,49 @@ text-align: left; padding: 0; flex: 1; + background: transparent; + display: flex; + align-items: center; + gap: 8px; + white-space: nowrap; + overflow: hidden; +} +.vv-asset-voice .vv-thumb-name-txt { + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + min-width: 0; +} +.vv-asset-voice .vv-thumb-dur { + flex: 0 0 auto; + font-size: 11px; + color: #9ca3af; + background: #f3f4f6; + padding: 1px 6px; + border-radius: 4px; +} +.vv-asset-voice .vv-thumb-ph { + width: 36px; + height: 36px; + flex: 0 0 36px; + font-size: 20px; + border-radius: 50%; + background: #f3f0ff; + color: #7c3aed; +} +.vv-asset-voice .vv-thumb-card img, +.vv-asset-voice .vv-thumb-card video { + width: 36px; + height: 36px; + flex: 0 0 36px; + border-radius: 50%; + object-fit: cover; +} +.vv-asset-voice .vv-thumb-check { + top: 50%; + right: 10px; + transform: translateY(-50%); } .vv-modal-empty { flex: 1; diff --git a/apps/web/src/pages/viral-video/components/AssetPickerModal.tsx b/apps/web/src/pages/viral-video/components/AssetPickerModal.tsx index bc85f706b..ffba79c3a 100644 --- a/apps/web/src/pages/viral-video/components/AssetPickerModal.tsx +++ b/apps/web/src/pages/viral-video/components/AssetPickerModal.tsx @@ -199,7 +199,16 @@ export default function AssetPickerModal({
{kind === "image" ? "🖼️" : kind === "video" ? "🎬" : "🎵"}
- 该素材库暂无{KIND_LABEL[kind]}素材 + {kind === "voice" ? ( + <> +
暂无配音素材
+
+ 请先在「配音/我的音色」中上传音频文件,或在素材库管理中添加 +
+ + ) : ( + <>该素材库暂无{KIND_LABEL[kind]}素材 + )} ) : (
@@ -221,7 +230,12 @@ export default function AssetPickerModal({ )} {active &&
✓
}
- {asset.name} + {asset.name} + {kind === "voice" && + typeof asset.duration === "number" && + asset.duration > 0 && ( + {Math.round(asset.duration)}s + )}
)