aa33c2e6c8
- GeneratePage: 替换内联克隆UI为API数据驱动的音色网格 - 集成 VoiceCloneModal 组件(四阶段进度弹窗) - 页面加载时自动 fetchClonedVoices,支持克隆成功后刷新列表 - 音色卡片区分 ready/processing/failed 状态,非 ready 禁用选择 - generate.css: 新增 disabled 卡片、选中勾选标记样式 - router/index.tsx: 修复 voice-clone 路由缺失闭合括号的语法错误
699 lines
15 KiB
CSS
699 lines
15 KiB
CSS
/**
|
|
* 一键生成页面 - V21 设计系统样式
|
|
* 统一使用 CSS 变量,支持深色/浅色主题
|
|
*/
|
|
@import "../../styles/global.css";
|
|
|
|
/* ============================================================
|
|
页面容器
|
|
============================================================ */
|
|
.xx-generate-page {
|
|
min-height: 100%;
|
|
padding: var(--space-xl);
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.xx-generate-header {
|
|
margin-bottom: var(--space-xl);
|
|
}
|
|
|
|
.xx-generate-title {
|
|
font-size: var(--font-size-3xl) !important;
|
|
font-weight: var(--font-weight-bold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin-bottom: var(--space-xs) !important;
|
|
}
|
|
|
|
.xx-generate-subtitle {
|
|
color: var(--text-secondary) !important;
|
|
font-size: var(--font-size-base) !important;
|
|
}
|
|
|
|
/* ============================================================
|
|
主内容布局(左主右侧)
|
|
============================================================ */
|
|
.xx-generate-layout {
|
|
display: grid;
|
|
grid-template-columns: 1fr 320px;
|
|
gap: var(--space-xl);
|
|
align-items: start;
|
|
}
|
|
|
|
/* ============================================================
|
|
区块卡片
|
|
============================================================ */
|
|
.xx-generate-section {
|
|
background: var(--bg-primary) !important;
|
|
border: 1px solid var(--border-color) !important;
|
|
border-radius: var(--radius-xl) !important;
|
|
box-shadow: var(--shadow-card) !important;
|
|
margin-bottom: var(--space-lg);
|
|
overflow: hidden;
|
|
transition: var(--transition-all);
|
|
}
|
|
|
|
.xx-generate-section:hover {
|
|
box-shadow: var(--shadow-md) !important;
|
|
}
|
|
|
|
.xx-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-lg) var(--space-xl);
|
|
border-bottom: 1px solid var(--border-light);
|
|
}
|
|
|
|
.xx-section-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--primary-soft);
|
|
color: var(--primary-color);
|
|
font-size: var(--font-size-lg);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.xx-section-title {
|
|
font-size: var(--font-size-md) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
flex: 1;
|
|
}
|
|
|
|
.xx-section-desc {
|
|
color: var(--text-tertiary) !important;
|
|
font-size: var(--font-size-sm) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-section-body {
|
|
padding: var(--space-xl);
|
|
}
|
|
|
|
/* ============================================================
|
|
字数统计
|
|
============================================================ */
|
|
.xx-word-count {
|
|
text-align: right;
|
|
font-size: var(--font-size-sm);
|
|
color: var(--text-tertiary);
|
|
margin-top: var(--space-xs);
|
|
transition: var(--transition-colors);
|
|
}
|
|
|
|
.xx-word-count-warn {
|
|
color: var(--warning-color);
|
|
}
|
|
|
|
.xx-word-count-over {
|
|
color: var(--error-color);
|
|
}
|
|
|
|
/* ============================================================
|
|
素材选择
|
|
============================================================ */
|
|
.xx-material-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.xx-material-card {
|
|
position: relative;
|
|
border-radius: var(--radius-md);
|
|
border: 2px solid var(--border-color);
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
transition: var(--transition-all);
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.xx-material-card:hover {
|
|
border-color: var(--primary-color);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.xx-material-card-selected {
|
|
border-color: var(--primary-color) !important;
|
|
box-shadow: var(--shadow-primary) !important;
|
|
}
|
|
|
|
.xx-material-thumb {
|
|
height: 100px;
|
|
background: var(--bg-tertiary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-tertiary);
|
|
font-size: var(--font-size-3xl);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.xx-material-info {
|
|
padding: var(--space-sm) var(--space-md);
|
|
}
|
|
|
|
.xx-material-name {
|
|
font-size: var(--font-size-sm) !important;
|
|
font-weight: var(--font-weight-medium) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.xx-material-meta {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-material-check {
|
|
position: absolute;
|
|
top: var(--space-sm);
|
|
right: var(--space-sm);
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: var(--radius-full);
|
|
background: var(--gradient-primary);
|
|
color: var(--text-inverse);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: var(--font-size-sm);
|
|
opacity: 0;
|
|
transform: scale(0.6);
|
|
transition: var(--transition-all);
|
|
}
|
|
|
|
.xx-material-card-selected .xx-material-check {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
|
|
/* ============================================================
|
|
配音卡片
|
|
============================================================ */
|
|
.xx-voice-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.xx-voice-card {
|
|
position: relative;
|
|
border-radius: var(--radius-md);
|
|
border: 2px solid var(--border-color);
|
|
padding: var(--space-md);
|
|
cursor: pointer;
|
|
transition: var(--transition-all);
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.xx-voice-card:hover {
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.xx-voice-card-selected {
|
|
border-color: var(--primary-color) !important;
|
|
background: var(--primary-soft) !important;
|
|
}
|
|
|
|
.xx-voice-card-disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.xx-voice-card-disabled:hover {
|
|
border-color: var(--border-color);
|
|
}
|
|
|
|
.xx-voice-check {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
color: var(--primary-color);
|
|
font-size: 16px;
|
|
}
|
|
|
|
.xx-voice-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.xx-voice-avatar {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: var(--radius-full);
|
|
background: var(--gradient-primary);
|
|
color: var(--text-inverse);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: var(--font-size-md);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.xx-voice-name {
|
|
font-size: var(--font-size-base) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-voice-desc {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
/* ============================================================
|
|
单选卡片组(比例 / 风格)
|
|
============================================================ */
|
|
.xx-radio-card-group {
|
|
display: flex;
|
|
gap: var(--space-md);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.xx-radio-card {
|
|
flex: 1;
|
|
min-width: 100px;
|
|
border-radius: var(--radius-md);
|
|
border: 2px solid var(--border-color);
|
|
padding: var(--space-md);
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: var(--transition-all);
|
|
background: var(--bg-primary);
|
|
}
|
|
|
|
.xx-radio-card:hover {
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.xx-radio-card-selected {
|
|
border-color: var(--primary-color) !important;
|
|
background: var(--primary-soft) !important;
|
|
}
|
|
|
|
.xx-radio-card-label {
|
|
font-size: var(--font-size-base) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-radio-card-desc {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
margin: 0 !important;
|
|
margin-top: 2px !important;
|
|
}
|
|
|
|
/* ============================================================
|
|
风格卡片
|
|
============================================================ */
|
|
.xx-style-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.xx-style-card {
|
|
border-radius: var(--radius-md);
|
|
border: 2px solid var(--border-color);
|
|
padding: var(--space-md);
|
|
cursor: pointer;
|
|
transition: var(--transition-all);
|
|
background: var(--bg-primary);
|
|
text-align: center;
|
|
}
|
|
|
|
.xx-style-card:hover {
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.xx-style-card-selected {
|
|
border-color: var(--primary-color) !important;
|
|
background: var(--primary-soft) !important;
|
|
}
|
|
|
|
.xx-style-icon {
|
|
font-size: var(--font-size-2xl);
|
|
color: var(--primary-color);
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.xx-style-name {
|
|
font-size: var(--font-size-sm) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-style-desc {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
/* ============================================================
|
|
生成区域
|
|
============================================================ */
|
|
.xx-generate-action {
|
|
text-align: center;
|
|
padding: var(--space-xl) 0;
|
|
}
|
|
|
|
/* ============================================================
|
|
视频预览播放器
|
|
============================================================ */
|
|
.xx-video-preview {
|
|
aspect-ratio: 9 / 16;
|
|
max-height: 400px;
|
|
border-radius: var(--radius-md);
|
|
background: linear-gradient(135deg, #111827, #312e81);
|
|
display: grid;
|
|
place-items: center;
|
|
position: relative;
|
|
overflow: hidden;
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.xx-video-preview video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.xx-video-preview-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: radial-gradient(
|
|
circle at 72% 28%,
|
|
rgba(255, 255, 255, 0.2),
|
|
transparent 40%
|
|
);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.xx-video-preview-placeholder {
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.xx-video-play-btn {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: var(--radius-full);
|
|
background: rgba(255, 255, 255, 0.2);
|
|
backdrop-filter: blur(8px);
|
|
display: grid;
|
|
place-items: center;
|
|
color: #fff;
|
|
font-size: var(--font-size-2xl);
|
|
cursor: pointer;
|
|
transition: var(--transition-all);
|
|
border: none;
|
|
}
|
|
|
|
.xx-video-play-btn:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
/* ============================================================
|
|
时间线预览
|
|
============================================================ */
|
|
.xx-timeline {
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.xx-timeline-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.xx-timeline-title {
|
|
font-size: var(--font-size-sm) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-timeline-duration {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-timeline-track {
|
|
display: flex;
|
|
height: 32px;
|
|
border-radius: var(--radius-sm);
|
|
overflow: hidden;
|
|
background: var(--bg-tertiary);
|
|
margin-bottom: var(--space-sm);
|
|
position: relative;
|
|
}
|
|
|
|
.xx-timeline-clip {
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: var(--font-size-xs);
|
|
color: #fff;
|
|
font-weight: var(--font-weight-medium);
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
padding: 0 4px;
|
|
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.xx-timeline-clip:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
.xx-timeline-playhead {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 2px;
|
|
background: #ef4444;
|
|
z-index: 2;
|
|
}
|
|
|
|
.xx-timeline-playhead::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: -4px;
|
|
left: -4px;
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: var(--radius-full);
|
|
background: #ef4444;
|
|
}
|
|
|
|
.xx-timeline-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.xx-timeline-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm) var(--space-md);
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-sm);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.xx-timeline-item-index {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: var(--radius-xs);
|
|
background: var(--primary-soft);
|
|
color: var(--primary-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-weight: var(--font-weight-bold);
|
|
font-size: var(--font-size-xs);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.xx-timeline-item-scene {
|
|
color: var(--text-primary);
|
|
flex: 1;
|
|
}
|
|
|
|
.xx-timeline-item-time {
|
|
color: var(--text-tertiary);
|
|
font-size: var(--font-size-xs);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ============================================================
|
|
克隆声音区域
|
|
============================================================ */
|
|
.xx-clone-voice-section {
|
|
margin-top: var(--space-md);
|
|
padding: var(--space-lg);
|
|
background: var(--bg-primary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.xx-clone-voice-title {
|
|
font-size: var(--font-size-base) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 0 var(--space-sm) !important;
|
|
}
|
|
|
|
.xx-clone-voice-desc {
|
|
font-size: var(--font-size-sm) !important;
|
|
color: var(--text-secondary) !important;
|
|
margin: 0 0 var(--space-md) !important;
|
|
}
|
|
|
|
.xx-clone-upload-area {
|
|
border: 2px dashed var(--border-color);
|
|
border-radius: var(--radius-sm);
|
|
padding: var(--space-xl) var(--space-md);
|
|
text-align: center;
|
|
background: var(--bg-secondary);
|
|
cursor: pointer;
|
|
transition: var(--transition-all);
|
|
}
|
|
|
|
.xx-clone-upload-area:hover {
|
|
border-color: var(--primary-color);
|
|
background: var(--primary-soft);
|
|
}
|
|
|
|
.xx-clone-upload-icon {
|
|
font-size: 28px;
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.xx-clone-upload-text {
|
|
font-size: var(--font-size-sm) !important;
|
|
color: var(--text-primary) !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.xx-clone-upload-hint {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
margin: var(--space-xs) 0 0 !important;
|
|
}
|
|
|
|
.xx-clone-tip {
|
|
font-size: var(--font-size-xs) !important;
|
|
color: var(--text-tertiary) !important;
|
|
background: var(--bg-secondary);
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-radius: var(--radius-sm);
|
|
margin: var(--space-md) 0 0 !important;
|
|
}
|
|
|
|
.xx-clone-voices-list {
|
|
margin-top: var(--space-md);
|
|
}
|
|
|
|
.xx-clone-voices-label {
|
|
font-size: var(--font-size-sm) !important;
|
|
font-weight: var(--font-weight-semibold) !important;
|
|
color: var(--text-secondary) !important;
|
|
margin: 0 0 var(--space-sm) !important;
|
|
}
|
|
|
|
/* ============================================================
|
|
结果区域
|
|
============================================================ */
|
|
.xx-result-actions {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
margin-top: var(--space-md);
|
|
}
|
|
|
|
/* ============================================================
|
|
响应式
|
|
============================================================ */
|
|
@media (max-width: 1200px) {
|
|
.xx-generate-layout {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.xx-generate-page {
|
|
padding: var(--space-md);
|
|
}
|
|
|
|
.xx-material-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.xx-voice-grid,
|
|
.xx-style-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.xx-section-header {
|
|
padding: var(--space-md);
|
|
}
|
|
|
|
.xx-section-body {
|
|
padding: var(--space-md);
|
|
}
|
|
|
|
.xx-generate-title {
|
|
font-size: var(--font-size-2xl) !important;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.xx-generate-page {
|
|
padding: var(--space-sm);
|
|
}
|
|
|
|
.xx-material-grid,
|
|
.xx-voice-grid,
|
|
.xx-style-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.xx-radio-card-group {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.xx-result-actions {
|
|
flex-direction: column;
|
|
}
|
|
}
|