486 lines
30 KiB
HTML
486 lines
30 KiB
HTML
<!doctype html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>任务队列 · UI 原型</title>
|
||
<style>
|
||
/* 设计 token 静态快照 —— **生成文件,勿手改**
|
||
*
|
||
* 源:src/theme-tokens.js(derive() + 本文件生成器的 SCALE 表)
|
||
* 生成:node scripts/gen-tokens.js --write (校验:--check,已进 verify:ci)
|
||
*
|
||
* 为什么要有这一层:JS 未执行的那一帧没有内联变量,用它顶住,避免首屏闪白/跳变。
|
||
* 所以它必须逐值等于 derive() 的输出 —— 这条约束由 scripts/gen-tokens.js --check 强制。
|
||
* 结构层(chrome/home/dock/edge/hr)刻意用 color-mix 表达关系式:换主题时 :root 的声明会在
|
||
* html 元素上按新的 --iwb-bg/--iwb-canvas-bg 重新求值,天然跟随。
|
||
*/
|
||
:root {
|
||
/* —— 表面阶(亮色往白里 mix) —— */
|
||
--iwb-bg: #f7f7f7;
|
||
--iwb-canvas-bg: #c6c6c6;
|
||
--iwb-layer: #f5f5f5;
|
||
--iwb-layer2: #ffffff;
|
||
--iwb-panel: #fefefe;
|
||
--iwb-node-bg: #efefef;
|
||
--iwb-field: #ffffff;
|
||
/* —— 结构层(公式与 derive 一致,见文件头) —— */
|
||
--iwb-chrome: color-mix(in srgb, var(--iwb-bg) 60%, var(--iwb-canvas-bg) 40%); /* 顶部 chrome 色:页面底与画布之间的过渡层(标签条用) */
|
||
--iwb-home-bg: color-mix(in srgb, var(--iwb-bg) 35%, var(--iwb-canvas-bg) 65%); /* 首页底色:画布色与顶栏色之间取 35/65 */
|
||
--iwb-hr: color-mix(in srgb, var(--iwb-border) 50%, var(--iwb-border2) 50%); /* 首页上的细分隔线 */
|
||
--iwb-dock-bg: color-mix(in srgb, var(--iwb-chrome) 55%, var(--iwb-canvas-bg) 45%); /* 左右停靠栏底色:排进 bg→chrome→home→canvas 灰阶 */
|
||
--iwb-dock-head-bg: color-mix(in srgb, var(--iwb-panel) 55%, var(--iwb-dock-bg)); /* 顶栏底色比停靠栏更浅一档 */
|
||
--iwb-accent-on-surface: color-mix(in srgb, var(--iwb-brand) 45%, var(--iwb-text)); /* 强调色当文字/图标用:与正文色混,亮色更沉、暗色更亮,两端过 4.5:1 */
|
||
--iwb-accent-tint: color-mix(in srgb, var(--iwb-brand) 18%, transparent); /* 强调色淡底:选中标签/药丸的底(与 --iwb-accent-on-surface 配对使用) */
|
||
--iwb-plugin-bg: var(--iwb-bg); /* v3.25.85 插件主题契约:插件只能用这组别名 */
|
||
--iwb-plugin-panel: var(--iwb-panel);
|
||
--iwb-plugin-layer: var(--iwb-layer);
|
||
--iwb-plugin-border: var(--iwb-border);
|
||
--iwb-plugin-text: var(--iwb-text);
|
||
--iwb-plugin-text2: var(--iwb-text2);
|
||
--iwb-plugin-brand: var(--iwb-brand);
|
||
--iwb-plugin-on-brand: var(--iwb-on-brand);
|
||
--iwb-plugin-err: var(--iwb-err);
|
||
--iwb-plugin-ok: var(--iwb-ok);
|
||
--iwb-plugin-warn: var(--iwb-warn);
|
||
--iwb-edge: var(--iwb-border2); /* 连线默认色:跟随边框灰(主题色只用于选中/悬停/上游高亮) */
|
||
--iwb-edge-hot: var(--iwb-brand);
|
||
--iwb-focus-ring: 2px solid color-mix(in srgb, var(--iwb-brand-text) 70%, transparent); /* 键盘焦点环(D8):颜色走 brand-text,暗色下 brand 画不出环 */
|
||
--iwb-edge-w: 1.8px; /* 外观自定义:由 src/ui-appearance.js 按配置写入,这里只给兜底默认值 */
|
||
--iwb-edge-dash: 4 3;
|
||
--iwb-node-radius: 14px;
|
||
--iwb-node-sel-w: 1px;
|
||
--iwb-grid-size: 1.4px;
|
||
--iwb-grid-gap: 22px;
|
||
--iwb-grid-on: 1;
|
||
--iwb-nav-w: 52px; /* 一级导航宽度:左停靠栏/工具栏让位都以它为基准 */
|
||
/* —— 描边 / 文字三级(目标对比度见 IWBThemeTokens.RATIO) —— */
|
||
--iwb-border: #c2c2c2;
|
||
--iwb-border2: #ababab;
|
||
--iwb-sel-surface: #eff0f1;
|
||
--iwb-sel-ring: #383838;
|
||
--iwb-text: #404040;
|
||
--iwb-text2: #5c5c5c;
|
||
--iwb-text-dim: #767676;
|
||
--iwb-color-text-on-canvas: #404040;
|
||
--iwb-node-text: #404040;
|
||
--iwb-node-text2: #6b6b6b;
|
||
--iwb-tint: #404040;
|
||
/* —— 品牌色:填充与文字是两个角色(D7) —— */
|
||
--iwb-brand: #6b7280;
|
||
--iwb-brand-text: #575d69;
|
||
--iwb-on-brand: #ffffff;
|
||
--iwb-grid-dot: #a6a6a6;
|
||
/* —— 插件表面四层(只提供取值,不做变量重指) —— */
|
||
--iwb-surface: #fefefe;
|
||
--iwb-hover: #e9e9e9;
|
||
--iwb-bg-menu: #fefefe;
|
||
--iwb-plugin-surface: #f5f5f5;
|
||
--iwb-plugin-card: #fefefe;
|
||
--iwb-plugin-inset: #ebebeb;
|
||
--iwb-plugin-hover: #e2e2e2;
|
||
/* —— 语义色 —— */
|
||
--iwb-err: #b91c1c;
|
||
--iwb-ok: #15803d;
|
||
--iwb-warn: #b45309;
|
||
--iwb-err-bg: #f1e1e1;
|
||
--iwb-err-bd: #dfa4a4;
|
||
--iwb-ok-bg: #e0ebe4;
|
||
--iwb-ok-bd: #a1cab0;
|
||
--iwb-warn-bg: #f0e7df;
|
||
--iwb-warn-bd: #deb99d;
|
||
/* —— 尺度层(L1)—— */
|
||
--sp-1: 4px; /* @deprecated 全部 5 个 → M3 的 --iwb-space-4/8/12/16/24 */
|
||
--sp-2: 8px;
|
||
--sp-3: 12px;
|
||
--sp-4: 16px;
|
||
--sp-5: 24px;
|
||
--rd-sm: 6px; /* @deprecated rd-sm/rd-md/rd-lg → M3 的 --iwb-radius-chip/control/popover */
|
||
--rd: 8px;
|
||
--rd-md: 10px;
|
||
--rd-lg: 12px;
|
||
--fs-xs: 10px; /* @deprecated fs-xs/fs-md/fs-lg/fs-xl → M3 的 --iwb-font-*(fs-sm 仍被引用) */
|
||
--fs-sm: 11px;
|
||
--fs-md: 12px;
|
||
--fs-lg: 13px;
|
||
--fs-xl: 14px;
|
||
--tr-fast: 0.1s ease-out;
|
||
--tr-base: 0.2s ease-out; /* @deprecated tr-base/tr-slow → M3 的 --iwb-motion-*(tr-fast 仍被引用) */
|
||
--tr-slow: 0.3s ease-out;
|
||
--iwb-space-2: 2px;
|
||
--iwb-space-4: 4px;
|
||
--iwb-space-6: 6px;
|
||
--iwb-space-8: 8px;
|
||
--iwb-space-10: 10px;
|
||
--iwb-space-12: 12px;
|
||
--iwb-space-16: 16px;
|
||
--iwb-space-20: 20px;
|
||
--iwb-space-24: 24px;
|
||
--iwb-space-32: 32px;
|
||
--iwb-space-40: 40px;
|
||
--iwb-space-48: 48px;
|
||
--iwb-space-64: 64px;
|
||
--iwb-radius-chip: 6px; /* M4 圆角:胶囊/标签 */
|
||
--iwb-radius-control: 8px; /* 输入框/按钮 */
|
||
--iwb-radius-card: 10px; /* 卡片/分组 */
|
||
--iwb-radius-panel: 12px; /* 面板/工具栏 */
|
||
--iwb-radius-popover: 14px; /* 浮层/菜单/右键 */
|
||
--iwb-radius-full: 999px; /* 圆形/药丸 */
|
||
--iwb-font-2xs: 10px; /* 极小标注:徽标角标/画布坐标/缩略图角标(2026-11-24 承认它,此前 29 处裸写) */
|
||
--iwb-font-xs: 11px; /* M4 字号:状态栏/徽标 */
|
||
--iwb-font-sm: 12px; /* 标签/次要正文 */
|
||
--iwb-font-md: 13px; /* 紧凑正文/工具栏标题 */
|
||
--iwb-font-base: 14px; /* 标准正文:表单行标题/命令输入/帮助正文 */
|
||
--iwb-font-lg: 15px; /* 小标题/节点标题 */
|
||
--iwb-font-xl: 17px; /* 面板标题 */
|
||
--iwb-font-2xl: 20px; /* 页面大标题 */
|
||
--iwb-font-display: 24px; /* 展示级标题:页面/视图主标题(≤5 处) */
|
||
--iwb-chrome-h: 36px; /* 顶部标签条高度:tabstrip / dockarea / home-panel 三处共用(原来各写一遍 36px) */
|
||
--iwb-tab-h: 28px; /* 标签高度 */
|
||
--iwb-tab-radius: 7px; /* 标签圆角 */
|
||
--iwb-control-h: 30px; /* 表单控件高度:同一行里的输入框与默认按钮必须等高(设置页实测曾是 33 vs 24) */
|
||
--iwb-bw: 1px; /* 描边宽度(2026-11-24):常规分隔/控件边框 */
|
||
--iwb-bw-strong: 2px; /* 强调描边:选中/焦点/危险操作(不要再用 2px 裸值) */
|
||
--iwb-icon-sm: 14px; /* 小图标:行内/按钮内 */
|
||
--iwb-icon-md: 16px; /* 标准图标:工具栏/菜单 */
|
||
--iwb-icon-lg: 18px; /* 大图标:导航/空态 */
|
||
--iwb-opacity-disabled: 0.45; /* 禁用态透明度(此前 0.45/0.55 混用) */
|
||
--iwb-opacity-muted: 0.7; /* 次要/未激活元素透明度 */
|
||
--iwb-ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* 入场/展开缓动:快出慢停 */
|
||
--iwb-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); /* 状态切换缓动 */
|
||
--iwb-motion-fast: 0.12s; /* M6 动效:悬停/开关/小位移 */
|
||
--iwb-motion-base: 0.15s; /* M6 动效:面板展开/尺寸变化 */
|
||
--iwb-motion-slow: 0.3s; /* M6 动效:整屏过渡/抽屉 */
|
||
--iwb-motion-hover: 0.15s; /* L2 悬停:卡片/结果图浮层统一时长 */
|
||
--iwb-ease-hover: cubic-bezier(0.16, 1, 0.3, 1); /* L2 悬停:快出慢停 */
|
||
--iwb-hover-lift: -2px; /* L2 悬停:上浮位移 */
|
||
--iwb-hover-scale: 1.02; /* L2 悬停:缩放(相册格子单独用 1.08) */
|
||
--iwb-hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); /* L2 悬停:投影(单值,供 filter: drop-shadow 用;box-shadow 会多一种写法) */
|
||
--iwb-hover-border: var(--iwb-brand); /* L2 悬停:描边色 */
|
||
--iwb-scrim: rgba(0, 0, 0, 0.62); /* 图片上的遮罩渐变底:下载浮层/预览条(两套主题都用深色,保证白字可读) */
|
||
--iwb-selection-ring: var(--iwb-brand); /* 选中描边(跟随强调色) */
|
||
--iwb-selection-on: var(--iwb-on-brand); /* 选中描边的隔离内环(品牌底上的文字色) */
|
||
--iwb-selection-bg: color-mix(in srgb, var(--iwb-brand) 12%, transparent); /* 选中格淡底(不压黑缩略图) */
|
||
--iwb-selection-halo: color-mix(in srgb, var(--iwb-brand) 45%, transparent); /* 选中外发光(与 hover 区分) */
|
||
--iwb-z-ctx: 90; /* 右键遮罩 */
|
||
--iwb-z-ctx-menu: 91; /* 右键菜单 */
|
||
--iwb-z-curtain: 100; /* 应用遮罩 / 图片预览底 */
|
||
--iwb-z-command: 120; /* 命令面板(⌘K) */
|
||
--iwb-z-sheet: 260; /* 全窗口面板(资源中心) */
|
||
--iwb-z-sheet-menu: 270; /* 面板内 portal 菜单:> sheet、< modal */
|
||
--iwb-z-modal: 300; /* 弹窗 + 遮罩 */
|
||
--iwb-z-modal-menu: 310; /* 侧栏/弹窗里挂 body 的菜单 */
|
||
--iwb-z-splash: 400; /* 启动页 */
|
||
--iwb-z-toast: 500; /* 提示条:必须高于弹窗 */
|
||
--iwb-z-preview: 800; /* 图片预览(全屏) */
|
||
--iwb-z-anchor: 3200; /* 锚定浮层:挂 body 的面板/首页菜单 */
|
||
--iwb-z-palette: 3300; /* 背景色板 host(含锚定浮层) */
|
||
--iwb-z-alert: 4000; /* 确认框 / 崩溃屏(最后一道) */
|
||
/* —— 阴影 —— */
|
||
--sh-sm: 0 2px 8px rgba(0, 0, 0, 0.12); /* @deprecated → M3 的 --iwb-elevation-1 */
|
||
--sh-md: 0 6px 20px rgba(0, 0, 0, 0.16);
|
||
--sh-lg: 0 12px 32px rgba(0, 0, 0, 0.24);
|
||
--iwb-elevation-1: 0 2px 8px rgba(0, 0, 0, 0.12); /* 贴面浮层:浮动条 / 状态栏 */
|
||
--iwb-elevation-2: 0 10px 30px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.10); /* 浮窗 / 菜单 / toast */
|
||
--iwb-elevation-3: 0 18px 56px rgba(0, 0, 0, 0.26); /* 命令面板 / 锚定大浮层 */
|
||
--iwb-elevation-4: 0 24px 64px rgba(0, 0, 0, 0.30); /* 弹窗 / 全窗口面板 */
|
||
}
|
||
|
||
/* 暗色主题:html.theme-dark
|
||
* 同一套语义名,值来自 derive(DEFAULTS, true)。结构层不在这里重复定义 ——
|
||
* :root 的 color-mix 公式会在本元素上按新的 --iwb-bg/--iwb-canvas-bg 重新求值。 */
|
||
.theme-dark {
|
||
/* 生图动效在暗色下必须「发亮」:--iwb-brand 是中性灰,直接用会糊在深底里 */
|
||
--iwb-anim: #ffffff;
|
||
--iwb-anim-track: color-mix(in srgb, #ffffff 18%, transparent);
|
||
--iwb-anim-glow: rgba(255, 255, 255, 0.72);
|
||
--iwb-anim-tint: color-mix(in srgb, #ffffff 16%, transparent);
|
||
--iwb-anim-flow-a: color-mix(in srgb, #ffffff 26%, var(--iwb-layer));
|
||
--iwb-anim-flow-b: color-mix(in srgb, #ffffff 76%, var(--iwb-layer));
|
||
/* —— 表面阶 —— */
|
||
--iwb-bg: #121212;
|
||
--iwb-canvas-bg: #313131;
|
||
--iwb-layer: #161616;
|
||
--iwb-layer2: #1c1c1c;
|
||
--iwb-panel: #1c1c1c;
|
||
--iwb-node-bg: #3d3d3d;
|
||
--iwb-field: #494949;
|
||
--iwb-border: #333333;
|
||
--iwb-border2: #4d4d4d;
|
||
--iwb-sel-surface: #313234;
|
||
--iwb-sel-ring: #e8e8e8;
|
||
/* —— 文字 / 品牌 —— */
|
||
--iwb-text: #e3e3e3;
|
||
--iwb-text2: #bababa;
|
||
--iwb-text-dim: #989898;
|
||
--iwb-color-text-on-canvas: #b2b2b2;
|
||
--iwb-node-text: #e3e3e3;
|
||
--iwb-node-text2: #aaaaaa;
|
||
--iwb-tint: #e3e3e3;
|
||
--iwb-brand: #6b7280;
|
||
--iwb-brand-text: #b6bac0;
|
||
--iwb-on-brand: #ffffff;
|
||
--iwb-grid-dot: #525252;
|
||
/* —— 插件表面 / 浮层 / 语义色 —— */
|
||
--iwb-surface: #1c1c1c;
|
||
--iwb-hover: #2a2a2a;
|
||
--iwb-bg-menu: #3c3c3c;
|
||
--iwb-plugin-surface: #232323;
|
||
--iwb-plugin-card: #2c2c2c;
|
||
--iwb-plugin-inset: #191919;
|
||
--iwb-plugin-hover: #383838;
|
||
--iwb-err: #f26666;
|
||
--iwb-ok: #4acf7b;
|
||
--iwb-warn: #e1953d;
|
||
/* —— 阴影 —— */
|
||
--sh-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
|
||
--sh-md: 0 6px 20px rgba(0, 0, 0, 0.45);
|
||
--sh-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
|
||
--iwb-elevation-1: 0 2px 8px rgba(0, 0, 0, 0.40);
|
||
--iwb-elevation-2: 0 8px 28px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.40);
|
||
--iwb-elevation-3: 0 18px 56px rgba(0, 0, 0, 0.62);
|
||
--iwb-elevation-4: 0 24px 64px rgba(0, 0, 0, 0.70);
|
||
}
|
||
|
||
/* 亮色主题的生图动效 token:与暗色同结构,色取品牌色 */
|
||
:root:not(.theme-dark) {
|
||
--iwb-anim: var(--iwb-brand);
|
||
--iwb-anim-track: color-mix(in srgb, var(--iwb-brand) 16%, transparent);
|
||
--iwb-anim-glow: color-mix(in srgb, var(--iwb-brand) 75%, transparent);
|
||
--iwb-anim-tint: color-mix(in srgb, var(--iwb-brand) 7%, transparent);
|
||
--iwb-anim-flow-a: color-mix(in srgb, var(--iwb-brand) 16%, var(--iwb-layer));
|
||
--iwb-anim-flow-b: color-mix(in srgb, var(--iwb-brand) 46%, var(--iwb-layer));
|
||
}
|
||
|
||
|
||
/* component.settings:由 gen-tokens 生成,勿手改;布局属性仍在 style.css */
|
||
.iwb-settings-modal {
|
||
--iwb-set-label-w: 180px; /* 标签列宽 */
|
||
--iwb-set-col-gap: var(--iwb-space-16); /* 标签列与控件列间距 */
|
||
--iwb-set-row-h: 40px; /* 设置行高 */
|
||
--iwb-set-row-pad-y: var(--iwb-space-8); /* 行上下内边距 */
|
||
--iwb-set-group-gap: var(--iwb-space-32); /* 分组之间(规范 §3.11:32px) */
|
||
--iwb-set-title-gap: var(--iwb-space-8); /* 分组标题与分组体间距 */
|
||
--iwb-set-group-bg: hsl(0 0% 97.6%); /* 分组体底色:设计值 #F9F9F9(用 hsl 表达以过 hex 闸门) */
|
||
--iwb-set-group-radius: var(--iwb-radius-card); /* 分组体圆角 */
|
||
--iwb-set-group-pad-x: var(--iwb-space-20); /* 分组体左右内边距 */
|
||
--iwb-set-group-pad-y: var(--iwb-space-12); /* 分组体上下内边距 */
|
||
--iwb-set-divider: color-mix(in srgb, var(--iwb-border) 55%, transparent); /* 行分隔线 */
|
||
--iwb-set-hint-color: var(--iwb-text-dim); /* 说明文字色 */
|
||
--iwb-set-hint-size: var(--iwb-font-xs); /* 说明文字字号 */
|
||
--iwb-set-hint-gap: var(--iwb-space-2); /* 说明文字上间距 */
|
||
--iwb-set-input-border: color-mix(in srgb, var(--iwb-border) 40%, var(--iwb-panel)); /* 输入框描边 */
|
||
--iwb-set-check-size: 16px; /* 复选项尺寸 */
|
||
--iwb-set-check-radius: 4px; /* 复选项圆角 */
|
||
--iwb-set-btn-gap: var(--iwb-space-8); /* 操作按钮间距 */
|
||
}
|
||
|
||
/* component.settings · 暗色覆盖 */
|
||
.theme-dark .iwb-settings-modal {
|
||
--iwb-set-group-bg: color-mix(in srgb, var(--iwb-text) 8%, var(--iwb-panel)); /* 暗色分组体:文字色 8% 混面板 */
|
||
}
|
||
|
||
/* component.popover:由 gen-tokens 生成,勿手改;布局属性仍在 style.css */
|
||
.iwb-pop {
|
||
--iwb-pop-w: 360px; /* 面板宽度(窄屏靠 max-width 兜底) */
|
||
--iwb-pop-pad-y: var(--iwb-space-10); /* 面板上下内边距 */
|
||
--iwb-pop-pad-x: var(--iwb-space-12); /* 面板左右内边距 */
|
||
--iwb-pop-gap: var(--iwb-space-8); /* 分组之间 */
|
||
--iwb-pop-radius: var(--iwb-radius-popover); /* 面板圆角 */
|
||
--iwb-pop-title-size: var(--iwb-font-base); /* 面板标题字号 */
|
||
--iwb-pop-chip-h: 28px; /* 选择项/下拉/数字框高度 */
|
||
--iwb-pop-chip-pad-x: var(--iwb-space-10); /* 选择项左右内边距 */
|
||
--iwb-pop-chip-radius: 6px; /* 选择项圆角 */
|
||
--iwb-pop-chip-gap: var(--iwb-space-6); /* 选择项间距 */
|
||
--iwb-pop-chip-size: var(--iwb-font-md); /* 选择项字号 */
|
||
}
|
||
</style>
|
||
<style>
|
||
* { box-sizing: border-box; }
|
||
html, body { height: 100%; }
|
||
body { margin: 0; background: var(--iwb-bg); color: var(--iwb-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: var(--iwb-font-base); line-height: 1.45; }
|
||
.app { display: flex; height: 100vh; overflow: hidden; }
|
||
.rail { width: 56px; flex: 0 0 56px; background: var(--iwb-dock-bg); border-right: 1px solid var(--iwb-border); display: flex; flex-direction: column; align-items: center; padding: var(--iwb-space-10) 0; gap: var(--iwb-space-6); }
|
||
.rail .logo { width: 30px; height: 30px; border-radius: var(--iwb-radius-control); background: var(--iwb-brand); color: var(--iwb-on-brand); display: grid; place-items: center; font-size: var(--iwb-font-sm); font-weight: 700; margin-bottom: var(--iwb-space-6); }
|
||
.rail .item { width: 36px; height: 36px; border-radius: var(--iwb-radius-control); display: grid; place-items: center; color: var(--iwb-text2); cursor: default; }
|
||
.rail .item svg { width: var(--iwb-icon-lg); height: var(--iwb-icon-lg); }
|
||
.rail .item:hover { background: var(--iwb-hover); color: var(--iwb-text); }
|
||
.rail .item.active { background: var(--iwb-accent-tint); color: var(--iwb-accent-on-surface); }
|
||
.page { flex: 1; min-width: 0; padding: var(--iwb-space-24) var(--iwb-space-32) var(--iwb-space-16); display: flex; flex-direction: column; gap: var(--iwb-space-16); overflow: hidden; }
|
||
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--iwb-space-16); }
|
||
.title { font-size: var(--iwb-font-2xl); font-weight: 650; letter-spacing: .01em; }
|
||
.sub { display: block; margin-top: 2px; font-size: var(--iwb-font-sm); font-weight: 400; color: var(--iwb-text2); }
|
||
.tools { display: flex; align-items: center; gap: var(--iwb-space-8); flex-wrap: wrap; justify-content: flex-end; }
|
||
.field { display: inline-flex; align-items: center; gap: var(--iwb-space-6); font-size: var(--iwb-font-sm); color: var(--iwb-text2); }
|
||
select, button { font: inherit; }
|
||
select { height: 30px; padding: 0 var(--iwb-space-10); color: var(--iwb-text); background: var(--iwb-field); border: 1px solid var(--iwb-border2); border-radius: var(--iwb-radius-control); }
|
||
.btn { height: 30px; padding: 0 var(--iwb-space-12); border-radius: var(--iwb-radius-control); border: 1px solid var(--iwb-border2); background: var(--iwb-panel); color: var(--iwb-text); display: inline-flex; align-items: center; gap: var(--iwb-space-6); cursor: pointer; font-size: var(--iwb-font-sm); white-space: nowrap; }
|
||
.btn:hover { background: var(--iwb-hover); border-color: var(--iwb-hover-border); }
|
||
.btn.primary { background: var(--iwb-brand); color: var(--iwb-on-brand); border-color: var(--iwb-brand); }
|
||
.btn.primary:hover { filter: brightness(1.05); }
|
||
.btn.ghost { background: transparent; }
|
||
.btn:disabled { opacity: .5; cursor: default; background: var(--iwb-layer); color: var(--iwb-text2); border-color: var(--iwb-border); }
|
||
.tabs { display: flex; gap: var(--iwb-space-4); border-bottom: 1px solid var(--iwb-border); padding-bottom: 0; }
|
||
.tab { padding: var(--iwb-space-6) var(--iwb-space-10); font-size: var(--iwb-font-sm); color: var(--iwb-text2); border-radius: var(--iwb-radius-control) var(--iwb-radius-control) 0 0; cursor: pointer; display: inline-flex; align-items: center; gap: var(--iwb-space-6); }
|
||
.tab:hover { color: var(--iwb-text); background: var(--iwb-hover); }
|
||
.tab.active { color: var(--iwb-accent-on-surface); background: var(--iwb-accent-tint); }
|
||
.tab .n { font-size: var(--iwb-font-2xs); color: var(--iwb-text2); background: var(--iwb-layer); border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-full); padding: 0 6px; line-height: 15px; }
|
||
.tab.active .n { color: var(--iwb-accent-on-surface); background: transparent; border-color: var(--iwb-accent-on-surface); }
|
||
.list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--iwb-space-8); padding-right: 2px; }
|
||
.row { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; gap: var(--iwb-space-12); align-items: center; padding: var(--iwb-space-10); background: var(--iwb-panel); border: 1px solid var(--iwb-border); border-radius: var(--iwb-radius-card); transition: border-color .15s, background .15s; }
|
||
.row:hover { border-color: var(--iwb-hover-border); }
|
||
.row.failed { border-color: var(--iwb-err-bd); background: color-mix(in srgb, var(--iwb-err) 9%, var(--iwb-panel)); }
|
||
.thumb { cursor: zoom-in; width: 96px; height: 64px; border-radius: var(--iwb-radius-control); border: 1px solid var(--iwb-border); background: var(--iwb-layer2); overflow: hidden; position: relative; display: grid; place-items: center; }
|
||
.thumb svg, .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
|
||
.thumb .ph { color: var(--iwb-text2); display: grid; place-items: center; gap: 2px; font-size: var(--iwb-font-2xs); }
|
||
.thumb .ph svg { width: 20px; height: 20px; }
|
||
.thumb .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--iwb-layer); }
|
||
.thumb .prog i { display: block; height: 100%; width: 42%; background: var(--iwb-brand); }
|
||
.main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
||
.line1 { display: flex; align-items: center; gap: var(--iwb-space-8); min-width: 0; }
|
||
.name { font-size: var(--iwb-font-base); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.badge { flex: 0 0 auto; height: 18px; padding: 0 var(--iwb-space-8); border-radius: var(--iwb-radius-full); font-size: var(--iwb-font-2xs); line-height: 18px; border: 1px solid var(--iwb-border2); color: var(--iwb-text2); background: var(--iwb-layer); }
|
||
.badge.ok { color: var(--iwb-ok); border-color: var(--iwb-ok-bd); background: var(--iwb-ok-bg); }
|
||
.badge.err { color: var(--iwb-err); border-color: var(--iwb-err-bd); background: var(--iwb-err-bg); }
|
||
.badge.warn { color: var(--iwb-warn); border-color: var(--iwb-warn-bd); background: var(--iwb-warn-bg); }
|
||
.meta { font-size: var(--iwb-font-sm); color: var(--iwb-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.errline { font-size: var(--iwb-font-xs); color: var(--iwb-err); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||
.actions { display: flex; align-items: center; gap: var(--iwb-space-6); flex-wrap: wrap; justify-content: flex-end; }
|
||
.foot { font-size: var(--iwb-font-xs); color: var(--iwb-text2); display: flex; justify-content: space-between; gap: var(--iwb-space-12); }
|
||
.foot .hint { color: var(--iwb-text-dim); }
|
||
.empty { padding: var(--iwb-space-32); text-align: center; color: var(--iwb-text2); font-size: var(--iwb-font-sm); }
|
||
@media (max-width: 860px) { .page { padding: var(--iwb-space-16); } .row { grid-template-columns: 72px minmax(0,1fr); } .actions { grid-column: 2; justify-content: flex-start; } .thumb { width: 72px; height: 50px; } }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="app">
|
||
<aside class="rail" aria-label="主导航">
|
||
<div class="logo">IW</div>
|
||
<div class="item" title="首页"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M3 10.5 12 3l9 7.5"/><path d="M5 9.5V21h14V9.5"/></svg></div>
|
||
<div class="item" title="画布"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 9h18"/></svg></div>
|
||
<div class="item" title="插件"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"/></svg></div>
|
||
<div class="item active" title="任务队列"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7"><path d="M4 6h12M4 12h12M4 18h8"/><circle cx="19" cy="18" r="2.2"/></svg></div>
|
||
</aside>
|
||
<main class="page">
|
||
<header class="head">
|
||
<div>
|
||
<div class="title">任务队列</div>
|
||
<span class="sub">全局生图记录 · 数据由宿主保存,插件关闭也继续记录</span>
|
||
</div>
|
||
<div class="tools">
|
||
<label class="field">记录上限
|
||
<select id="limit"><option>200</option><option selected>500</option><option>1000</option><option>2000</option><option>5000</option></select>
|
||
</label>
|
||
<button class="btn ghost" id="clear">清空记录</button>
|
||
<button class="btn ghost" id="theme">深色</button>
|
||
</div>
|
||
</header>
|
||
<nav class="tabs" id="tabs">
|
||
<div class="tab active" data-f="all">全部 <span class="n">6</span></div>
|
||
<div class="tab" data-f="ok">已完成 <span class="n">2</span></div>
|
||
<div class="tab" data-f="down">下载中 <span class="n">1</span></div>
|
||
<div class="tab" data-f="fail">失败 <span class="n">1</span></div>
|
||
<div class="tab" data-f="only">仅记录 <span class="n">2</span></div>
|
||
</nav>
|
||
<section class="list" id="list">
|
||
<!-- 已完成 -->
|
||
<div class="row" data-s="ok">
|
||
<div class="thumb" title="点击预览"><svg viewBox="0 0 96 64"><rect width="96" height="64" fill="#fff"/><text x="8" y="24" font-size="13" font-weight="700" fill="#111">古茗草莓</text><text x="8" y="40" font-size="13" font-weight="700" fill="#111">新品专场</text><text x="8" y="55" font-size="9" fill="#555">单杯不到12r</text></svg></div>
|
||
<div class="main">
|
||
<div class="line1"><span class="name">pop 手绘体设计 · 第 1 张</span><span class="badge ok">已完成</span></div>
|
||
<div class="meta">品牌视觉 · 12-03 14:20 · 1536×1024 · gpt-image-2.6</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button class="btn" disabled>已在图库</button>
|
||
<button class="btn ghost">复制原始链接</button>
|
||
<button class="btn ghost">定位</button>
|
||
</div>
|
||
</div>
|
||
<!-- 下载中 -->
|
||
<div class="row" data-s="down">
|
||
<div class="thumb" title="点击预览"><svg viewBox="0 0 96 64"><rect width="96" height="64" fill="#fff"/><text x="8" y="26" font-size="13" font-weight="700" fill="#111">艺术字体</text><text x="8" y="44" font-size="11" fill="#111">买一送一</text></svg><div class="prog"><i></i></div></div>
|
||
<div class="main">
|
||
<div class="line1"><span class="name">艺术字体 · 第 1 张</span><span class="badge">下载中 42%</span></div>
|
||
<div class="meta">活动海报 · 12-03 14:22 · 1536×1024 · 正在写入 images/gallery</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button class="btn" disabled>下载中…</button>
|
||
<button class="btn ghost">复制原始链接</button>
|
||
<button class="btn ghost">定位</button>
|
||
</div>
|
||
</div>
|
||
<!-- 失败 -->
|
||
<div class="row failed" data-s="fail">
|
||
<div class="thumb" title="点击预览"><svg viewBox="0 0 96 64"><rect width="96" height="64" fill="#fff"/><text x="8" y="26" font-size="12" font-weight="700" fill="#111">披萨新品</text><text x="8" y="44" font-size="12" font-weight="700" fill="#111">买一送一</text></svg></div>
|
||
<div class="main">
|
||
<div class="line1"><span class="name">艺术字体 · 第 2 张</span><span class="badge err">失败</span></div>
|
||
<div class="meta">活动海报 · 12-03 14:25 · 1536×1024</div>
|
||
<div class="errline">timeout · 已重试 3 次 · 原始链接仍可复制</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button class="btn primary">重试</button>
|
||
<button class="btn ghost">复制原始链接</button>
|
||
<button class="btn ghost">定位</button>
|
||
</div>
|
||
</div>
|
||
<!-- 仅记录 -->
|
||
<div class="row" data-s="only">
|
||
<div class="thumb" title="点击预览"><div class="ph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg><span>仅记录</span></div></div>
|
||
<div class="main">
|
||
<div class="line1"><span class="name">披萨新品 · 买一送一</span><span class="badge warn">仅记录</span></div>
|
||
<div class="meta">活动海报 · 12-02 18:10 · 1536×1024 · gpt-image-2.5</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button class="btn primary">下载</button>
|
||
<button class="btn ghost">复制原始链接</button>
|
||
<button class="btn ghost">定位</button>
|
||
</div>
|
||
</div>
|
||
<!-- 已完成,画布已删除 -->
|
||
<div class="row" data-s="ok">
|
||
<div class="thumb" title="点击预览"><svg viewBox="0 0 96 64"><rect width="96" height="64" fill="#fff"/><text x="8" y="24" font-size="12" font-weight="700" fill="#111">pop 手绘体</text><text x="8" y="42" font-size="10" fill="#555">新品上市</text></svg></div>
|
||
<div class="main">
|
||
<div class="line1"><span class="name">pop 手绘体设计 · 第 2 张</span><span class="badge ok">已完成</span></div>
|
||
<div class="meta">品牌视觉 · 12-01 09:40 · 1536×1024</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button class="btn" disabled>已在图库</button>
|
||
<button class="btn ghost">复制原始链接</button>
|
||
<button class="btn ghost" disabled>画布已删除</button>
|
||
</div>
|
||
</div>
|
||
<!-- 仅记录,节点已删除 -->
|
||
<div class="row" data-s="only">
|
||
<div class="thumb" title="点击预览"><div class="ph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/></svg><span>仅记录</span></div></div>
|
||
<div class="main">
|
||
<div class="line1"><span class="name">艺术字体 · 第 3 张</span><span class="badge warn">仅记录</span></div>
|
||
<div class="meta">活动海报 · 11-30 16:05 · 1536×1024</div>
|
||
</div>
|
||
<div class="actions">
|
||
<button class="btn primary">下载</button>
|
||
<button class="btn ghost">复制原始链接</button>
|
||
<button class="btn ghost" disabled>节点已删除</button>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<footer class="foot">
|
||
<span>记录只保留链接与本机状态;上限内自动淘汰最旧记录,不影响 images/gallery 里的文件。</span>
|
||
<span class="hint">点击「下载」= 落地到图库(图库会自动刷新出现)</span>
|
||
</footer>
|
||
</main>
|
||
</div>
|
||
<script>
|
||
const html = document.documentElement
|
||
const themeBtn = document.getElementById('theme')
|
||
themeBtn.addEventListener('click', () => { html.classList.toggle('theme-dark'); themeBtn.textContent = html.classList.contains('theme-dark') ? '浅色' : '深色' })
|
||
const tabs = Array.from(document.querySelectorAll('#tabs .tab'))
|
||
const rows = Array.from(document.querySelectorAll('#list .row'))
|
||
tabs.forEach((t) => t.addEventListener('click', () => {
|
||
tabs.forEach((x) => x.classList.toggle('active', x === t))
|
||
const f = t.getAttribute('data-f')
|
||
rows.forEach((r) => { r.style.display = (f === 'all' || r.getAttribute('data-s') === f) ? '' : 'none' })
|
||
}))
|
||
</script>
|
||
</body>
|
||
</html>
|