feat(short-drama-agent-front): 优化身份管理与镜头素材布局
This commit is contained in:
1 parent
dd0bd79a35
commit
3d2c198e52
14 files changed
+1060
-629
No files matched your search
@@ -9,6 +9,7 @@ import { AssetImage } from '../../../components/ui'
|
||||
import { usePolling } from '../../../composables/usePolling'
|
||||
import { useQuery } from '../../../composables/useQuery'
|
||||
import { errorMessage } from '../../../lib/http'
|
||||
import { candidateDialogWidth } from '../../../lib/candidate-layout'
|
||||
import type { DesignedShot } from '../../storyboard/types'
|
||||
import { storyboardApi } from '../../storyboard/api'
|
||||
import ConfirmAction from '../../workflows/ConfirmAction.vue'
|
||||
@@ -308,15 +309,6 @@ async function refreshAfterReview() {
|
||||
await refreshAll()
|
||||
}
|
||||
const keyframeCandidates = computed(() => keyframes.value.filter(item => item.id !== currentKeyframe.value?.id))
|
||||
/**
|
||||
* 按候选数量计算弹窗宽度,每项 260px,每行最多五项,预留间距和左右内边距。
|
||||
* @param count 当前候选数量
|
||||
* @returns 弹窗的期望宽度,单位为像素
|
||||
*/
|
||||
function candidateDialogWidth(count: number): number {
|
||||
const columns = Math.max(1, Math.min(5, count))
|
||||
return columns * 260 + (columns - 1) * 12 + 48
|
||||
}
|
||||
/** 首帧弹窗按当前候选数适配一至五列,实际宽度由公共弹窗限制在视口内。 */
|
||||
const keyframeCandidatesWidth = computed(() => candidateDialogWidth(keyframeCandidates.value.length))
|
||||
/** 视频弹窗与首帧共用固定列宽,少量候选不留多余的整列空白。 */
|
||||
@@ -953,9 +945,10 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
.keyframe-card .asset-image {
|
||||
@apply aspect-square rounded-none;
|
||||
}
|
||||
/* 素材按可用宽度等分列,自动收起空列,让首尾卡片与内容区左右边缘对齐。 */
|
||||
.video-input-grid {
|
||||
@apply grid gap-3;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
|
||||
@apply grid w-full gap-3;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
|
||||
}
|
||||
.video-input-grid .asset-image {
|
||||
@apply aspect-square rounded-none;
|
||||
@@ -991,8 +984,9 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
.asset-candidate-grid {
|
||||
@apply max-w-none grid-cols-[minmax(0,_1fr)];
|
||||
}
|
||||
/* 窄屏优先并排展示两列;素材较少时仍等分占满可用宽度。 */
|
||||
.video-input-grid {
|
||||
@apply grid-cols-[repeat(2,_minmax(0,_1fr))];
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
|
||||
}
|
||||
.generation-settings-panel {
|
||||
@apply p-4;
|
||||
|
||||
Reference in new issue
Block a user