diff --git a/src/components/AssetGalleryTile/index.tsx b/src/components/AssetGalleryTile/index.tsx index 994dbf4..76da45e 100644 --- a/src/components/AssetGalleryTile/index.tsx +++ b/src/components/AssetGalleryTile/index.tsx @@ -16,7 +16,6 @@ interface AssetGalleryTileBaseProps extends Omit, "c interface AssetGalleryTilePendingProps extends AssetGalleryTileBaseProps { kind: "pending"; pendingLabel: string; - pendingImageSrc?: string; } interface AssetGalleryTileImageProps extends AssetGalleryTileBaseProps { @@ -53,7 +52,6 @@ type AssetGalleryTileOmittedProps = { onTileClick?: () => void; kind: AssetGalleryTileProps["kind"]; pendingLabel?: string; - pendingImageSrc?: string; imageSrc?: string; videoSrc?: string; videoPoster?: string; @@ -75,7 +73,6 @@ export function AssetGalleryTile(props: AssetGalleryTileProps) { className, kind, pendingLabel, - pendingImageSrc, imageSrc, videoSrc, videoPoster, @@ -108,10 +105,9 @@ export function AssetGalleryTile(props: AssetGalleryTileProps) { }, []); if (kind === "pending") { - const resolvedPendingImageSrc = resolveApiMediaUrl(pendingImageSrc) || ASSET_GALLERY_PENDING_IMAGE_SRC; return ( - + {pendingLabel} @@ -134,7 +130,7 @@ export function AssetGalleryTile(props: AssetGalleryTileProps) { if (kind === "voice") { const resolvedVoiceCover = resolveApiMediaUrl(voiceCover) || ASSET_GALLERY_AUDIO_PLACEHOLDER_SRC; - const resolvedVoicePrompt = String(voicePrompt ?? "").trim(); + const resolvedVoicePrompt = (voicePrompt ?? "").trim(); const resolvedIsVoicePlaying = Boolean(isVoicePlaying); const resolvedVoiceSrc = resolveApiMediaUrl(voiceSrc); diff --git a/src/dialog/asset-details/index.scss b/src/dialog/asset-details/index.scss index 9a7c05d..eab12a0 100644 --- a/src/dialog/asset-details/index.scss +++ b/src/dialog/asset-details/index.scss @@ -601,6 +601,7 @@ .assetDetails__materialSection { margin-top: 19px; + margin-bottom: 19px; width: 100%; .assetDetails__materialLabel { diff --git a/src/layouts/Layout/Layout.tsx b/src/layouts/Layout/Layout.tsx index deb8ce0..727db22 100644 --- a/src/layouts/Layout/Layout.tsx +++ b/src/layouts/Layout/Layout.tsx @@ -551,7 +551,7 @@ export function Layout({ children }: LayoutProps) { className="layoutShell__brand" aria-label={t("layout.brand.aria")} onClick={() => { - navigate(ROUTES.INDEX); + navigate(ROUTES.EXPLORE); }} > diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index a603ca5..8153991 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -693,7 +693,7 @@ "composer.voiceLibrary.previewPause": "暂停试听", "composer.voiceLibrary.previewUnavailable": "该音色暂无试听音频", "composer.voiceLibrary.previewPlayFailed": "试听播放失败,请稍后重试", - "composer.voiceAudioUpload.title": "上传音频", + "composer.voiceAudioUpload.title": "上传文本", "composer.voiceAudioUpload.openAria": "上传音频", "composer.voiceAudioUpload.dropzoneAria": "点击或拖动上传音频", "composer.voiceAudioUpload.clickPrefix": "点击 ", diff --git a/src/pages/Create/panels/MyCreationsPanel/index.tsx b/src/pages/Create/panels/MyCreationsPanel/index.tsx index 1cd12a6..4c9b22d 100644 --- a/src/pages/Create/panels/MyCreationsPanel/index.tsx +++ b/src/pages/Create/panels/MyCreationsPanel/index.tsx @@ -151,36 +151,6 @@ function hasMusicCreationAudio(asset: Record): boolean { return candidates.some((candidate) => String(candidate ?? "").trim().length > 0); } -function isVideoOrAudioCandidate(candidate: Record): boolean { - const type = String(candidate.type ?? candidate.mediaType ?? candidate.mimeType ?? "").toLowerCase(); - const url = String(candidate.url ?? "").toLowerCase(); - return type.includes("video") || type.includes("audio") || /\.(mp4|mov|webm|mp3|wav|m4a)(\?.*)?$/.test(url); -} - -function pickUrlCandidate(...candidates: unknown[]): string { - for (const candidate of candidates) { - if (Array.isArray(candidate)) { - const nested = pickUrlCandidate(...candidate); - if (nested) return nested; - continue; - } - if (candidate && typeof candidate === "object") { - const row = candidate as Record; - const nested = pickUrlCandidate(row.thumbUrl, row.coverUrl, row.cover, row.imageUrl, row.image, isVideoOrAudioCandidate(row) ? "" : row.url); - if (nested) return nested; - continue; - } - const value = String(candidate ?? "").trim(); - if (value) return value; - } - return ""; -} - -function getPendingCreationImage(task: Record): string { - const assetDraft = task.assetDraft && typeof task.assetDraft === "object" ? (task.assetDraft as Record) : null; - return pickUrlCandidate(assetDraft?.coverUrl, assetDraft?.cover, assetDraft?.thumbUrl, assetDraft?.imageUrl, assetDraft?.image, task.coverUrl, task.cover, task.thumbUrl, task.imageUrl, task.image, task.images, task.referenceSubjectList, task.voiceLibrary); -} - function flattenMusicCreationAssetIds(assetList: any[]): string[] { const ids: string[] = []; for (const task of assetList) { @@ -941,14 +911,12 @@ export default function MyCreationsPanel({ tabIdPrefix, setToolbarExtra }: MyCre {taskList.map((task: any, taskIdx: number) => { if (task.status == 0 || task.status == 1) { const taskId = getTaskRowId(task) || `idx-${taskIdx}`; - const pendingImageSrc = getPendingCreationImage(task); return Array.from({ length: Number(task.batchSize || 0) }, (_, slotIdx) => ( )); } diff --git a/打包dist.command b/打包dist.command index 785c655..ba56781 100755 --- a/打包dist.command +++ b/打包dist.command @@ -75,6 +75,7 @@ fi mkdir "$TMP_DIR/$PACKAGE_NAME" cp -R "$DIST_DIR/." "$TMP_DIR/$PACKAGE_NAME/" +rm -f "$OUTPUT_ZIP" ( cd "$TMP_DIR" || exit 1