From aedc0e37a23861b615bd6070484f22deab5c8f25 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sun, 19 Jul 2026 11:01:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(P1):=20=E8=A1=A5=E5=85=85AssetKind=E7=9A=84?= =?UTF-8?q?voice=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8DTS=E7=B1=BB=E5=9E=8B=E6=A3=80=E6=9F=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/pages/assets/AssetLibrary.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/assets/AssetLibrary.tsx b/apps/web/src/pages/assets/AssetLibrary.tsx index 322665c08..4bee329b0 100755 --- a/apps/web/src/pages/assets/AssetLibrary.tsx +++ b/apps/web/src/pages/assets/AssetLibrary.tsx @@ -32,6 +32,7 @@ import { ThunderboltOutlined, CheckCircleOutlined, CloseCircleOutlined, + AudioOutlined, } from "@ant-design/icons" import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" import { @@ -56,7 +57,7 @@ import "./assets.css" /* ============================================================ * 类型 * ============================================================ */ -type AssetKind = "video" | "image" +type AssetKind = "video" | "image" | "voice" type StatusType = "ok" | "warn" | "bad" | "info" interface LibraryItem { @@ -88,6 +89,7 @@ interface AssetItem { /** 根据 mime_type 推断前端 AssetKind */ const inferKind = (mimeType: string): AssetKind => { if (mimeType.startsWith("video/")) return "video" + if (mimeType.startsWith("audio/")) return "voice" return "image" } @@ -191,6 +193,8 @@ const kindIcon = (kind: AssetKind) => { return case "image": return + case "voice": + return } } @@ -200,6 +204,8 @@ const kindLabel = (kind: AssetKind) => { return "视频" case "image": return "图片" + case "voice": + return "配音" } } @@ -210,6 +216,8 @@ const thumbGradient = (kind: AssetKind): string => { return "linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%)" case "image": return "linear-gradient(135deg, #78350f 0%, #d97706 50%, #f59e0b 100%)" + case "voice": + return "linear-gradient(135deg, #064e3b 0%, #059669 50%, #10b981 100%)" } }