fix(short-drama-agent-front): 统一工作区间距与亮色背景

This commit is contained in:
GJ committed 2026-10-08 16:05:28 +08:00
1 parent d588e0d033
commit 967c4ebea1
10 files changed
+87 -60

No files matched your search

+5
View File
@@ -149,6 +149,11 @@ onBeforeUnmount(() => {
padding-bottom: 0;
}
/* 没有按钮底栏时,正文保留与左右内边距一致的底部留白。 */
.app-dialog.n-card:not(:has(> .n-card__footer)) > .n-card-content {
padding-bottom: var(--n-padding-left);
}
.app-dialog.n-card > .n-card__footer {
padding-top: var(--n-padding-left);
padding-bottom: var(--n-padding-left);
+13 -30
View File
@@ -5,6 +5,7 @@ defineProps<{ split?: boolean; compact?: boolean }>()
</script>
<template>
<section class="workspace-page" :class="{ 'content-first-workspace': compact }">
<!-- 以下是统一对齐的页面提示、标题与正文模块 -->
<div v-if="$slots.notice" class="workspace-notice"><slot name="notice" /></div>
<NScrollbar v-if="$slots.header" class="workspace-heading-scroll"
><header class="workspace-heading"><slot name="header" /></header
@@ -19,9 +20,16 @@ defineProps<{ split?: boolean; compact?: boolean }>()
@reference "../../styles/styles.css";
.workspace-page {
@apply relative h-full flex flex-col min-h-0 overflow-hidden;
/* 四周留白只由公共容器提供,内部模块不再叠加外层内边距。 */
padding: var(--app-content-padding);
gap: var(--app-content-gap);
}
.workspace-notice {
@apply shrink-0 px-5 pt-3;
@apply shrink-0;
}
/* 条件提示未渲染时不占高度,也不留下额外的模块间距。 */
.workspace-notice:not(:has(> *)) {
display: none;
}
.workspace-notice > * {
@apply m-0;
@@ -30,16 +38,7 @@ defineProps<{ split?: boolean; compact?: boolean }>()
@apply shrink-0 h-auto max-h-[min(35dvh,260px)] overflow-hidden;
}
.workspace-heading {
@apply pt-4 px-6 pb-3;
}
.content-first-workspace .workspace-heading {
@apply py-2 px-5;
}
.content-first-workspace .workspace-split {
@apply pt-0 px-5 pb-3 gap-2;
}
.content-first-workspace .workspace-scroll-content {
@apply pt-0 px-5 pb-4;
@apply p-0;
}
.workspace-heading h2 {
@apply text-base;
@@ -57,35 +56,19 @@ defineProps<{ split?: boolean; compact?: boolean }>()
@apply flex-1 min-h-0;
}
.workspace-scroll-content {
@apply pt-1 px-6 pb-6;
@apply p-0;
}
.workspace-scroll > .n-scrollbar-container {
@apply overscroll-contain;
}
.workspace-split {
@apply flex flex-col flex-1 min-h-0 overflow-hidden pt-1 px-6 pb-5 gap-3;
@apply flex flex-col flex-1 min-h-0 overflow-hidden p-0;
gap: var(--app-content-gap);
}
.workspace-split > .my-6 {
@apply m-0 shrink-0;
}
@media (max-width: 760px) {
.workspace-notice {
@apply px-3 pt-3;
}
.workspace-heading {
@apply p-3;
}
.content-first-workspace .workspace-heading {
@apply py-2 px-3;
}
.content-first-workspace .workspace-split,
.content-first-workspace .workspace-scroll-content {
@apply pt-0 px-3 pb-3;
}
.workspace-scroll-content,
.workspace-split {
@apply pt-0 px-3 pb-3;
}
.workspace-heading .production-controls {
@apply grid-cols-[minmax(100px,_1fr)_80px];
}
+13 -7
View File
@@ -159,11 +159,16 @@ const rules = {
</script>
<template>
<NAlert v-if="stageComplete" type="success" :show-icon="false" class="mb-3">
剧本拆解已经准备完成,人物、场景、道具和正式镜头都可以进入后续制作。
<RouterLink :to="`/projects/${projectId}/visual-style`" class="text-button ml-2">继续视觉风格 →</RouterLink>
</NAlert>
<WorkspacePage split compact class="breakdown-workspace-page">
<template #notice>
<!-- 以下是拆解完成后的下一步提示模块 -->
<NAlert v-if="stageComplete" type="success" :show-icon="false">
剧本拆解已经准备完成,人物、场景、道具和正式镜头都可以进入后续制作。
<RouterLink :to="`/projects/${projectId}/visual-style`" class="text-button ml-2"
>继续视觉风格 →</RouterLink
>
</NAlert>
</template>
<template #header>
<!-- 以下是拆解状态与设置 -->
<div class="workspace-toolbar">
@@ -622,6 +627,10 @@ const rules = {
.breakdown-results-section > .content-with-history {
@apply flex-1 h-auto min-h-0 grid-rows-[minmax(0,_1fr)];
}
/* 亮色模式为结果正文增加浅灰背景,保持与页面底色的层次。 */
:root:not([data-theme='dark']) .breakdown-results-section > .content-with-history {
background: var(--app-subtle);
}
.breakdown-results-scroll .n-scrollbar-content {
@apply wrap-anywhere;
}
@@ -632,9 +641,6 @@ const rules = {
@apply grid-cols-[minmax(0,_1fr)] grid-rows-[minmax(0,_1fr)];
}
@media (max-width: 800px) {
.breakdown-workspace-page .workspace-heading {
@apply py-2 px-3;
}
.breakdown-workspace-page .workspace-toolbar {
@apply min-h-0 flex-nowrap gap-2;
}
@@ -287,9 +287,6 @@ function exportScript() {
@apply whitespace-pre-wrap wrap-anywhere p-4 bg-(--app-subtle) rounded-none font-mono text-[11px] leading-[1.9];
}
@media (max-width: 800px) {
.script-workspace-page .workspace-heading {
@apply py-2.5 px-3;
}
.stage-strip {
@apply gap-2;
}
+1 -1
View File
@@ -735,7 +735,7 @@ const videoRules = { videoLimit: integerRule('本批镜头上限'), videoRepairA
<span>过期首帧 {{ staleKeyframes }} · 过期视频 {{ staleVideos }} · 身份前置问题 {{ identityBlocked }}</span>
<NButton text size="small" @click="toolsOpen = true">查看处理方式</NButton>
</div>
<div v-if="shot" class="panel production-workspace">
<div v-if="shot" class="panel production-workspace workspace-surface">
<nav class="production-shot-list directory-panel" aria-label="本集生产镜头">
<div class="directory-heading">
<h3>
+9 -6
View File
@@ -194,7 +194,8 @@ onScopeDispose(() => {
@apply flex flex-col h-full min-h-0 overflow-hidden;
}
.project-header {
@apply shrink-0 py-[9px] px-5 bg-(--app-surface);
@apply shrink-0 py-[9px] bg-(--app-surface);
padding-inline: var(--app-content-padding);
}
.project-header .n-page-header__main,
.project-header .n-page-header__title {
@@ -204,13 +205,15 @@ onScopeDispose(() => {
@apply max-w-full text-base font-semibold;
}
.project-notices.n-scrollbar {
@apply shrink-0 h-auto max-h-[100px] overflow-hidden;
@apply shrink-0 h-auto max-h-[min(24dvh,160px)] overflow-hidden;
}
.project-notices-content {
@apply py-2 px-6 grid gap-[5px];
@apply grid;
padding: var(--app-content-padding) var(--app-content-padding) 0;
gap: var(--app-content-gap);
}
.project-notices .n-alert {
@apply py-[7px] px-3 text-xs;
.project-workflow-status {
margin: var(--app-content-gap) var(--app-content-padding) 0;
}
.operation-guide-content {
@apply flex items-center justify-between gap-4;
@@ -229,7 +232,7 @@ onScopeDispose(() => {
}
@media (max-width: 760px) {
.project-header {
@apply py-2 px-3;
@apply py-2;
}
.project-title {
@apply text-sm;
+2 -5
View File
@@ -228,7 +228,7 @@ function clearFilters() {
/* 本组件专属布局与 Naive 内部结构覆盖。 */
@reference "../../styles/styles.css";
.page-heading {
@apply flex items-center justify-between gap-6 mb-7;
@apply flex items-center justify-between gap-6;
}
.page-heading h1 {
@apply mt-[9px] mx-0 mb-0 text-[27px] font-semibold tracking-[-0.035em] leading-[1.4];
@@ -263,7 +263,7 @@ function clearFilters() {
@apply text-[22px] font-semibold;
}
.project-index-toolbar {
@apply flex items-center justify-between flex-wrap gap-3 mb-1;
@apply flex items-center justify-between flex-wrap gap-3;
}
.project-index-search-row {
@apply flex min-w-0 items-center gap-2;
@@ -291,9 +291,6 @@ function clearFilters() {
@apply text-muted mt-1 text-[11px];
}
@media (max-width: 800px) {
.workspace-heading:has(.project-index-heading) {
@apply py-2.5 px-3;
}
.project-index-chrome {
@apply gap-2;
}
+1 -1
View File
@@ -383,7 +383,7 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
<div v-if="!data && query.loading.value" class="panel p-8 text-sm text-muted" role="status">
正在读取正式分镜数据……
</div>
<div v-else-if="shot" class="panel storyboard-workspace">
<div v-else-if="shot" class="panel storyboard-workspace workspace-surface">
<nav class="shot-list directory-panel" aria-label="本集镜头">
<div class="directory-heading">
<h3>
@@ -870,14 +870,11 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
:root:not([data-theme='dark']) .form-image-card {
background: var(--app-subtle);
}
.gallery-workspace-page .workspace-scroll-content {
@apply pt-2;
}
.gallery-workspace-page .gallery-sticky-controls {
@apply sticky top-0 z-10 bg-(--app-body) mt-3 mb-0;
@apply sticky top-0 z-10 bg-(--app-body) m-0;
}
.gallery-workspace-page .form-image-grid {
@apply pt-3;
padding-top: var(--app-content-gap);
}
.gallery-workspace-page .form-image-masonry {
@apply grid grid-cols-[repeat(auto-fill,_minmax(min(260px,_100%),_1fr))] items-start;
+41 -2
View File
@@ -1,5 +1,8 @@
/* 管理后台视口边界:document 不滚动,各个工作区和面板独立滚动。 */
:root {
/* 页面外层留白与模块间距统一为 15px,各工作区共用同一对齐基线。 */
--app-content-padding: 15px;
--app-content-gap: 15px;
--app-ink: #191919;
--app-muted: #707070;
--app-body: #ffffff;
@@ -137,7 +140,30 @@ body {
overflow: hidden;
}
.workspace-feedback .n-alert + .n-alert {
margin-top: 8px;
margin-top: var(--app-content-gap);
}
/* 页面级提示条统一为单行 44px,高度随长文换行自然增加;文字缩进与正文面板一致。 */
:is(.project-notices, .workspace-notice, .workspace-feedback) .n-alert,
.workspace-scroll-content > .n-alert {
padding: 0;
}
:is(.project-notices, .workspace-notice, .workspace-feedback) .n-alert-body,
.workspace-scroll-content > .n-alert .n-alert-body {
padding: 10px 20px;
line-height: 24px;
}
/* 行内下一步入口沿用提示行高,不额外撑高提示条。 */
:is(.project-notices, .workspace-notice, .workspace-feedback) .text-button,
.workspace-scroll-content > .n-alert .text-button {
padding-block: 0;
line-height: inherit;
}
/* 正文内的提示与筛选、列表共用模块间距,首项不重复叠加顶部留白。 */
.workspace-scroll-content > .n-alert {
margin-top: var(--app-content-gap);
}
.workspace-scroll-content > .n-alert:first-child {
margin-top: 0;
}
.overview-content {
padding-bottom: 8px;
@@ -146,7 +172,7 @@ body {
.workspace-section-stack {
display: flex;
flex-direction: column;
gap: 20px;
gap: var(--app-content-gap);
}
.workspace-section-stack > * {
margin-block: 0 !important;
@@ -247,6 +273,10 @@ body {
background: var(--app-surface);
align-items: stretch;
}
/* 亮色工作区标签栏统一使用浅灰背景,剧本创作与拆解共享视觉层次。 */
:root:not([data-theme='dark']) .workspace-tabs > .n-tabs-nav {
background: var(--app-subtle);
}
.workspace-tabs .n-tabs-tab {
min-height: 40px;
box-sizing: border-box;
@@ -345,6 +375,11 @@ body {
min-width: 0;
min-height: 0;
}
/* 亮色分栏工作区共用更浅的外层底色,区分白色页面与内部内容块。 */
:root:not([data-theme='dark']) .workspace-surface,
:root:not([data-theme='dark']) .workspace-surface > .directory-panel {
background: color-mix(in srgb, var(--app-subtle) 60%, var(--app-body));
}
.image-history.n-scrollbar,
.table-scroll.n-scrollbar {
height: auto;
@@ -462,6 +497,10 @@ body {
}
}
@media (max-width: 760px) {
:root {
--app-content-padding: 15px;
--app-content-gap: 15px;
}
.toolbar-episode {
flex: 1;
}