fix: 统一视频自由创作标题
This commit is contained in:
@@ -14,7 +14,10 @@
|
||||
/* 有 preview_url 显真图:铺满缩略容器、cover 裁切、继承 8px 圆角(由 .placeholder overflow:hidden 裁切) */
|
||||
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
|
||||
.asset-body { padding: 12px 14px; }
|
||||
.asset-name { font-size: 13px; font-weight: 600; color: var(--accent-black); }
|
||||
.asset-name {
|
||||
font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--accent-black);
|
||||
overflow-wrap: anywhere; word-break: break-word;
|
||||
}
|
||||
.asset-meta { font-size: 12px; color: var(--black-alpha-48); margin-top: 3px; font-family: var(--font-mono); letter-spacing: .02em; }
|
||||
.asset-badge { position: absolute; top: 8px; left: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; padding: 2px 6px; background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--r-sm); color: var(--black-alpha-56); }
|
||||
.asset-card { position: relative; }
|
||||
@@ -243,7 +246,8 @@ body.edit-mode .library-page .batch-card.selected { border-color: var(--heat); b
|
||||
.pack-modal-bg.under-confirm { z-index: 990; }
|
||||
.pack-modal { background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--r-md); width: min(900px, 92vw); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
|
||||
.pack-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-faint); }
|
||||
.pack-modal-h h2 { font-size: 16px; font-weight: 600; color: var(--accent-black); }
|
||||
.pack-modal-h > div { min-width: 0; }
|
||||
.pack-modal-h h2 { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--accent-black); overflow-wrap: anywhere; word-break: break-word; }
|
||||
.pack-modal-h .x { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--black-alpha-48); border-radius: var(--r-sm); cursor: pointer; flex-shrink: 0; }
|
||||
.pack-modal-h .x:hover { background: var(--black-alpha-8); color: var(--accent-black); }
|
||||
.pack-clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 18px 20px; overflow-y: auto; }
|
||||
@@ -253,7 +257,7 @@ body.edit-mode .library-page .batch-card.selected { border-color: var(--heat); b
|
||||
.pack-clip img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-sm); background: var(--background-lighter); display: block; transition: opacity .15s; }
|
||||
.pack-clip.as-btn:hover img { opacity: .88; }
|
||||
.pack-clip .pack-clip-ph { width: 100%; aspect-ratio: 9 / 16; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--background-lighter); }
|
||||
.pack-clip-name { font-size: 11px; color: var(--black-alpha-48); margin-top: 4px; text-align: center; letter-spacing: .02em; }
|
||||
.pack-clip-name { font-size: 11px; line-height: 1.5; color: var(--black-alpha-48); margin-top: 4px; text-align: center; letter-spacing: .02em; overflow-wrap: anywhere; word-break: break-word; }
|
||||
/* R108:批次弹窗内单张悬浮删除 icon(复用共享 .card-del-btn,这里只补 hover 触发,不改共享类本体) */
|
||||
.pack-modal .pack-clip { position: relative; }
|
||||
.pack-modal .pack-clip:hover .card-del-btn,
|
||||
|
||||
@@ -89,6 +89,7 @@ function personMissingTri(asset: Asset): boolean {
|
||||
}
|
||||
|
||||
function freeVideoToPack(asset: Asset): VideoPack {
|
||||
const displayName = asset.display_name?.trim() || asset.name || "视频自由创作";
|
||||
const files = asset.files || [];
|
||||
const video = files.find((f) => f.is_primary && (f.content_type || "").startsWith("video/"))
|
||||
|| files.find((f) => (f.content_type || "").startsWith("video/"));
|
||||
@@ -96,9 +97,9 @@ function freeVideoToPack(asset: Asset): VideoPack {
|
||||
|| files.find((f) => (f.content_type || "").startsWith("image/"));
|
||||
return {
|
||||
project_id: `free-video:${asset.id}`,
|
||||
project_name: asset.name || "视频自由创作",
|
||||
project_name: displayName,
|
||||
product_cover: poster?.preview_url || "",
|
||||
clips: [{ id: asset.id, name: asset.name || "视频", url: video?.preview_url || "" }]
|
||||
clips: [{ id: asset.id, name: displayName, url: video?.preview_url || "" }]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -234,6 +234,8 @@ export type Product = {
|
||||
export type Asset = {
|
||||
id: string;
|
||||
name: string;
|
||||
// 自由创作视频由后端从关联任务的完整 prompt 派生;其他资产与 name 相同。
|
||||
display_name?: string;
|
||||
asset_type: string;
|
||||
source: string;
|
||||
category: string;
|
||||
|
||||
Reference in New Issue
Block a user