- 新增 web/batch.html + batch.js:目录树选择器(懒加载,本地后端 提供 roots/dirs 接口)、工作流下拉、进度与产物下载 - 四个页面导航栏增加"批量处理"入口;styles.css 补齐批量页样式
496 lines
9.0 KiB
CSS
Executable File
496 lines
9.0 KiB
CSS
Executable File
/* VRSub 静态前端全局样式:定义色彩变量、布局与通用组件样式。 */
|
|
|
|
/* 设计令牌:集中管理配色,后续换肤只需修改变量。 */
|
|
:root {
|
|
--bg: #f5f7fa;
|
|
--surface: #ffffff;
|
|
--border: #d7dde6;
|
|
--text: #1c2733;
|
|
--muted: #66748a;
|
|
--primary: #1769aa;
|
|
--danger: #b42318;
|
|
--ok: #177245;
|
|
--radius: 8px;
|
|
}
|
|
|
|
/* 全局盒模型与基础排版重置。 */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 页面主体:浅灰背景与默认文字颜色。 */
|
|
body {
|
|
margin: 0;
|
|
font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
color: var(--text);
|
|
background: var(--bg);
|
|
}
|
|
|
|
/* 顶部导航栏:品牌标题与页面导航。 */
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 28px;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
/* 品牌标题样式。 */
|
|
.brand {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* 导航链接横向排列。 */
|
|
nav {
|
|
display: flex;
|
|
gap: 18px;
|
|
}
|
|
|
|
/* 导航链接默认使用弱化色,悬停时高亮。 */
|
|
nav a {
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
nav a:hover {
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* 内容容器:限制最大宽度并居中。 */
|
|
.container {
|
|
max-width: 1080px;
|
|
margin: 0 auto;
|
|
padding: 28px 20px 60px;
|
|
}
|
|
|
|
/* 一级标题与二级标题的字号控制。 */
|
|
h1 {
|
|
margin: 0 0 8px;
|
|
font-size: 28px;
|
|
}
|
|
|
|
h2 {
|
|
margin: 0 0 12px;
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* 弱化文字:用于说明、时间等次要信息。 */
|
|
.muted {
|
|
color: var(--muted);
|
|
}
|
|
|
|
/* 应用中心卡片网格:自适应列数的最小宽度布局。 */
|
|
.app-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
gap: 18px;
|
|
margin-top: 24px;
|
|
}
|
|
|
|
/* 卡片与面板共用白底、边框和圆角外观。 */
|
|
.card,
|
|
.panel {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 20px;
|
|
}
|
|
|
|
/* 面板之间保持纵向间距。 */
|
|
.panel {
|
|
margin-top: 22px;
|
|
}
|
|
|
|
/* 禁用态样式:降低透明度表达不可用。 */
|
|
.disabled {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* 表单标签:块级显示并加粗。 */
|
|
label {
|
|
display: block;
|
|
margin: 10px 0 6px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--muted);
|
|
}
|
|
|
|
/* 输入控件统一样式,宽度撑满容器。 */
|
|
input,
|
|
select,
|
|
textarea {
|
|
width: 100%;
|
|
padding: 9px 11px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
font: inherit;
|
|
background: #fff;
|
|
}
|
|
|
|
/* 文本域使用等宽字体并允许纵向拉伸。 */
|
|
textarea {
|
|
font-family: Consolas, monospace;
|
|
resize: vertical;
|
|
}
|
|
|
|
/* 按钮基础样式。 */
|
|
button {
|
|
margin-top: 12px;
|
|
padding: 9px 16px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
font: inherit;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* 按钮悬停强调边框与文字颜色。 */
|
|
button:hover {
|
|
border-color: var(--primary);
|
|
color: var(--primary);
|
|
}
|
|
|
|
/* 主按钮:填充品牌色。 */
|
|
button.primary {
|
|
background: var(--primary);
|
|
border-color: var(--primary);
|
|
color: #fff;
|
|
}
|
|
|
|
/* 幽灵按钮:透明背景,用于次要操作。 */
|
|
button.ghost {
|
|
background: transparent;
|
|
}
|
|
|
|
/* 操作区与表单网格:弹性换行排列。 */
|
|
.actions,
|
|
.form-grid {
|
|
display: flex;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* 表单网格:默认两列,宽字段占整行。 */
|
|
.form-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
/* 宽字段跨满整行。 */
|
|
.form-grid .wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
/* 表格容器:窄屏时允许横向滚动。 */
|
|
.table-wrap {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
/* 表格基础样式。 */
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 表头与单元格的间距、对齐与分隔线。 */
|
|
th,
|
|
td {
|
|
padding: 10px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 表头使用弱化色与小字号。 */
|
|
th {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* 结果块:深色等宽字体,适合展示 JSON 或日志。 */
|
|
.result {
|
|
margin: 16px 0 0;
|
|
padding: 14px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
background: #0f1720;
|
|
color: #d7e5f3;
|
|
font-family: Consolas, monospace;
|
|
font-size: 13px;
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
/* 下载区:横向排列的下载链接。 */
|
|
.downloads {
|
|
display: flex;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
margin-top: 14px;
|
|
}
|
|
|
|
/* 下载链接:描边按钮式链接。 */
|
|
.download-link {
|
|
display: inline-block;
|
|
padding: 8px 14px;
|
|
border: 1px solid var(--primary);
|
|
border-radius: 6px;
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* 下载链接悬停时轻微填充背景。 */
|
|
.download-link:hover {
|
|
background: #e8f1f9;
|
|
}
|
|
|
|
/* 状态徽章基础样式。 */
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 3px 8px;
|
|
border-radius: 999px;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* 成功徽章:绿色背景。 */
|
|
.badge.ok {
|
|
background: #e2f4ea;
|
|
color: var(--ok);
|
|
}
|
|
|
|
/* 警告徽章:黄色背景。 */
|
|
.badge.warn {
|
|
background: #fff2d9;
|
|
color: #8a5a00;
|
|
}
|
|
|
|
/* 错误徽章:红色背景。 */
|
|
.badge.error {
|
|
background: #fde8e6;
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* 危险操作按钮文字颜色。 */
|
|
.danger {
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* 任务进度条容器:圆角底槽。 */
|
|
.progress {
|
|
width: 120px;
|
|
height: 8px;
|
|
border-radius: 999px;
|
|
background: #e5e7eb;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 任务进度条填充:按百分比宽度显示进度。 */
|
|
.progress-bar {
|
|
height: 100%;
|
|
border-radius: 999px;
|
|
background: var(--primary, #1a73e8);
|
|
transition: width 0.4s ease;
|
|
}
|
|
|
|
/* 失败任务的进度条使用红色填充。 */
|
|
.progress-bar.error {
|
|
background: var(--danger, #d93025);
|
|
}
|
|
|
|
/* 任务页产物下载链接组。 */
|
|
.downloads-inline {
|
|
display: flex;
|
|
gap: 8px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 字幕 OCR 面板:视频预览容器,画布绝对覆盖用于框选。 */
|
|
.video-box {
|
|
position: relative;
|
|
width: 100%;
|
|
aspect-ratio: 16 / 9;
|
|
background: #000;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
margin: 8px 0;
|
|
}
|
|
|
|
.video-box video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.video-box canvas {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
/* 默认不拦截指针事件,保证原生视频控件(进度条等)可操作。 */
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* 框选模式下画布才接收鼠标事件。 */
|
|
.video-box canvas.drawable {
|
|
pointer-events: auto;
|
|
cursor: crosshair;
|
|
}
|
|
|
|
/* 批量处理页:明细行的内嵌表格样式。 */
|
|
.batch-detail-row td {
|
|
background: #fafbfc;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
/* 内嵌表格:无边框、行距紧凑,嵌入批量任务明细行中。 */
|
|
.inner-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.inner-table th {
|
|
text-align: left;
|
|
font-size: 12px;
|
|
color: #666;
|
|
padding: 4px 8px;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.inner-table td {
|
|
padding: 4px 8px;
|
|
font-size: 13px;
|
|
border-bottom: 1px solid #f0f1f3;
|
|
}
|
|
|
|
/* 批量页创建表单的复选框与标签同行展示。 */
|
|
.form-row .inline {
|
|
margin-left: 16px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* 批量页:路径输入框 + "选择文件夹"按钮同行。 */
|
|
.path-picker {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex: 1;
|
|
}
|
|
|
|
.path-picker input {
|
|
flex: 1;
|
|
background: #f7f8fa;
|
|
}
|
|
|
|
/* 目录树选择器:全屏遮罩 + 居中面板。 */
|
|
.dir-picker {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.35);
|
|
z-index: 50;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.dir-picker.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.dir-picker-panel {
|
|
width: min(560px, 92vw);
|
|
max-height: 70vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.dir-picker-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
}
|
|
|
|
/* 关闭按钮(✕):无边框文本按钮。 */
|
|
.dir-picker-head .plain {
|
|
border: none;
|
|
background: none;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
color: #666;
|
|
}
|
|
|
|
.dir-tree {
|
|
flex: 1;
|
|
overflow: auto;
|
|
padding: 8px 0;
|
|
min-height: 160px;
|
|
}
|
|
|
|
/* 目录节点行:悬停高亮,选中项加深。 */
|
|
.dir-node {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 12px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.dir-node:hover {
|
|
background: #f3f6fa;
|
|
}
|
|
|
|
.dir-node.selected {
|
|
background: #e3edf7;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dir-arrow {
|
|
width: 20px;
|
|
color: #888;
|
|
user-select: none;
|
|
}
|
|
|
|
.dir-name {
|
|
margin-left: 4px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.dir-empty {
|
|
padding: 4px 12px 4px 56px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.dir-picker-foot {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.dir-picker-foot .muted {
|
|
flex: 1;
|
|
font-size: 13px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|