比较提交

..

1 提交

作者 SHA1 备注 提交日期
6e2d37b320 feat: add style profile v2 transfer pipeline 2026-07-22 00:03:52 +08:00
共有 34 个文件被更改,包括 259 次插入 和 1456 次删除

查看文件

@ -1,3 +1,7 @@
## 1.0.67
- Introduce Style Profile V2 with region-level invariants, scale adapters, prompt budgeting, and structured consensus payloads for more faithful face, hair, linework, shading, clothing-rendering, and background transfer.
## 1.0.66 ## 1.0.66
- Complete P0-P2 style-profile hardening: decouple age and anatomy evidence, enforce review consistency caps, gate core traits by cross-context evidence, re-audit semantic rewrites, deduplicate scale capsules, use neutral validation scenes, add layered rendering review, improve score trust display, and block automatic adoption of regressed candidates. - Complete P0-P2 style-profile hardening: decouple age and anatomy evidence, enforce review consistency caps, gate core traits by cross-context evidence, re-audit semantic rewrites, deduplicate scale capsules, use neutral validation scenes, add layered rendering review, improve score trust display, and block automatic adoption of regressed candidates.

查看文件

@ -229,6 +229,12 @@ _LITERAL_SHAPE_NEGATIVE_GUARDS: tuple[str, ...] = (
# comparable across providers and prevents a visually attractive image from # comparable across providers and prevents a visually attractive image from
# receiving a high score while missing the actual line, face or shading grammar. # receiving a high score while missing the actual line, face or shading grammar.
STYLE_REVIEW_SCHEMA_VERSION = 3 STYLE_REVIEW_SCHEMA_VERSION = 3
STYLE_PROFILE_V2_SCHEMA_VERSION = 1
STYLE_PROFILE_V2_REGION_ORDER = (
"face", "eyes", "hair", "linework", "shading", "palette",
"clothing_rendering", "background_rendering", "texture", "anatomy",
)
STYLE_PROFILE_V2_PROMPT_BUDGET = 12
STYLE_REVIEW_DIMENSIONS: tuple[str, ...] = ( STYLE_REVIEW_DIMENSIONS: tuple[str, ...] = (
"face_structure", "face_structure",
"eye_design", "eye_design",
@ -1735,6 +1741,12 @@ class AdvancedStyleSetService:
), ),
"feature_evidence": _list(provider_result.get("feature_evidence")), "feature_evidence": _list(provider_result.get("feature_evidence")),
"color_hierarchy": _normalize_color_hierarchy(provider_result.get("color_hierarchy")), "color_hierarchy": _normalize_color_hierarchy(provider_result.get("color_hierarchy")),
"style_profile_v2": _build_style_profile_v2({
**provider_result,
**structures,
"artist_signature": provider_result.get("artist_signature"),
"color_hierarchy": _normalize_color_hierarchy(provider_result.get("color_hierarchy")),
}),
"prompt_priority_groups": _object(provider_result.get("prompt_priority_groups")), "prompt_priority_groups": _object(provider_result.get("prompt_priority_groups")),
"scale_capsules": _object(provider_result.get("scale_capsules")), "scale_capsules": _object(provider_result.get("scale_capsules")),
"semantic_risk_audit": _list(provider_result.get("semantic_risk_audit")), "semantic_risk_audit": _list(provider_result.get("semantic_risk_audit")),
@ -2290,6 +2302,7 @@ class AdvancedStyleSetService:
"generation_capsules": consensus.result.get("generation_capsules"), "generation_capsules": consensus.result.get("generation_capsules"),
"prompt_priority_groups": consensus.result.get("prompt_priority_groups"), "prompt_priority_groups": consensus.result.get("prompt_priority_groups"),
"scale_capsules": consensus.result.get("scale_capsules"), "scale_capsules": consensus.result.get("scale_capsules"),
"style_profile_v2": consensus.result.get("style_profile_v2"),
"semantic_risk_audit": consensus.result.get("semantic_risk_audit"), "semantic_risk_audit": consensus.result.get("semantic_risk_audit"),
"validation_content_prompt": case.content_prompt, "validation_content_prompt": case.content_prompt,
"actual_generation_prompt": case.final_prompt, "actual_generation_prompt": case.final_prompt,
@ -4036,6 +4049,111 @@ def _style_kernel_parts(payload: dict[str, Any]) -> list[str]:
return _unique_prompt_parts(result) return _unique_prompt_parts(result)
def _style_profile_v2_region(value: Any) -> str:
text = str(value or "").casefold()
markers = {
"face": ("face", "facial", "jaw", "chin", "cheek", "nose", "mouth"),
"eyes": ("eye", "iris", "pupil", "lash", "eyelid", "catchlight"),
"hair": ("hair", "strand", "bang", "fringe", "lock", "curl", "sheen", "highlight"),
"linework": ("line", "ink", "outline", "contour", "stroke"),
"shading": ("shadow", "shading", "cel", "gradient", "occlusion"),
"palette": ("palette", "color", "colour", "chroma", "saturation", "hue", "pink", "lavender"),
"clothing_rendering": ("clothing", "garment", "fabric", "frill", "lace", "fold", "accessor", "ornament"),
"background_rendering": ("background", "environment", "scene", "bokeh", "architecture", "atmosphere"),
"texture": ("texture", "grain", "brush", "surface", "paper", "noise"),
"anatomy": ("anatomy", "proportion", "silhouette", "limb", "head-to-body"),
}
for region in STYLE_PROFILE_V2_REGION_ORDER:
if any(marker in text for marker in markers[region]):
return region
return "texture"
def _style_profile_v2_add(target: dict[str, list[str]], value: Any, *, region: Any = None) -> None:
text = _clean_prompt_text(str(value or "").strip())
if not text:
return
selected = str(region or _style_profile_v2_region(text))
if selected not in STYLE_PROFILE_V2_REGION_ORDER:
selected = _style_profile_v2_region(text)
target.setdefault(selected, []).append(text)
def _build_style_profile_v2(payload: Any) -> dict[str, Any]:
data = payload if isinstance(payload, dict) else {}
evidence = _normalized_feature_evidence(data.get("feature_evidence"))
invariant_parts: dict[str, list[str]] = {region: [] for region in STYLE_PROFILE_V2_REGION_ORDER}
signatures = _normalize_artist_signature(data.get("artist_signature"), [])
for item in signatures:
if not isinstance(item, dict):
continue
phrase = item.get("phrase")
if _style_trait_is_supported(phrase, evidence, required=bool(evidence)):
_style_profile_v2_add(invariant_parts, phrase, region={
"face_structure": "face", "eye_design": "eyes", "hair_rendering": "hair",
"linework": "linework", "shading": "shading", "palette": "palette",
"highlights": "hair", "texture": "texture", "anatomy": "anatomy",
}.get(str(item.get("dimension") or "")))
profile = data.get("normalized_asset_profile") if isinstance(data.get("normalized_asset_profile"), dict) else {}
for phrase in _prompt_parts(profile.get("must_preserve")):
if _style_trait_is_supported(phrase, evidence, required=bool(evidence)):
_style_profile_v2_add(invariant_parts, phrase)
for phrase in _style_kernel_parts(data):
_style_profile_v2_add(invariant_parts, phrase)
for key, value in _normalize_color_hierarchy(data.get("color_hierarchy")).items():
_style_profile_v2_add(invariant_parts, f"{key.replace('_', ' ')}: {value}", region="palette")
attributes = profile.get("attributes") if isinstance(profile.get("attributes"), dict) else {}
for key, raw in attributes.items():
if not isinstance(raw, dict) or raw.get("transfer_role") != "style_structure":
continue
value = _optional_text(raw.get("value"))
if value:
_style_profile_v2_add(invariant_parts, value, region="face" if "facial" in str(key) else "anatomy")
invariants: dict[str, list[str]] = {}
for region in STYLE_PROFILE_V2_REGION_ORDER:
parts = _compact_style_prompt_parts(
[_strip_style_background_effects(_normalize_style_prompt_conflicts(item)) for item in invariant_parts[region]],
limit=2,
)
if parts:
invariants[region] = parts
adapters: dict[str, list[str]] = {}
raw_scales = data.get("scale_capsules") if isinstance(data.get("scale_capsules"), dict) else {}
for case_key in ("portrait", "fullbody", "novel_scene"):
raw = raw_scales.get(case_key)
parts = _prompt_parts(raw.get("prompt_parts") or raw.get("positive_additions")) if isinstance(raw, dict) else _prompt_parts(raw)
sanitized = []
for item in _split_prompt_clauses(parts):
safe, _ = _sanitize_minor_age_text(_normalize_style_prompt_conflicts(item))
safe = _strip_style_background_effects(safe)
if safe:
sanitized.append(safe)
if sanitized:
adapters[case_key] = _compact_style_prompt_parts(sanitized, limit=4)
variable = _unique_prompt_parts(
_optional_text(item.get("trait") if isinstance(item, dict) else item) or ""
for item in _list(data.get("variable_style_features"))
)
return {
"schema_version": STYLE_PROFILE_V2_SCHEMA_VERSION,
"invariants": invariants,
"adapters": adapters,
"variable_features": variable[:8],
"evidence_supported_count": sum(1 for item in evidence if item.get("supported")),
"region_order": list(STYLE_PROFILE_V2_REGION_ORDER),
}
def _style_profile_v2_prompt_parts(payload: dict[str, Any]) -> list[str]:
profile = payload.get("style_profile_v2") if isinstance(payload.get("style_profile_v2"), dict) else _build_style_profile_v2(payload)
invariants = profile.get("invariants") if isinstance(profile.get("invariants"), dict) else {}
parts: list[str] = []
for region in STYLE_PROFILE_V2_REGION_ORDER:
for item in _prompt_parts(invariants.get(region))[:2]:
parts.append(f"{region.replace('_', ' ')}: {item}")
return _compact_style_prompt_parts(parts, limit=STYLE_PROFILE_V2_PROMPT_BUDGET)
def _strip_style_background_effects(value: Any) -> str: def _strip_style_background_effects(value: Any) -> str:
text = str(value or "").strip() text = str(value or "").strip()
for pattern, replacement in _STYLE_BACKGROUND_EFFECT_PATTERNS: for pattern, replacement in _STYLE_BACKGROUND_EFFECT_PATTERNS:
@ -4084,11 +4202,12 @@ def _detailed_style_prompt(result: Any, fallback: Any) -> str:
required=bool(_VARIABLE_CONTENT_PATTERNS.search(item)), required=bool(_VARIABLE_CONTENT_PATTERNS.search(item)),
) )
] ]
profile_v2_parts = _style_profile_v2_prompt_parts(payload)
signature_parts = _artist_signature_prompt_parts(payload) signature_parts = _artist_signature_prompt_parts(payload)
color_hierarchy = payload.get("color_hierarchy") if isinstance(payload.get("color_hierarchy"), dict) else {} color_hierarchy = payload.get("color_hierarchy") if isinstance(payload.get("color_hierarchy"), dict) else {}
color_parts = [f"{key.replace('_', ' ')}: {value}" for key, value in color_hierarchy.items()] color_parts = [f"{key.replace('_', ' ')}: {value}" for key, value in color_hierarchy.items()]
# Priority groups are the compact style kernel; signatures and capsules are supplementary evidence. # Style Profile V2 is region-aware; legacy fields remain fallback evidence for old consensus records.
supplemental_parts = [*gated_must_preserve, *capsule_parts, *signature_parts, *color_parts] supplemental_parts = [*profile_v2_parts, *gated_must_preserve, *capsule_parts, *signature_parts, *color_parts]
# Structural age stylization / body-ratio cues are not optional traits; keep them even when # Structural age stylization / body-ratio cues are not optional traits; keep them even when
# feature_evidence only covers linework/eyes. Chronological age attributes stay excluded. # feature_evidence only covers linework/eyes. Chronological age attributes stay excluded.
for key, raw in (profile.get("attributes") or {}).items() if isinstance(profile.get("attributes"), dict) else []: for key, raw in (profile.get("attributes") or {}).items() if isinstance(profile.get("attributes"), dict) else []:
@ -4129,7 +4248,7 @@ def _detailed_style_prompt(result: Any, fallback: Any) -> str:
filtered.append(item) filtered.append(item)
rewritten = filtered rewritten = filtered
# Do not inject mature-adult body locks after scrubbing chronological-minor wording. # Do not inject mature-adult body locks after scrubbing chronological-minor wording.
compiled = _compact_style_prompt_parts(rewritten, limit=16) compiled = _compact_style_prompt_parts(rewritten, limit=STYLE_PROFILE_V2_PROMPT_BUDGET)
if compiled: if compiled:
return _join_prompt( return _join_prompt(
*compiled, *compiled,
@ -4170,6 +4289,10 @@ def _detailed_style_negative_prompt(result: Any, fallback: Any) -> str:
def _scale_specific_style_prompt(result: Any, case_key: str, common_prompt: Any = None) -> str: def _scale_specific_style_prompt(result: Any, case_key: str, common_prompt: Any = None) -> str:
payload = result if isinstance(result, dict) else {} payload = result if isinstance(result, dict) else {}
profile_v2 = payload.get("style_profile_v2") if isinstance(payload.get("style_profile_v2"), dict) else _build_style_profile_v2(payload)
adapters = profile_v2.get("adapters") if isinstance(profile_v2.get("adapters"), dict) else {}
parts = _prompt_parts(adapters.get(case_key))
if not parts:
scales = payload.get("scale_capsules") if isinstance(payload.get("scale_capsules"), dict) else {} scales = payload.get("scale_capsules") if isinstance(payload.get("scale_capsules"), dict) else {}
raw = scales.get(case_key) raw = scales.get(case_key)
if isinstance(raw, dict): if isinstance(raw, dict):

查看文件

@ -1,7 +1,7 @@
plugin: plugin:
name: astrbot_plugin_imagestudio name: astrbot_plugin_imagestudio
display_name: ImageStudio display_name: ImageStudio
version: 1.0.66 version: 1.0.67
features: features:
quick_profile: true quick_profile: true

查看文件

@ -10,7 +10,7 @@ from core.runtime_paths import resolve_config_path
from database.db_helper import load_config_payload from database.db_helper import load_config_payload
PLUGIN_VERSION = "1.0.66" PLUGIN_VERSION = "1.0.67"
@dataclass(frozen=True) @dataclass(frozen=True)

查看文件

@ -1,83 +0,0 @@
# ImageStudio 前端 UI 审计
日期:2026-07-21
范围:`frontend/standalone-web` 工作台、共享 API 类型、导航与 Gallery 页面
方法:Impeccable `audit` 技术检查、源码静态审计、基线 typecheck/build/contract tests
## 项目盘点
### 技术栈与入口
- Vue 3 Composition API + TypeScript + Vite 6。
- 独立 Web 入口:`frontend/standalone-web/src/main.ts` → `App.vue`。
- AstrBot 插件页入口:`frontend/plugin-page/src/main.ts`,通过 `astrbot-page-bridge` 注入后复用 `standalone-web/src/App.vue`。
- API 统一入口:`frontend/shared/api/client.ts`;路径常量集中在 `frontend/shared/api/endpoints.ts`,基础路径为 `/api/v1/plugins/extensions/astrbot_plugin_imagestudio`。
- 当前无 Vue Router;页面切换由 `activeNav` + URL 查询参数 `view` / `module` / `materialView` / `profile` 维护,并使用 `history.replaceState`。
### 页面与主要组件
- 工作台页面:overview、generate、queue、performance、gallery、profiles、materials、settings、logs。
- 主要页面组件:`GalleryPage.vue`、`ProfilesPage.vue`、`AdvancedMaterialImportPage.vue`、`SettingsPage.vue`、`BackupPage.vue`、`LogsPage.vue`。
- 主要复用组件:`AppNavigationRail.vue`、`StateCard.vue`、`EmptyState.vue`、`MetricCardGrid.vue`、多个 Dialog/Drawer 组件。
- 复杂业务子域:workflow、profiles、materials;多数页面仍由 `App.vue` 组合和持有状态。
### 不能改变的契约
- 不改变导航 key、module 映射、URL 查询参数语义及插件页/独立 Web 双入口。
- 不改变 `frontend/shared/api/endpoints.ts` 中的 endpoint 名称、HTTP 方法、请求体字段和响应类型。
- 不改变 `frontend/shared/types/**` 的数据结构,尤其是 image、job、workflow、profile、material、settings、storage 相关类型。
- 不改变生成、队列、图库批量操作、工作流轮次/分支、角色卡、素材识别、设置备份与日志的现有交互语义。
- 不删除 AstrBot plugin page bridge、媒体签名/载荷流程、后端连接状态与错误恢复路径。
## Audit Health Score
| 维度 | 分数 | 关键发现 |
|---|---:|---|
| Accessibility | 2/4 | 已有语义按钮、`aria-current`、`aria-pressed`、状态 live region;但部分表单控件缺少显式 label,图片预览/弹层焦点管理与键盘闭环需要统一验证。 |
| Performance | 2/4 | 生产构建可用;`App.vue` 单文件约 22k 行、Web JS gzip 约 211.5 kB,且存在 `transition: width`、`transition: max-height` 等布局属性动画。 |
| Theming | 2/4 | 有 dark/light 变量和主色持久化;但 tokens 集中在 `App.vue`,大量页面级颜色/阴影/渐变仍混杂,主题边界难以复用。 |
| Responsive Design | 2/4 | Gallery 等页面有 1180/900/560 断点;工作台整体仍依赖 244px rail、宽 topbar 与多列面板,窄桌面窗口存在拥挤/溢出风险。 |
| Anti-Patterns | 2/4 | 本地 detector 命中布局属性动画、圆角元素厚边、侧边/顶部强调条、占位图片检测;背景网格、玻璃模糊和多层渐变也提高了视觉噪声。 |
| **Total** | **10/20** | **Acceptable:功能基础稳定,但需要有边界的结构化 UI 重构。** |
## Anti-Patterns Verdict
**部分通过,仍有明显 AI/模板化痕迹。** 具体包括:工作台背景的装饰性网格、多个 surface 的渐变与 blur、状态卡片的顶部强调条、导航 active 状态的侧边强调、圆角 + 宽阴影组合,以及大单体 App 文件导致的重复视觉词汇难以治理。它们不是功能阻塞,但会让工具界面显得“装饰先于任务”。
## 问题清单与优先级
### P0 Blocking
- 当前没有确认到会阻塞主要任务完成的 P0 UI 问题。基线功能检查全部通过。
### P1 Major
- **P1-01:工作台壳层与业务页面耦合过重**:`frontend/standalone-web/src/App.vue` 约 22k 行,同时承载导航、数据加载、弹层、生成器、队列、图库、素材与设置。影响:任何视觉调整都容易触碰业务状态,回归面大。
- **P1-02:桌面窄窗口的结构风险**:导航 rail、sticky topbar、双栏工作区和多个固定最小宽度并存,约 1024–1280px 宽度下容易造成操作区压缩、横向滚动或首屏信息层级失衡。
- **P1-03:主题 token 没有形成可复用层**:核心变量主要位于 `App.vue` 的全局 style,页面组件继续直接组合 `var(--panel)`、`var(--border)`、颜色混合和阴影。影响:dark/light 与未来页面统一成本高。
- **P1-04:交互状态覆盖不均**:部分按钮有 disabled/hover/focus,弹层、批量操作、加载、空态、错误态的状态表达不完全统一;需要以组件级状态矩阵补齐。
- **P1-05:可访问性需专项修复**:`GalleryPage.vue` 搜索框和批量 checkbox 等控件依赖邻近文本,部分复杂弹层/预览需要确认 focus return、Escape、焦点陷阱与可读名称;不能只依赖视觉状态。
- **P1-06:性能边界**:`App.vue` 产生单一大 JS/CSS 包,构建已给出超过 500 kB 的 chunk 警告;本轮不改业务加载策略,但应避免新增全局样式和重型运行时依赖。
### P2 Minor
- **P2-01:视觉节奏不一致**:8/10/12/14/16/18/22/24 等间距和 7/8/10/12 等圆角并存,需抽取有限的 spacing/radius scale。
- **P2-02:装饰噪声偏高**:背景网格、渐变、backdrop-filter 在多个层级重复,降低任务区域的对比度和层级清晰度。
- **P2-03:状态色与表面色混用**:good/warn/bad/idle 的 border、背景、顶部条规则分散在多个选择器,需集中到语义状态 tokens。
- **P2-04:图库卡片信息密度不稳定**:grid/list/inspector 三种模式的操作按钮、选中态和媒体占比不完全一致,批量操作区在窄桌面易成为第二工具栏。
- **P2-05:部分过渡动画直接改变布局属性**:检测命中 `transition: width` 与 `transition: max-height`;应优先改为 transform/opacity 或 grid 行过渡。
- **P2-06:图片替代文本规则不统一**:多数业务图片有 alt,但预览/通知缩略图存在空 alt 或依赖上下文的情况,需要区分装饰图与内容图。
## 正向发现
- 业务 API 与类型文件集中,页面重构可以保持数据契约不变。
- 导航、状态卡、空态、预览对话框已有复用组件,不需要推倒重来。
- Gallery 已具备搜索、筛选、grid/list、批量操作、预览、错误和 loading 路径,适合作为第一批页面。
- 基线 `npm.cmd run typecheck`、`npm.cmd run build:web`、`npm.cmd run test:contracts` 均通过。
## 来源与边界
- 本地源码:`frontend/standalone-web/src/App.vue`、`frontend/standalone-web/src/features/gallery/GalleryPage.vue`、`frontend/standalone-web/src/components/AppNavigationRail.vue`、`frontend/shared/api/client.ts`、`frontend/shared/api/endpoints.ts`、`frontend/shared/types/**`。
- 本地配置:`frontend/package.json`、`frontend/standalone-web/vite.config.ts`、`frontend/plugin-page/vite.config.ts`。
- Impeccable 本地 detector:命中 5 项静态提示,未替代人工审计。
- 未使用外部网络资料;本次目标是对现有仓库实现做代码级审计。

查看文件

@ -1,164 +0,0 @@
# ImageStudio UI 重构后续开发队列
日期:2026-07-21
基线分支:`codex/ui-redesign-gallery`
范围:仅覆盖本轮 UI 重构尚未完成的事项;不包含后端功能新增。
## 当前结论
- 已完成:共享视觉 token、工作台壳层、主要页面统一 surface/间距/圆角/状态/focus、Gallery 首批重构、桌面横向溢出修复、静态 detector 检查。
- 尚未完成:真实 AstrBot 后端数据验收、逐页深度视觉精修、完整键盘/焦点审计、多个桌面尺寸验证、性能拆包、提交与发布收口。
- 当前分支仍有未提交源码和文档改动;主支未修改。
## P0:交付阻断项
### Q0-01 真实 AstrBot 后端联调
**目标**:在真实 plugin-page bridge 和后端 API 下验证 UI,不再只依赖 preview mode。
**涉及**:`frontend/plugin-page/src/main.ts`、`frontend/shared/api/client.ts`、所有主要页面。
**验收**:
- plugin-page 能加载真实 bootstrap、dashboard、profiles、images、jobs、settings、logs。
- 后端未连接、401、超时、空数据、部分数据错误状态均有可读反馈。
- 真实媒体签名、预览、刷新和批量操作不出现空白或死状态。
### Q0-02 保护当前未提交改动并完成分支交付
**目标**:确认 `GalleryPage.vue` 原有改动与本轮改动的归属,完成 diff review、提交和 PR。
**验收**:
- `git diff --check` 通过。
- 无构建产物污染 `web/` 或 `pages/imagestudio/`。
- 用户确认后创建 commit/PR;未确认前不合并主支。
## P1:发布前必须完成
### Q1-01 逐页深度视觉精修
当前统一主要通过共享 CSS 层完成,以下页面还需要逐页检查内容层级、密度和操作优先级:
- Overview:指标条、监控摘要、队列摘要、最近图片之间的层级和密度。
- Generate:预览区、提示词输入、模型选择、生成操作和结果信息的空间分配。
- Queue:过滤、任务状态、进度、详情和批量操作的优先级。
- Performance:指标、趋势/明细、空态和失败态。
- Profiles:master/detail/wardrobe 三栏在有数据、无数据和 sealed 状态下的层级。
- Materials:导入、识别、确认、筛选、详情和空态。
- Settings:section 导航、配置编辑、保存/校验/回滚状态。
- Logs:筛选、日志列表、错误状态和长文本换行。
- Workflow:节点流、轮次、分支、候选图、审查 dialog、素材 drawer。
**验收**:每页保留现有功能,并有明确的主操作、次操作、危险操作和恢复路径。
### Q1-02 完整可访问性审计
**涉及**:所有 `*.vue` 页面和 Dialog/Drawer 组件。
**任务**:
- 为搜索、筛选、checkbox、select、textarea、icon-only button 补齐稳定 label。
- 验证 Tab 顺序、Enter/Space、Escape、焦点回收和 dialog focus trap。
- 检查 heading 层级、landmark、`aria-current`、`aria-expanded`、`aria-selected`、`aria-live`。
- 检查真实图片 alt、装饰图空 alt、加载/失败图片的替代内容。
- 使用键盘完成 Gallery 批量操作、Profiles 选择、Workflow 节点操作和 Settings 保存。
**验收**:关键路径不依赖鼠标;焦点在 dark/light 两主题下可见。
### Q1-03 多尺寸响应式验收
**必须验证尺寸**:
- 1024×768:窄桌面,检查 rail、topbar、双栏/三栏区域。
- 1280×800:常见桌面工作区。
- 1440×900:宽桌面,检查内容是否过度拉伸。
- 1600×900:超宽窗口,检查 max-width 和阅读线长。
**验收**:无横向溢出;sticky topbar/rail 不遮挡内容;批量工具栏和 dialog 不被裁切。
### Q1-04 状态矩阵补齐
为每个主要页面记录并验证:default、hover、focus、active/selected、disabled、loading、empty、error、success、backend disconnected。
重点组件:按钮、tabs、filters、cards、dialogs、drawers、图片预览、表单保存栏。
## P2:质量和维护性
### Q2-01 视觉回归测试
- 为 9 个主要 view 建立最小 Playwright/浏览器 smoke test。
- 固定至少一组 dark/light 截图或 DOM 断言。
- 断言 `scrollWidth === clientWidth`、页面标题、主要 landmark 和关键操作存在。
- 将真实 backend 不可用场景纳入 preview-mode regression。
### Q2-02 前端拆包与性能优化
**现状**:Web JS gzip 约 211.6 kB,Vite 报告单 chunk 超过 500 kB。
**任务**:
- 评估按页面动态导入 Generate、Profiles、Materials、Settings、Workflow。
- 保证 plugin-page bridge 首屏和 `App.vue` 的 URL 参数恢复不受影响。
- 避免新增 UI 运行时依赖;对大图片列表保持懒加载和稳定的媒体 URL。
- 对生成预览、Workflow 候选图和 Materials grid 做渲染数量边界检查。
**验收**:构建 chunk 警告下降或有明确的保留理由;交互没有新增延迟。
### Q2-03 样式边界整理
- 将 `App.vue` 中新增的全局 override 按壳层、页面、组件拆到可定位样式文件。
- 避免继续增长 22k 行级别的单体 `App.vue`。
- 保留 `tokens.css` 作为唯一视觉 token 来源,减少页面内直接写颜色/圆角/阴影。
- 清理重复的局部样式和已被全局层覆盖的旧规则。
### Q2-04 主题和对比度验证
- 验证 dark/light 下正文、placeholder、disabled、warning、danger、success 的对比度。
- 复核用户自定义 primary/accent 颜色的极端值,避免 focus 和文字失去对比度。
- 记录至少一组自动化 contrast 检查结果。
## P3:可选增强
### Q3-01 设计文档和组件清单
- 为 token、button、input、surface、status、dialog、empty state 建立简短使用约定。
- 在 `docs/` 维护页面状态矩阵和可复用组件清单。
### Q3-02 真实数据密度优化
- 用真实 profiles、materials、images、jobs、logs 数据压测长标题、长 prompt、长错误消息。
- 检查分页/滚动/虚拟化需求,避免只在空数据预览态下看起来稳定。
### Q3-03 发布前人工验收
- 在 AstrBot plugin page 中完成一次完整生成、图库复用、角色选择、素材导入、设置保存、日志查看流程。
- 记录阻塞项、截图和最终版本信息。
## 推荐执行顺序
1. `Q0-01` 真实后端联调。
2. `Q1-01` 逐页深度视觉精修。
3. `Q1-02` 可访问性审计与修复。
4. `Q1-03` 四种桌面尺寸验收。
5. `Q1-04` 状态矩阵补齐。
6. `Q2-01` 回归测试。
7. `Q2-02` 拆包优化。
8. `Q2-03` 样式边界整理。
9. `Q2-04` 主题对比度验证。
10. `Q0-02` 最终 diff review、commit 和 PR。
11. `Q3-03` 真实插件页发布前验收。
## 暂不列入本队列
- 后端 API 新功能。
- 多租户权限链、持久 Worker、数据库迁移等后端架构事项。
- 更换 Vue/Vite/TypeScript 或引入新的 UI 框架。
## Execution update (2026-07-21)
- Q0-01: source-level bridge/error/preview paths validated; live AstrBot host acceptance remains pending.
- Q1-01: shared visual layer, page-level surface hierarchy, action states, and overview narrow-desktop override completed; all nine views smoke-tested.
- Q1-02: stable search/workbench/status labels added; image preview dialog now traps focus and restores focus; existing confirmation dialog trap retained.
- Q1-03: 1024x768, 1280x800, 1440x900, and 1600x900 passed across all nine views with no horizontal overflow.
- Q1-04: state matrix recorded in docs/ui-redesign-state-matrix-2026-07-21.md.
- Q2-01: added frontend/tests/ui-redesign-smoke.test.mjs and frontend/tests/ui-theme-contract.test.mjs; 7 UI contract tests pass.
- Q2-02: page and workflow components use defineAsyncComponent; production chunks are split and the largest JS chunk is below the prior warning threshold.
- Q2-03: new workbench overrides moved from App.vue into frontend/standalone-web/src/styles/workbench.css.
- Q2-04: dark/light token contrast checks added; measured text pair ratios are 16.40, 7.52, 15.14, and 4.59.
- Q0-02: diff review, build-artifact cleanup, full validation, commit, and PR are the remaining delivery actions.

查看文件

@ -1,54 +0,0 @@
# ImageStudio 全页面 UI 统一性检查
日期:2026-07-21
分支:`codex/ui-redesign-gallery`
## 覆盖范围
- 工作台壳层、导航 rail、topbar、主题和全局状态。
- Overview、Generate、Queue、Performance、Gallery、Profiles、Materials、Settings、Logs。
- Workflow 子组件、Profiles 子面板、Settings 子面板、Dialogs/Drawers。
- 独立 Web 与 AstrBot plugin-page 两个 Vite 入口。
## 统一规则
- 视觉 token:`frontend/standalone-web/src/styles/tokens.css`。
- 统一 surface:`var(--panel)` / `var(--panel-muted)`,默认取消装饰性宽阴影。
- 统一形状:小控件 6–8px,页面 surface 10px,状态 pill 使用 999px。
- 统一间距:4/8/12/16/20/24px。
- 统一 focus:主色 3px focus ring,表单和按钮保留键盘可见焦点。
- 统一状态:good/warn/bad/idle 使用语义边框和背景,不再依赖顶部/侧边粗色条。
- 统一动效:保留必要状态反馈;移除布局属性过渡,支持 `prefers-reduced-motion`。
- 统一响应式:修复 1265px 桌面窗口下 Overview/Gallery 横向溢出,9 个主要 view 均通过 smoke test。
## 结果
- Impeccable detector:0 条命中。
- 浏览器 smoke test:`overview`、`generate`、`queue`、`performance`、`images`、`profiles`、`materials`、`settings`、`logs` 均成功加载。
- 桌面窗口检查:`scrollWidth === clientWidth`,未发现横向溢出。
- plugin-page bridge 入口与独立 Web 入口均可构建。
## 验证命令
- `npm.cmd run typecheck`
- `npm.cmd run test:contracts`:19/19 通过
- `npm.cmd run build:web`
- `npm.cmd run build:plugin`
- `node C:\Users\Administrator\.agents\skills\impeccable\scripts\detect.mjs --json frontend/standalone-web/src/App.vue frontend/standalone-web/src/components frontend/standalone-web/src/features`
## 已知遗留
- Web JS gzip 仍约 211.6 kB,构建保留 Vite 的大 chunk 警告;这是后续代码拆分/动态导入工作,不在本轮视觉重构中处理。
- 未连接真实 AstrBot 后端,因此 smoke test 验证的是前端预览态、路由切换和布局,不替代真实 API/插件页数据联调。
## Final execution evidence
- Browser smoke: 36 checks across 9 views and 4 desktop sizes; all passed with scrollWidth equal to clientWidth.
- Frontend UI tests: 7/7 passed.
- Contract tests: 25/25 passed.
- Typecheck: passed.
- Plugin build: passed.
- Standalone build: passed.
- Generated web/pages artifacts were removed from the working tree after validation.
- Live AstrBot plugin-page acceptance is explicitly pending and documented in docs/ui-redesign-integration-validation-2026-07-21.md.

查看文件

@ -1,31 +0,0 @@
# UI Integration Validation
Date: 2026-07-21
Branch: codex/ui-redesign-gallery
## Local checks
- Plugin bridge source keeps ready/context handshake, GET/POST request routing, timeout handling, JSON-safe payload cloning, and error unwrapping.
- Direct API base remains /api/v1/plugins/extensions/astrbot_plugin_imagestudio.
- Plugin-page production build passed.
- Standalone-web production build passed.
- No local AstrBot host was available on the checked ports; no real bootstrap or signed-media response was claimed.
## Checked failure paths
- Direct transport reports network_unreachable when the API is unavailable.
- HTML/non-JSON responses are converted to invalid_api_response with a bounded preview.
- 401/HTTP failures remain ApiClientError values and are surfaced through the backend connection banner.
- Preview mode is explicit and write actions are blocked until a connected backend with write permission is present.
- Media URLs use the plugin bridge signing path instead of unauthenticated direct img requests.
## Required host acceptance
Run the following in an AstrBot plugin page with a real session:
1. Load ui/bootstrap, dashboard, profiles, images, jobs, settings, logs.
2. Verify signed image preview, refresh, batch selection, retry/cancel, settings save, and log filtering.
3. Verify 401, timeout, empty data, partial data, and backend restart recovery.
4. Record AstrBot version, ImageStudio plugin version, and screenshots.
Status: source-level integration is ready; live host acceptance is pending because no AstrBot plugin host is running in this workspace.

查看文件

@ -1,77 +0,0 @@
# ImageStudio 桌面端 UI 重构方案
日期:2026-07-21
分支:`codex/ui-redesign-gallery`
原则:保留业务逻辑、路由查询参数、API 与数据结构;先改一个页面,再扩展共享视觉层。
## 设计方向
ImageStudio 是桌面端创作工具,不采用营销网站的 hero、宣传卡片或装饰性动效。视觉方向为“安静的工作台”:冷中性背景、单一主色作为动作/选中/状态强调,内容区保持高对比和稳定密度;圆角、阴影、渐变只服务层级,不作为装饰。
## P0:先保证安全边界
本项目当前没有已确认的 P0 UI 阻塞项。P0 阶段只包含保护措施:
- 保留现有 URL 参数:`view`、`module`、`materialView`、`profile`。
- 保留 plugin-page bridge、API endpoint、shared types 和现有事件 emit。
- 每批修改前后运行 `npm.cmd run typecheck`、`npm.cmd run build:web`,并运行 `npm.cmd run test:contracts`。
- 不删除当前工作树已有的 `GalleryPage.vue` 未提交修改;本分支在其基础上继续。
## P1:首批桌面端可用性重构
### P1-01 只重构 Gallery 页面
目标文件:
- `frontend/standalone-web/src/features/gallery/GalleryPage.vue`
- 必要时复用而不改逻辑:`frontend/standalone-web/src/components/ImagePreviewDialog.vue`、`frontend/standalone-web/src/components/EmptyState.vue`、`frontend/standalone-web/src/components/StateCard.vue`
- 契约测试:`frontend/tests/production-data-boundary.test.mjs` 与图库相关测试
实施内容:
- 保持 props、emits、筛选值、批量 action、endpoint 调用和预览行为不变。
- 重排为稳定的桌面工作区:页面标题/主操作 → 搜索筛选 → 结果区 + inspector;减少重复 surface。
- 统一按钮、输入框、筛选 tabs、选中态、禁用态、loading、error、empty 状态。
- 让 grid/list 在 1024px–1440px 桌面宽度下优先保持主要内容可读,inspector 只在有选择时占据空间。
- 为搜索、批量选择、卡片操作和图片预览补齐可见 focus、名称、Escape/关闭路径检查。
- 不新增依赖,不引入营销式动画;保留现有 reduced-motion 规则并覆盖新过渡。
### P1-02 抽取最小共享视觉 token
候选文件:
- 新增 `frontend/standalone-web/src/styles/tokens.css` 或现有入口可接受的等价 token 文件。
- 调整 `frontend/standalone-web/src/App.vue` 的全局工作台变量接入 token。
范围:颜色角色、spacing、radius、border、shadow、focus ring、motion duration、z-index;只抽取已经在现有 UI 中出现的语义,不改变默认主题含义。
## P2:扩展一致性
- `frontend/standalone-web/src/components/AppNavigationRail.vue`:统一 active/hover/focus/compact rail,不改变导航 key 或 pin 行为。
- `frontend/standalone-web/src/features/profiles/ProfilesPage.vue`、`ProfileMasterPane.vue`、`ProfileDetailPane.vue`、`ProfileWardrobePane.vue`:应用同一 surface、表单和状态矩阵。
- `frontend/standalone-web/src/features/materials/AdvancedMaterialImportPage.vue`:统一导入步骤、loading/error/empty 和内容密度。
- `frontend/standalone-web/src/features/settings/SettingsPage.vue` 与 settings panels:统一 section、保存/校验/回滚状态。
- `frontend/standalone-web/src/features/workflow/*.vue`:只做视觉层和焦点/状态修复,不改变 workflow route、round、branch、review API。
- `frontend/standalone-web/src/features/logs/LogsPage.vue` 与 queue/performance 区块:统一状态色、表格/列表密度和窄桌面布局。
## P2:技术收口
- 将 `App.vue` 的局部视觉规则迁移到可定位的页面/组件样式,降低后续回归风险;不在第一批做大规模逻辑拆分。
- 评估路由页面的动态导入,但只有在不影响 plugin-page bridge 和首屏加载契约时才实施。
- 将布局属性过渡替换为 transform/opacity 或明确的 grid track 过渡。
- 统一图片 loading/失败/alt 规则,并复核对话框 focus return。
## 交付顺序与验证门
1. Gallery 页面视觉与交互状态;通过 typecheck、build:web、contract tests。
2. Gallery 桌面窗口验证:1280×800、1440×900、1024×768;检查横向溢出、sticky 区域、键盘焦点和空/错/加载状态。
3. 共享 tokens 接入;再次跑同一验证门,并确认 plugin build 不受影响。
4. 导航、profiles、materials、settings、workflow、logs/queue 分批推进,每批单独验证。
5. 最后一轮执行 Impeccable `polish`:桌面窗口、溢出、状态、可访问性与设计一致性。
## 明确不做
- 不重写后端、不改 API endpoint、不迁移数据结构。
- 不更换 Vue/Vite/TypeScript 技术栈。
- 不引入新的 UI 框架或图标依赖。
- 不添加不必要的全屏动画、营销式 hero、装饰性玻璃卡片或渐变文字。

查看文件

@ -1,30 +0,0 @@
# UI State Matrix
Date: 2026-07-21
Branch: codex/ui-redesign-gallery
## Coverage
| Area | default | hover | focus | selected | disabled | loading | empty | error | success | disconnected |
|---|---|---|---|---|---|---|---|---|---|---|
| Navigation rail | yes | yes | yes | aria-current=page | n/a | n/a | n/a | n/a | n/a | yes |
| Generate composer | yes | yes | yes | mode button | yes | submit text | preview empty | inline error | result card | write blocked |
| Queue | yes | yes | yes | filter/task | action disabled | refresh text | empty state | task error | completed status | read-only |
| Gallery | yes | yes | yes | card/batch | batch disabled | media loading | empty state | media fallback | selection feedback | read-only |
| Profiles | yes | yes | yes | profile/tab | sealed/read-only | pane loading | empty pane | inline error | saved state | read-only |
| Materials | yes | yes | yes | filter/category | permission disabled | operation busy | empty state | action error | operation message | read-only |
| Settings | yes | yes | yes | section/tab | permission disabled | save/reload | missing schema | validation error | saved message | read-only |
| Logs | yes | yes | yes | filter | refresh disabled | load text | empty state | error state | refreshed state | unavailable |
| Workflow | yes | yes | yes | node/candidate | sealed/locked | task progress | candidate empty | node error | adopted state | read-only |
## Keyboard paths
- Global search: focus, ArrowUp/ArrowDown, Enter, Escape.
- Navigation and tabs: Tab, Enter, Space, aria-current/aria-pressed.
- Confirm dialog: Escape, Tab loop, focus return.
- Image preview dialog: Escape, Tab loop, focus return, zoom controls.
- Backend banner: retry is keyboard reachable and status is aria-live.
## Notes
The matrix is backed by shared states in App.vue and feature components. Real backend disconnected states are represented by the existing preview/error/blocked paths; live plugin-host acceptance remains a deployment-bound check.

查看文件

@ -1,12 +1,12 @@
{ {
"name": "astrbot-plugin-imagestudio-frontend", "name": "astrbot-plugin-imagestudio-frontend",
"version": "1.0.66", "version": "1.0.67",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "astrbot-plugin-imagestudio-frontend", "name": "astrbot-plugin-imagestudio-frontend",
"version": "1.0.66", "version": "1.0.67",
"dependencies": { "dependencies": {
"@vitejs/plugin-vue": "^5.2.0", "@vitejs/plugin-vue": "^5.2.0",
"pinia": "^2.3.0", "pinia": "^2.3.0",

查看文件

@ -1,6 +1,6 @@
{ {
"name": "astrbot-plugin-imagestudio-frontend", "name": "astrbot-plugin-imagestudio-frontend",
"version": "1.0.66", "version": "1.0.67",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
@ -10,8 +10,7 @@
"build:web": "vite build --config standalone-web/vite.config.ts", "build:web": "vite build --config standalone-web/vite.config.ts",
"build": "npm run build:plugin && npm run build:web", "build": "npm run build:plugin && npm run build:web",
"typecheck": "vue-tsc --noEmit", "typecheck": "vue-tsc --noEmit",
"test:contracts": "node --test tests/*.test.mjs", "test:contracts": "node --test tests/*.test.mjs"
"test:ui": "node --test tests/ui-redesign-smoke.test.mjs tests/ui-theme-contract.test.mjs"
}, },
"dependencies": { "dependencies": {
"@vitejs/plugin-vue": "^5.2.0", "@vitejs/plugin-vue": "^5.2.0",
@ -24,3 +23,4 @@
}, },
"devDependencies": {} "devDependencies": {}
} }

查看文件

@ -1,7 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineAsyncComponent, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue" import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue"
import "./styles/tokens.css"
import "./styles/workbench.css"
import AppNavigationRail from "./components/AppNavigationRail.vue" import AppNavigationRail from "./components/AppNavigationRail.vue"
import ConfirmDialog from "./components/ConfirmDialog.vue" import ConfirmDialog from "./components/ConfirmDialog.vue"
import EmptyState from "./components/EmptyState.vue" import EmptyState from "./components/EmptyState.vue"
@ -12,22 +10,22 @@ import MaterialOperationDialog from "./components/MaterialOperationDialog.vue"
import { MATERIAL_BODY_SLOT_OPTIONS } from "./material-labels" import { MATERIAL_BODY_SLOT_OPTIONS } from "./material-labels"
import MetricCardGrid from "./components/MetricCardGrid.vue" import MetricCardGrid from "./components/MetricCardGrid.vue"
import StateCard from "./components/StateCard.vue" import StateCard from "./components/StateCard.vue"
const AdvancedMaterialImportPage = defineAsyncComponent(() => import("./features/materials/AdvancedMaterialImportPage.vue")) import AdvancedMaterialImportPage from "./features/materials/AdvancedMaterialImportPage.vue"
import { import {
parseMaterialLibraryView, parseMaterialLibraryView,
type MaterialLibraryView, type MaterialLibraryView,
} from "./features/materials/advanced-material-state" } from "./features/materials/advanced-material-state"
const GalleryPage = defineAsyncComponent(() => import("./features/gallery/GalleryPage.vue")) import GalleryPage from "./features/gallery/GalleryPage.vue"
import type { GalleryImage } from "./features/gallery/types" import type { GalleryImage } from "./features/gallery/types"
const LogsPage = defineAsyncComponent(() => import("./features/logs/LogsPage.vue")) import LogsPage from "./features/logs/LogsPage.vue"
import { navItems, visibleNavItems } from "./features/navigation/navigation-config" import { navItems, visibleNavItems } from "./features/navigation/navigation-config"
import { import {
profileGenerationKind, profileGenerationKind,
type ProfileGenerationKind, type ProfileGenerationKind,
} from "./features/profiles/profile-ui" } from "./features/profiles/profile-ui"
const ProfilesPage = defineAsyncComponent(() => import("./features/profiles/ProfilesPage.vue")) import ProfilesPage from "./features/profiles/ProfilesPage.vue"
import type { ProfileImageTarget } from "./features/profiles/types" import type { ProfileImageTarget } from "./features/profiles/types"
const SettingsPage = defineAsyncComponent(() => import("./features/settings/SettingsPage.vue")) import SettingsPage from "./features/settings/SettingsPage.vue"
import { import {
cleanImportedProfileValue, cleanImportedProfileValue,
createDefaultQuickProfileQuestionnaire, createDefaultQuickProfileQuestionnaire,
@ -36,14 +34,14 @@ import {
type ExternalProfileImportDraft, type ExternalProfileImportDraft,
type QuickProfileQuestionnaire, type QuickProfileQuestionnaire,
} from "./features/quick-profile/profile-import" } from "./features/quick-profile/profile-import"
const WorkflowCompareDialog = defineAsyncComponent(() => import("./features/workflow/WorkflowCompareDialog.vue")) import WorkflowCompareDialog from "./features/workflow/WorkflowCompareDialog.vue"
const WorkflowBranchPanel = defineAsyncComponent(() => import("./features/workflow/WorkflowBranchPanel.vue")) import WorkflowBranchPanel from "./features/workflow/WorkflowBranchPanel.vue"
const WorkflowCandidatePool = defineAsyncComponent(() => import("./features/workflow/WorkflowCandidatePool.vue")) import WorkflowCandidatePool from "./features/workflow/WorkflowCandidatePool.vue"
const WorkflowComposer = defineAsyncComponent(() => import("./features/workflow/WorkflowComposer.vue")) import WorkflowComposer from "./features/workflow/WorkflowComposer.vue"
const WorkflowDependencyContextCard = defineAsyncComponent(() => import("./features/workflow/WorkflowDependencyContextCard.vue")) import WorkflowDependencyContextCard from "./features/workflow/WorkflowDependencyContextCard.vue"
const WorkflowGenerationReviewDialog = defineAsyncComponent(() => import("./features/workflow/WorkflowGenerationReviewDialog.vue")) import WorkflowGenerationReviewDialog from "./features/workflow/WorkflowGenerationReviewDialog.vue"
const WorkflowMaterialDrawer = defineAsyncComponent(() => import("./features/workflow/WorkflowMaterialDrawer.vue")) import WorkflowMaterialDrawer from "./features/workflow/WorkflowMaterialDrawer.vue"
const WorkflowRoundPanel = defineAsyncComponent(() => import("./features/workflow/WorkflowRoundPanel.vue")) import WorkflowRoundPanel from "./features/workflow/WorkflowRoundPanel.vue"
import { import {
CHARACTER_WORKFLOW_PREVIEW_NODE_SPECS, CHARACTER_WORKFLOW_PREVIEW_NODE_SPECS,
canonicalCharacterWorkflowNodeKey, canonicalCharacterWorkflowNodeKey,
@ -10863,7 +10861,7 @@ function displayMediaUrl(rawUrl?: string | null): string {
} }
// AstrBot's sandbox bridge carries the dashboard login state. A direct // AstrBot's sandbox bridge carries the dashboard login state. A direct
// Direct image requests cannot add the bridge credential and are rejected. // <img> request cannot add that credential and is rejected with HTTP 401,
// so avoid rendering the known-broken URL while its Blob is being loaded. // so avoid rendering the known-broken URL while its Blob is being loaded.
return getApiTransport() === "plugin-bridge" ? "" : value return getApiTransport() === "plugin-bridge" ? "" : value
} }
@ -11033,7 +11031,6 @@ function errorMessage(err: unknown) {
<template> <template>
<main <main
class="navigation-shell" class="navigation-shell"
aria-label="ImageStudio workbench"
:class="{ 'rail-collapsed': !navigationRailExpanded }" :class="{ 'rail-collapsed': !navigationRailExpanded }"
:data-theme="themeMode" :data-theme="themeMode"
:style="shellStyle" :style="shellStyle"
@ -11050,7 +11047,7 @@ function errorMessage(err: unknown) {
@togglePinned="toggleNavigationRailPinned" @togglePinned="toggleNavigationRailPinned"
/> />
<section class="workbench" aria-label="ImageStudio workspace"> <section class="workbench">
<header class="topbar"> <header class="topbar">
<div class="active-heading"> <div class="active-heading">
<span>{{ activeItem.label }}</span> <span>{{ activeItem.label }}</span>
@ -11061,7 +11058,6 @@ function errorMessage(err: unknown) {
<span aria-hidden="true">⌕</span> <span aria-hidden="true">⌕</span>
<input <input
ref="searchInputRef" ref="searchInputRef"
aria-label="Search ImageStudio"
v-model="searchQuery" v-model="searchQuery"
type="search" type="search"
role="combobox" role="combobox"
@ -11212,7 +11208,6 @@ function errorMessage(err: unknown) {
v-if="showBackendConnectionBanner" v-if="showBackendConnectionBanner"
:class="['backend-connection-banner', backendConnectionClass]" :class="['backend-connection-banner', backendConnectionClass]"
role="status" role="status"
aria-live="polite"
> >
<div> <div>
<strong>{{ backendConnection.title }}</strong> <strong>{{ backendConnection.title }}</strong>
@ -11446,8 +11441,7 @@ function errorMessage(err: unknown) {
</option> </option>
</select> </select>
</label> </label>
<span v-if="imageGenerationSubmitting" class="model-state" role="status" <span v-if="imageGenerationSubmitting" class="model-state" role="status">生成中</span>
aria-live="polite">生成中</span>
<span v-else-if="imageGenerationError" class="model-state model-state-error" role="alert"> <span v-else-if="imageGenerationError" class="model-state model-state-error" role="alert">
{{ imageGenerationError }} {{ imageGenerationError }}
</span> </span>
@ -11837,8 +11831,7 @@ function errorMessage(err: unknown) {
<span v-else class="feature-action">{{ quickProfileActionButtonLabel(card) }}</span> <span v-else class="feature-action">{{ quickProfileActionButtonLabel(card) }}</span>
</article> </article>
</div> </div>
<p v-if="quickCharacterGenerationNotice" class="generation-notice" role="status" <p v-if="quickCharacterGenerationNotice" class="generation-notice" role="status">
aria-live="polite">
{{ quickCharacterGenerationNotice }} {{ quickCharacterGenerationNotice }}
</p> </p>
<p v-if="quickCharacterGenerationError" class="generation-error" role="alert"> <p v-if="quickCharacterGenerationError" class="generation-error" role="alert">
@ -17544,7 +17537,7 @@ body {
height: 100%; height: 100%;
border-radius: inherit; border-radius: inherit;
background: linear-gradient(90deg, var(--primary), var(--accent)); background: linear-gradient(90deg, var(--primary), var(--accent));
transition: none; transition: width 220ms ease;
} }
.workflow-node-card.done .workflow-node-progress i { .workflow-node-card.done .workflow-node-progress i {
@ -18423,8 +18416,8 @@ body {
} }
.workflow-draft-grid > article.final { .workflow-draft-grid > article.final {
border-color: color-mix(in srgb, var(--accent) 58%, var(--border)); border-color: var(--accent);
background: color-mix(in srgb, var(--accent) 10%, var(--panel-muted)); box-shadow: inset 0 3px 0 var(--accent);
} }
.workflow-draft-select { .workflow-draft-select {
@ -18642,15 +18635,15 @@ body {
} }
.workflow-action-card.accent { .workflow-action-card.accent {
border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); border-top-color: var(--accent);
} }
.workflow-action-card.warn { .workflow-action-card.warn {
border-color: color-mix(in srgb, var(--warn) 52%, var(--border)); border-top-color: var(--warn);
} }
.workflow-action-card.neutral { .workflow-action-card.neutral {
border-color: color-mix(in srgb, var(--neutral) 52%, var(--border)); border-top-color: var(--neutral);
} }
.workflow-action-card.disabled { .workflow-action-card.disabled {
@ -19965,7 +19958,7 @@ body {
overflow-y: auto; overflow-y: auto;
overscroll-behavior: contain; overscroll-behavior: contain;
padding-right: 4px; padding-right: 4px;
transition: none; transition: max-height 240ms var(--rail-ease);
} }
.quick-profile-material-picker-list.accessory { .quick-profile-material-picker-list.accessory {
@ -20133,6 +20126,7 @@ body {
min-height: 134px; min-height: 134px;
overflow: hidden; overflow: hidden;
border: 1px solid var(--border); border: 1px solid var(--border);
border-top: 3px solid var(--primary);
border-radius: 8px; border-radius: 8px;
padding: 10px; padding: 10px;
background: var(--panel-muted); background: var(--panel-muted);
@ -20140,15 +20134,15 @@ body {
} }
.quick-profile-command-card.accent { .quick-profile-command-card.accent {
border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); border-top-color: var(--accent);
} }
.quick-profile-command-card.warn { .quick-profile-command-card.warn {
border-color: color-mix(in srgb, var(--warn) 52%, var(--border)); border-top-color: var(--warn);
} }
.quick-profile-command-card.neutral { .quick-profile-command-card.neutral {
border-color: color-mix(in srgb, var(--neutral) 52%, var(--border)); border-top-color: var(--neutral);
} }
.quick-profile-command-card.disabled { .quick-profile-command-card.disabled {

查看文件

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from "vue" import { computed, onBeforeUnmount, onMounted, ref, watch } from "vue"
import { createSafeBackdropClose } from "../safe-backdrop-close" import { createSafeBackdropClose } from "../safe-backdrop-close"
@ -23,8 +23,6 @@ const scale = ref(1)
const offset = ref({ x: 0, y: 0 }) const offset = ref({ x: 0, y: 0 })
const dragging = ref(false) const dragging = ref(false)
const dragStart = ref({ pointerId: -1, x: 0, y: 0, offsetX: 0, offsetY: 0 }) const dragStart = ref({ pointerId: -1, x: 0, y: 0, offsetX: 0, offsetY: 0 })
const dialogRef = ref<HTMLElement | null>(null)
let previousFocus: HTMLElement | null = null
const scaleLabel = computed(() => `${Math.round(scale.value * 100)}%`) const scaleLabel = computed(() => `${Math.round(scale.value * 100)}%`)
const imageTransform = computed( const imageTransform = computed(
@ -33,16 +31,7 @@ const imageTransform = computed(
watch( watch(
() => [props.open, props.src] as const, () => [props.open, props.src] as const,
([open]) => { () => reset(),
reset()
if (open) {
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null
void nextTick(() => focusableElements()[0]?.focus())
} else {
void nextTick(restoreFocus)
}
},
{ immediate: true },
) )
onMounted(() => window.addEventListener("keydown", handleEscape)) onMounted(() => window.addEventListener("keydown", handleEscape))
@ -113,39 +102,6 @@ function endDrag(event: PointerEvent) {
} }
} }
function focusableElements() {
return Array.from(
dialogRef.value?.querySelectorAll<HTMLElement>(
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
) ?? [],
).filter((element) => !element.hasAttribute("hidden"))
}
function trapFocus(event: KeyboardEvent) {
if (event.key !== "Tab") return
const elements = focusableElements()
if (!elements.length) {
event.preventDefault()
dialogRef.value?.focus()
return
}
const first = elements[0]
const last = elements[elements.length - 1]
if (event.shiftKey && document.activeElement === first) {
event.preventDefault()
last.focus()
} else if (!event.shiftKey && document.activeElement === last) {
event.preventDefault()
first.focus()
}
}
function restoreFocus() {
const target = previousFocus
previousFocus = null
if (target?.isConnected) target.focus()
}
function handleEscape(event: KeyboardEvent) { function handleEscape(event: KeyboardEvent) {
if (props.open && event.key === "Escape") close() if (props.open && event.key === "Escape") close()
} }
@ -169,7 +125,7 @@ function clamp(value: number, min: number, max: number) {
@pointercancel="backdropClose.pointerCancel" @pointercancel="backdropClose.pointerCancel"
@wheel.prevent="zoomFromWheel" @wheel.prevent="zoomFromWheel"
> >
<section ref="dialogRef" class="image-viewer-card" data-overlay-root="imageViewer" tabindex="-1" @keydown="trapFocus"> <section class="image-viewer-card" data-overlay-root="imageViewer">
<header> <header>
<div> <div>
<span>图片预览</span> <span>图片预览</span>

查看文件

@ -173,7 +173,7 @@ async function runBatch(action:"select"|"unselect"|"archive"|"delete"|"permanent
<section class="gallery-toolbar" aria-label="图库筛选"> <section class="gallery-toolbar" aria-label="图库筛选">
<label class="gallery-search"> <label class="gallery-search">
<span aria-hidden="true">⌕</span> <span aria-hidden="true">⌕</span>
<input id="gallery-search" v-model="query" type="search" aria-label="Search gallery" placeholder="搜索标题、提示词、模型或来源" /> <input v-model="query" type="search" placeholder="搜索标题、提示词、模型或来源" />
</label> </label>
<div class="gallery-filter-tabs" role="group" aria-label="图片状态"> <div class="gallery-filter-tabs" role="group" aria-label="图片状态">
<button <button
@ -211,7 +211,7 @@ async function runBatch(action:"select"|"unselect"|"archive"|"delete"|"permanent
</div> </div>
</section> </section>
<section class="gallery-batchbar" aria-label="Gallery batch actions"><label><input type="checkbox" aria-label="Select all visible images" :checked="filteredImages.length>0&&filteredImages.filter(image=>!isSample(image)).every(image=>checkedIds.includes(image.image_id))" @change="toggleAllVisible"><span>已选 {{checkedIds.length}} 张</span></label><div class="gallery-batch-actions"><span v-if="actionMessage" aria-live="polite">{{actionMessage}}</span><button :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('select')">标记选中</button><button :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('unselect')">取消选中</button><button :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('archive')">归档</button><button class="danger" :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('delete')">安全删除</button><button class="danger" :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('permanent')">永久删除</button></div></section> <section class="gallery-batchbar"><label><input type="checkbox" :checked="filteredImages.length>0&&filteredImages.filter(image=>!isSample(image)).every(image=>checkedIds.includes(image.image_id))" @change="toggleAllVisible"><span>已选 {{checkedIds.length}} 张</span></label><div><span v-if="actionMessage">{{actionMessage}}</span><button :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('select')">标记选中</button><button :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('unselect')">取消选中</button><button :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('archive')">归档</button><button class="danger" :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('delete')">安全删除</button><button class="danger" :disabled="!checkedIds.length||actionBusy||!backendConnected" @click="runBatch('permanent')">永久删除</button></div></section>
<section class="gallery-workspace"> <section class="gallery-workspace">
<div class="gallery-results"> <div class="gallery-results">
@ -237,7 +237,7 @@ async function runBatch(action:"select"|"unselect"|"archive"|"delete"|"permanent
:key="image.image_id" :key="image.image_id"
:class="['gallery-card', { active: selectedImage?.image_id === image.image_id, archived: isArchived(image) }]" :class="['gallery-card', { active: selectedImage?.image_id === image.image_id, archived: isArchived(image) }]"
> >
<label v-if="!isSample(image)" class="gallery-card-check"><input type="checkbox" :aria-label="`Select ${image.title}`" :checked="checkedIds.includes(image.image_id)" @change="toggleChecked(image.image_id)"><span></span></label> <label v-if="!isSample(image)" class="gallery-card-check"><input type="checkbox" :checked="checkedIds.includes(image.image_id)" @change="toggleChecked(image.image_id)"><span></span></label>
<button <button
type="button" type="button"
class="gallery-card-media" class="gallery-card-media"
@ -964,280 +964,4 @@ async function runBatch(action:"select"|"unselect"|"archive"|"delete"|"permanent
min-height: 30px; min-height: 30px;
} }
} }
.gallery-page {
gap: 18px;
}
.gallery-hero,
.gallery-toolbar,
.gallery-results,
.gallery-inspector,
.gallery-load-notice,
.gallery-metrics article {
border-radius: 10px;
box-shadow: 0 8px 24px color-mix(in srgb, var(--bg) 18%, transparent);
}
.gallery-hero {
align-items: flex-start;
padding: 24px;
background:
linear-gradient(120deg, color-mix(in srgb, var(--primary-soft) 72%, var(--panel)), var(--panel) 62%);
}
.gallery-hero h2 {
font-size: clamp(24px, 2.2vw, 30px);
letter-spacing: -0.025em;
text-wrap: balance;
}
.gallery-hero p {
max-width: 62ch;
}
.gallery-toolbar {
gap: 14px;
padding: 12px;
}
.gallery-search,
.gallery-filter-tabs button,
.gallery-view-switch button,
.gallery-hero-actions button,
.gallery-card-actions button,
.gallery-inspector-actions button,
.gallery-empty button {
min-height: 38px;
}
.gallery-search input:focus-visible,
.gallery-filter-tabs button:focus-visible,
.gallery-view-switch button:focus-visible,
.gallery-hero-actions button:focus-visible,
.gallery-card-actions button:focus-visible,
.gallery-inspector-actions button:focus-visible,
.gallery-empty button:focus-visible,
.gallery-batchbar button:focus-visible,
.gallery-card:focus-visible,
.gallery-inspector-media:focus-visible {
outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
outline-offset: 2px;
}
.gallery-metrics {
gap: 14px;
}
.gallery-metrics article {
gap: 8px;
padding: 16px;
}
.gallery-metrics strong {
font-variant-numeric: tabular-nums;
}
.gallery-results {
padding: 16px;
}
.gallery-results-header {
align-items: flex-start;
margin-bottom: 14px;
}
.gallery-results-header h3,
.gallery-inspector h3 {
font-size: 18px;
letter-spacing: -0.015em;
}
.gallery-grid {
gap: 14px;
}
.gallery-card {
border-radius: 10px;
background: var(--panel-muted);
transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.gallery-card:hover,
.gallery-card:focus-within {
border-color: color-mix(in srgb, var(--primary) 44%, var(--border));
background: color-mix(in srgb, var(--primary-soft) 22%, var(--panel-muted));
transform: translateY(-1px);
}
.gallery-card-media {
border-radius: 7px;
}
.gallery-empty {
min-height: 300px;
border-radius: 10px;
}
.gallery-skeleton-grid span {
border-radius: 10px;
}
@media (prefers-reduced-motion: reduce) {
.gallery-card,
.gallery-skeleton-grid span {
animation: none;
transition: none;
}
}
.gallery-page {
gap: 16px;
}
.gallery-hero,
.gallery-toolbar,
.gallery-results,
.gallery-inspector,
.gallery-load-notice,
.gallery-metrics article,
.gallery-batchbar {
border-radius: 10px;
box-shadow: none;
}
.gallery-hero {
align-items: flex-start;
padding: 22px 24px;
background: var(--panel);
}
.gallery-hero h2 {
font-size: clamp(24px, 2.2vw, 30px);
letter-spacing: -0.025em;
text-wrap: balance;
}
.gallery-hero p {
max-width: 62ch;
}
.gallery-toolbar {
gap: 12px;
padding: 10px 12px;
}
.gallery-search,
.gallery-filter-tabs button,
.gallery-view-switch button,
.gallery-hero-actions button,
.gallery-card-actions button,
.gallery-inspector-actions button,
.gallery-empty button,
.gallery-batchbar button {
min-height: 38px;
}
.gallery-search input:focus-visible,
.gallery-filter-tabs button:focus-visible,
.gallery-view-switch button:focus-visible,
.gallery-hero-actions button:focus-visible,
.gallery-card-actions button:focus-visible,
.gallery-inspector-actions button:focus-visible,
.gallery-empty button:focus-visible,
.gallery-batchbar button:focus-visible,
.gallery-card-check input:focus-visible,
.gallery-card-media:focus-visible,
.gallery-card-copy:focus-visible,
.gallery-inspector-media:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
}
.gallery-metrics {
gap: 12px;
}
.gallery-metrics article {
gap: 8px;
padding: 14px 16px;
}
.gallery-metrics strong {
font-variant-numeric: tabular-nums;
}
.gallery-batchbar {
align-items: center;
flex-wrap: wrap;
}
.gallery-batch-actions {
min-width: 0;
flex-wrap: wrap;
justify-content: flex-end;
}
.gallery-batch-actions span {
white-space: nowrap;
}
.gallery-results {
padding: 16px;
}
.gallery-results-header {
align-items: flex-start;
margin-bottom: 14px;
}
.gallery-results-header h3,
.gallery-inspector h3 {
font-size: 18px;
letter-spacing: -0.015em;
text-wrap: balance;
}
.gallery-grid {
gap: 12px;
}
.gallery-card {
border-radius: 10px;
background: var(--panel-muted);
transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.gallery-card:hover,
.gallery-card:focus-within {
border-color: color-mix(in srgb, var(--primary) 44%, var(--border));
background: color-mix(in srgb, var(--primary-soft) 22%, var(--panel-muted));
transform: translateY(-1px);
}
.gallery-card-media {
border-radius: 7px;
}
.gallery-empty {
min-height: 300px;
border-radius: 10px;
}
.gallery-skeleton-grid span {
border-radius: 10px;
}
@media (max-width: 760px) {
.gallery-batch-actions {
justify-content: flex-start;
}
}
@media (prefers-reduced-motion: reduce) {
.gallery-card,
.gallery-skeleton-grid span {
animation: none;
transition: none;
}
}
</style> </style>

查看文件

@ -391,7 +391,7 @@ function forwardWardrobeAdd(materialId: string, wardrobeCategory: string) {
} }
.profile-detail.sealed { .profile-detail.sealed {
border-color: color-mix(in srgb, var(--accent) 58%, var(--border)); box-shadow: inset 0 3px 0 var(--accent);
} }
.detail-heading, .detail-heading,
@ -813,7 +813,7 @@ button.danger-button {
} }
.target-selector button.active { .target-selector button.active {
border-color: color-mix(in srgb, var(--accent) 48%, var(--border)); box-shadow: inset 3px 0 0 var(--accent);
} }
.target-thumb { .target-thumb {

查看文件

@ -272,19 +272,19 @@ watch(
padding: 10px; padding: 10px;
text-align: left; text-align: left;
background: transparent; background: transparent;
border-color: var(--border); box-shadow: inset 3px 0 0 var(--border);
} }
.profile-list-item.kind-ungenerated { .profile-list-item.kind-ungenerated {
border-color: color-mix(in srgb, var(--neutral, #7b8494) 52%, var(--border)); box-shadow: inset 3px 0 0 var(--neutral, #7b8494);
} }
.profile-list-item.kind-quick { .profile-list-item.kind-quick {
border-color: color-mix(in srgb, var(--warn, #d5963d) 52%, var(--border)); box-shadow: inset 3px 0 0 var(--warn, #d5963d);
} }
.profile-list-item.kind-profile_card { .profile-list-item.kind-profile_card {
border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); box-shadow: inset 3px 0 0 var(--accent);
} }
.profile-list-item:hover { .profile-list-item:hover {

查看文件

@ -44,5 +44,5 @@ const adultUserCount = computed(() => ids("adult_user_allowlist").length)
</template> </template>
<style scoped> <style scoped>
.chat-access{display:grid;gap:14px}.intro{display:grid;gap:5px;border:1px solid var(--border);border-radius:10px;padding:15px;background:linear-gradient(105deg,var(--primary-soft),var(--panel-muted))}.intro span{color:var(--text-soft);font-size:11px;font-weight:800}.intro p,.rules p{margin:0;color:var(--text-soft);line-height:1.5}.rules,.lists{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.rules article{display:grid;gap:6px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.rules b{color:var(--text-soft);font-size:11px}.rules strong{color:var(--primary)}.lists label{display:grid;gap:7px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.lists label>span{display:flex;justify-content:space-between;font-weight:750}.lists em{border-radius:5px;padding:2px 6px;color:var(--primary);background:var(--primary-soft);font-size:11px;font-style:normal}.lists textarea{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:10px;color:var(--text);background:var(--panel);font:inherit;line-height:1.55;resize:vertical}.lists small{color:var(--text-soft)}.adult-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid color-mix(in srgb,#d39b35 48%,var(--border));border-radius:7px;padding:12px;background:color-mix(in srgb,#e1a53a 10%,var(--panel))}.adult-intro>div{display:grid;gap:3px}.adult-intro span{color:#9a6818;font-size:11px;font-weight:800}.adult-intro p{max-width:58%;margin:0;color:var(--text-soft);font-size:12px;line-height:1.5}.adult-lists label{border-color:color-mix(in srgb,#e1a53a 35%,var(--border))}.limits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.limits label{display:grid;gap:6px}.limits input[type=number]{min-height:40px;border:1px solid var(--border);border-radius:7px;padding:0 10px;color:var(--text);background:var(--panel);font:inherit}.limits .check{display:flex;align-items:center;gap:8px}@media(max-width:760px){.rules,.lists,.limits{grid-template-columns:1fr}.adult-intro{align-items:flex-start;flex-direction:column}.adult-intro p{max-width:none}} .chat-access{display:grid;gap:14px}.intro{display:grid;gap:5px;border:1px solid var(--border);border-radius:10px;padding:15px;background:linear-gradient(105deg,var(--primary-soft),var(--panel-muted))}.intro span{color:var(--text-soft);font-size:11px;font-weight:800}.intro p,.rules p{margin:0;color:var(--text-soft);line-height:1.5}.rules,.lists{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.rules article{display:grid;gap:6px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.rules b{color:var(--text-soft);font-size:11px}.rules strong{color:var(--primary)}.lists label{display:grid;gap:7px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.lists label>span{display:flex;justify-content:space-between;font-weight:750}.lists em{border-radius:5px;padding:2px 6px;color:var(--primary);background:var(--primary-soft);font-size:11px;font-style:normal}.lists textarea{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:10px;color:var(--text);background:var(--panel);font:inherit;line-height:1.55;resize:vertical}.lists small{color:var(--text-soft)}.adult-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;border-left:3px solid #d39b35;border-radius:7px;padding:12px;background:color-mix(in srgb,#e1a53a 10%,var(--panel))}.adult-intro>div{display:grid;gap:3px}.adult-intro span{color:#9a6818;font-size:11px;font-weight:800}.adult-intro p{max-width:58%;margin:0;color:var(--text-soft);font-size:12px;line-height:1.5}.adult-lists label{border-color:color-mix(in srgb,#e1a53a 35%,var(--border))}.limits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.limits label{display:grid;gap:6px}.limits input[type=number]{min-height:40px;border:1px solid var(--border);border-radius:7px;padding:0 10px;color:var(--text);background:var(--panel);font:inherit}.limits .check{display:flex;align-items:center;gap:8px}@media(max-width:760px){.rules,.lists,.limits{grid-template-columns:1fr}.adult-intro{align-items:flex-start;flex-direction:column}.adult-intro p{max-width:none}}
</style> </style>

查看文件

@ -206,5 +206,5 @@ onMounted(async () => {
</template> </template>
<style scoped> <style scoped>
.assignments{display:grid;gap:14px}.assignments>header{border:1px solid var(--border);border-radius:10px;padding:15px;background:linear-gradient(105deg,var(--primary-soft),var(--panel-muted))}.assignments header>div{display:grid;gap:4px}.assignments header span{color:var(--text-soft);font-size:11px;font-weight:800}.assignments header p,.grid p{margin:0;color:var(--text-soft);line-height:1.5}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.grid article{display:grid;gap:9px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.card-head{display:flex;justify-content:space-between}.card-head span,.card-head em{border-radius:5px;padding:3px 7px;font-size:10px;font-style:normal}.card-head span.image{color:#7757e8;background:var(--primary-soft)}.card-head span.vision{color:#25845a;background:color-mix(in srgb,#39aa72 13%,var(--panel))}.card-head span.text{color:#a06a12;background:color-mix(in srgb,#e1a53a 15%,var(--panel))}.card-head em{color:var(--text-soft);background:var(--panel)}.card-head em.active{color:#25845a}.recommendation{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:8px;border:1px solid color-mix(in srgb,var(--primary) 48%,var(--border));border-radius:4px;padding:8px 10px;background:color-mix(in srgb,var(--primary-soft) 55%,var(--panel))}.recommendation b{white-space:nowrap;color:var(--primary);font-size:11px}.recommendation span{color:var(--text-soft);font-size:12px;line-height:1.55}.route-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.grid label{display:grid;gap:5px;min-width:0}.grid label>span,.grid article>small{color:var(--text-soft);font-size:11px}.grid label>span b{display:inline-grid;place-items:center;width:17px;height:17px;margin-right:4px;border-radius:50%;color:#fff;background:var(--primary);font-size:9px}.grid select{width:100%;min-height:39px;border:1px solid var(--border);border-radius:7px;padding:0 34px 0 10px;color:var(--text);background:var(--panel);font:inherit;cursor:pointer}.grid select:disabled{cursor:not-allowed;opacity:.65}.route-note{font-size:11px!important}.review-group{grid-column:1/-1}.review-routes{display:grid;gap:10px}.review-route-row{border:1px solid var(--border);border-radius:8px;padding:10px;background:var(--panel)}.review-select{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:7px}.review-select button{width:39px;border:1px solid var(--border);border-radius:7px;color:#c45151;background:var(--panel);font-size:20px}.add-review{justify-self:start;border:1px dashed var(--primary);border-radius:7px;padding:8px 13px;color:var(--primary);background:var(--panel);cursor:pointer}@media(max-width:900px){.route-pair,.review-select{grid-template-columns:1fr}.review-select button{width:100%}}@media(max-width:760px){.grid{grid-template-columns:1fr}.recommendation{grid-template-columns:1fr}} .assignments{display:grid;gap:14px}.assignments>header{border:1px solid var(--border);border-radius:10px;padding:15px;background:linear-gradient(105deg,var(--primary-soft),var(--panel-muted))}.assignments header>div{display:grid;gap:4px}.assignments header span{color:var(--text-soft);font-size:11px;font-weight:800}.assignments header p,.grid p{margin:0;color:var(--text-soft);line-height:1.5}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.grid article{display:grid;gap:9px;border:1px solid var(--border);border-radius:10px;padding:14px;background:var(--panel-muted)}.card-head{display:flex;justify-content:space-between}.card-head span,.card-head em{border-radius:5px;padding:3px 7px;font-size:10px;font-style:normal}.card-head span.image{color:#7757e8;background:var(--primary-soft)}.card-head span.vision{color:#25845a;background:color-mix(in srgb,#39aa72 13%,var(--panel))}.card-head span.text{color:#a06a12;background:color-mix(in srgb,#e1a53a 15%,var(--panel))}.card-head em{color:var(--text-soft);background:var(--panel)}.card-head em.active{color:#25845a}.recommendation{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:8px;border-left:3px solid var(--primary);border-radius:4px;padding:8px 10px;background:color-mix(in srgb,var(--primary-soft) 55%,var(--panel))}.recommendation b{white-space:nowrap;color:var(--primary);font-size:11px}.recommendation span{color:var(--text-soft);font-size:12px;line-height:1.55}.route-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.grid label{display:grid;gap:5px;min-width:0}.grid label>span,.grid article>small{color:var(--text-soft);font-size:11px}.grid label>span b{display:inline-grid;place-items:center;width:17px;height:17px;margin-right:4px;border-radius:50%;color:#fff;background:var(--primary);font-size:9px}.grid select{width:100%;min-height:39px;border:1px solid var(--border);border-radius:7px;padding:0 34px 0 10px;color:var(--text);background:var(--panel);font:inherit;cursor:pointer}.grid select:disabled{cursor:not-allowed;opacity:.65}.route-note{font-size:11px!important}.review-group{grid-column:1/-1}.review-routes{display:grid;gap:10px}.review-route-row{border:1px solid var(--border);border-radius:8px;padding:10px;background:var(--panel)}.review-select{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:7px}.review-select button{width:39px;border:1px solid var(--border);border-radius:7px;color:#c45151;background:var(--panel);font-size:20px}.add-review{justify-self:start;border:1px dashed var(--primary);border-radius:7px;padding:8px 13px;color:var(--primary);background:var(--panel);cursor:pointer}@media(max-width:900px){.route-pair,.review-select{grid-template-columns:1fr}.review-select button{width:100%}}@media(max-width:760px){.grid{grid-template-columns:1fr}.recommendation{grid-template-columns:1fr}}
</style> </style>

查看文件

@ -53,6 +53,6 @@ onMounted(async()=>{try{runtimeModels.value=(await getJson<{items:RuntimeModel[]
</template> </template>
<style scoped> <style scoped>
.governance{display:grid;gap:13px}.intro,.card{border:1px solid var(--border);border-radius:10px;background:var(--panel-muted)}.intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;background:linear-gradient(105deg,var(--primary-soft),var(--panel-muted))}.intro>div:first-child,.card header>div{display:grid;gap:4px}.intro span,.card header span,.entries>span{color:var(--text-soft);font-size:11px;font-weight:800}.intro p,.card p,.grid small{margin:0;color:var(--text-soft);font-size:12px;line-height:1.5}.flow{display:flex;align-items:center;gap:6px;white-space:nowrap}.flow b{border-radius:6px;padding:6px 8px;color:var(--primary);background:var(--panel)}.flow i{color:var(--text-soft);font-style:normal}.card{display:grid;gap:14px;padding:15px}.card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.grid label,.route-pair label{display:grid;gap:6px}.grid label>span,.route-pair label>span,.retention span{font-size:12px;font-weight:750}.source-pair{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.source-pair label>span b{display:inline-grid;place-items:center;width:18px;height:18px;margin-right:4px;border-radius:50%;color:#fff;background:var(--primary);font-size:10px}.vision-note{color:var(--text-soft);font-size:11px}select,input{width:100%;min-height:40px;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:0 10px;color:var(--text);background:var(--panel)}.switch input{position:absolute;opacity:0;pointer-events:none}.switch span{position:relative;display:block;width:44px;height:25px;border-radius:99px;background:var(--border);cursor:pointer}.switch span:after{position:absolute;top:3px;left:3px;width:19px;height:19px;border-radius:50%;background:#fff;content:"";transition:.18s}.switch input:checked+span{background:var(--primary)}.switch input:checked+span:after{transform:translateX(19px)}.entries{display:flex;align-items:center;flex-wrap:wrap;gap:10px;border-top:1px solid var(--border);padding-top:12px}.entries label{display:flex;align-items:center;gap:5px;font-size:12px}.entries input{width:auto;min-height:auto}.route-pair{display:grid;grid-template-columns:1fr 36px 1fr;align-items:end;gap:8px}.arrow{display:grid;place-items:center;min-height:40px;color:var(--primary);font-size:20px}.routing{border-color:color-mix(in srgb,var(--primary) 35%,var(--border))}.policy{display:grid;gap:6px;border:1px solid color-mix(in srgb,#d39b35 48%,var(--border));border-radius:6px;padding:11px 12px;background:color-mix(in srgb,#e1a53a 10%,var(--panel))}.policy b{color:#9a6818}.policy span{color:var(--text-soft);font-size:12px;line-height:1.45}.retention{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.retention label{display:grid;grid-template-columns:1fr 72px auto;align-items:center;gap:7px}.retention small{color:var(--text-soft)}@media(max-width:800px){.intro{align-items:flex-start;flex-direction:column}.flow{flex-wrap:wrap}.grid,.route-pair,.retention{grid-template-columns:1fr}.arrow{transform:rotate(90deg)}} .governance{display:grid;gap:13px}.intro,.card{border:1px solid var(--border);border-radius:10px;background:var(--panel-muted)}.intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px;background:linear-gradient(105deg,var(--primary-soft),var(--panel-muted))}.intro>div:first-child,.card header>div{display:grid;gap:4px}.intro span,.card header span,.entries>span{color:var(--text-soft);font-size:11px;font-weight:800}.intro p,.card p,.grid small{margin:0;color:var(--text-soft);font-size:12px;line-height:1.5}.flow{display:flex;align-items:center;gap:6px;white-space:nowrap}.flow b{border-radius:6px;padding:6px 8px;color:var(--primary);background:var(--panel)}.flow i{color:var(--text-soft);font-style:normal}.card{display:grid;gap:14px;padding:15px}.card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.grid label,.route-pair label{display:grid;gap:6px}.grid label>span,.route-pair label>span,.retention span{font-size:12px;font-weight:750}.source-pair{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.source-pair label>span b{display:inline-grid;place-items:center;width:18px;height:18px;margin-right:4px;border-radius:50%;color:#fff;background:var(--primary);font-size:10px}.vision-note{color:var(--text-soft);font-size:11px}select,input{width:100%;min-height:40px;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:0 10px;color:var(--text);background:var(--panel)}.switch input{position:absolute;opacity:0;pointer-events:none}.switch span{position:relative;display:block;width:44px;height:25px;border-radius:99px;background:var(--border);cursor:pointer}.switch span:after{position:absolute;top:3px;left:3px;width:19px;height:19px;border-radius:50%;background:#fff;content:"";transition:.18s}.switch input:checked+span{background:var(--primary)}.switch input:checked+span:after{transform:translateX(19px)}.entries{display:flex;align-items:center;flex-wrap:wrap;gap:10px;border-top:1px solid var(--border);padding-top:12px}.entries label{display:flex;align-items:center;gap:5px;font-size:12px}.entries input{width:auto;min-height:auto}.route-pair{display:grid;grid-template-columns:1fr 36px 1fr;align-items:end;gap:8px}.arrow{display:grid;place-items:center;min-height:40px;color:var(--primary);font-size:20px}.routing{border-color:color-mix(in srgb,var(--primary) 35%,var(--border))}.policy{display:grid;gap:6px;border-left:3px solid #d39b35;border-radius:6px;padding:11px 12px;background:color-mix(in srgb,#e1a53a 10%,var(--panel))}.policy b{color:#9a6818}.policy span{color:var(--text-soft);font-size:12px;line-height:1.45}.retention{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.retention label{display:grid;grid-template-columns:1fr 72px auto;align-items:center;gap:7px}.retention small{color:var(--text-soft)}@media(max-width:800px){.intro{align-items:flex-start;flex-direction:column}.flow{flex-wrap:wrap}.grid,.route-pair,.retention{grid-template-columns:1fr}.arrow{transform:rotate(90deg)}}
.preview-card{display:grid;gap:10px;border:1px solid var(--border);border-radius:10px;padding:15px;background:var(--panel-muted)}.preview-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.preview-card>header>div{display:grid;gap:3px}.preview-card>header span{color:var(--text-soft);font-size:11px;font-weight:800}.preview-card button{min-height:36px;border:1px solid var(--primary);border-radius:7px;padding:0 11px;color:#fff;background:var(--primary);cursor:pointer}.preview-card button:disabled{opacity:.5}.preview-card textarea{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:9px;color:var(--text);background:var(--panel);font:inherit;resize:vertical}.preview-choice{display:flex;flex-wrap:wrap;gap:10px}.preview-choice label{display:flex;align-items:center;gap:5px;font-size:12px}.preview-result{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;border-top:1px solid var(--border);padding-top:10px}.preview-result>span{display:grid;gap:3px;border-radius:6px;padding:8px;background:var(--panel)}.preview-result>span b{color:var(--text-soft);font-size:10px}.preview-result>p,.preview-result>details{grid-column:1/-1}.preview-result>p{margin:0;border-radius:6px;padding:9px;background:var(--panel);font-size:12px;line-height:1.5}.preview-result pre{max-height:260px;overflow:auto;border-radius:6px;padding:8px;background:var(--panel);font-size:10px;white-space:pre-wrap}.preview-error{color:var(--danger)!important} .preview-card{display:grid;gap:10px;border:1px solid var(--border);border-radius:10px;padding:15px;background:var(--panel-muted)}.preview-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.preview-card>header>div{display:grid;gap:3px}.preview-card>header span{color:var(--text-soft);font-size:11px;font-weight:800}.preview-card button{min-height:36px;border:1px solid var(--primary);border-radius:7px;padding:0 11px;color:#fff;background:var(--primary);cursor:pointer}.preview-card button:disabled{opacity:.5}.preview-card textarea{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:7px;padding:9px;color:var(--text);background:var(--panel);font:inherit;resize:vertical}.preview-choice{display:flex;flex-wrap:wrap;gap:10px}.preview-choice label{display:flex;align-items:center;gap:5px;font-size:12px}.preview-result{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;border-top:1px solid var(--border);padding-top:10px}.preview-result>span{display:grid;gap:3px;border-radius:6px;padding:8px;background:var(--panel)}.preview-result>span b{color:var(--text-soft);font-size:10px}.preview-result>p,.preview-result>details{grid-column:1/-1}.preview-result>p{margin:0;border-radius:6px;padding:9px;background:var(--panel);font-size:12px;line-height:1.5}.preview-result pre{max-height:260px;overflow:auto;border-radius:6px;padding:8px;background:var(--panel);font-size:10px;white-space:pre-wrap}.preview-error{color:var(--danger)!important}
</style> </style>

文件差异因一行或多行过长而隐藏

查看文件

@ -243,7 +243,7 @@ function shortValue(value: string) {
} }
.workflow-branch-strip > button.current { .workflow-branch-strip > button.current {
box-shadow: none; box-shadow: inset 3px 0 0 var(--primary);
} }
.workflow-branch-strip > button:disabled:not(.current) { .workflow-branch-strip > button:disabled:not(.current) {

查看文件

@ -1,24 +0,0 @@
:root {
--ui-space-1: 4px;
--ui-space-2: 8px;
--ui-space-3: 12px;
--ui-space-4: 16px;
--ui-space-5: 20px;
--ui-space-6: 24px;
--ui-radius-sm: 6px;
--ui-radius-md: 8px;
--ui-radius-lg: 10px;
--ui-border-subtle: color-mix(in srgb, currentColor 14%, transparent);
--ui-focus-ring: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent);
--ui-shadow-soft: 0 8px 20px color-mix(in srgb, var(--bg) 22%, transparent);
--ui-duration-fast: 140ms;
--ui-duration-normal: 180ms;
--ui-ease-standard: cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
:root {
--ui-duration-fast: 0ms;
--ui-duration-normal: 0ms;
}
}

查看文件

@ -1,457 +0,0 @@
.navigation-shell {
--workbench-pad: 20px;
background: var(--bg);
background-image: none;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.navigation-shell button,
.navigation-shell input,
.navigation-shell select,
.navigation-shell textarea {
border-radius: var(--ui-radius-md);
}
.navigation-shell button:focus-visible,
.navigation-shell input:focus-visible,
.navigation-shell select:focus-visible,
.navigation-shell textarea:focus-visible,
.navigation-shell [tabindex]:focus-visible {
outline: none;
box-shadow: var(--ui-focus-ring);
}
.navigation-shell button:hover:not(:disabled),
.navigation-shell button:focus-visible:not(:disabled) {
border-color: color-mix(in srgb, var(--primary) 46%, var(--border));
}
.rail {
background: var(--bg-soft);
backdrop-filter: none;
}
.brand-mark {
border-radius: var(--ui-radius-md);
box-shadow: none;
}
.topbar {
background: var(--panel);
backdrop-filter: none;
border-bottom-color: var(--border);
}
.navigation-shell[data-theme="light"] .topbar {
background: var(--panel);
}
.panel,
.overview-strip,
.detail-hero,
.generate-hero,
.materials-hero,
.signal-card,
.metric-card,
.queue-board-panel,
.queue-detail-panel,
.materials-library-panel,
.materials-action-card,
.materials-category-chip,
.state-card,
.empty-state,
.quick-profile-profile-card,
.quick-profile-image-panel,
.quick-profile-command-panel,
.quick-profile-library,
.quick-profile-material-panel,
.workflow-panel,
.workflow-detail-panel,
.workflow-preview-panel,
.settings-section,
.logs-panel {
border-radius: var(--ui-radius-lg);
box-shadow: none;
}
.panel,
.overview-strip,
.detail-hero,
.generate-hero,
.materials-hero,
.queue-board-panel,
.queue-detail-panel,
.materials-library-panel,
.quick-profile-profile-card,
.quick-profile-image-panel,
.quick-profile-command-panel,
.quick-profile-library,
.quick-profile-material-panel,
.workflow-panel,
.workflow-detail-panel,
.workflow-preview-panel,
.settings-section,
.logs-panel {
background: var(--panel);
}
.signal-card::before,
.metric-card::before,
.queue-action-card::before,
.workflow-draft-grid > article.final::before {
display: none;
}
.signal-card.good,
.metric-card.good,
.signal-card.warn,
.metric-card.warn,
.signal-card.bad,
.metric-card.bad,
.signal-card.idle,
.metric-card.idle {
border-color: var(--border);
background: var(--panel);
}
.signal-card.good,
.metric-card.good { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); }
.signal-card.warn,
.metric-card.warn { border-color: color-mix(in srgb, var(--warn) 52%, var(--border)); }
.signal-card.bad,
.metric-card.bad { border-color: color-mix(in srgb, var(--danger) 52%, var(--border)); }
.panel header,
.overview-strip > header,
.generate-hero > header,
.materials-hero > header,
.queue-board-panel > header,
.materials-library-panel > header {
gap: var(--ui-space-3);
}
.navigation-shell h1,
.navigation-shell h2,
.navigation-shell h3,
.navigation-shell strong {
text-wrap: balance;
}
.navigation-shell p,
.navigation-shell dd,
.navigation-shell .panel-copy,
.navigation-shell .empty-state span {
text-wrap: pretty;
}
.navigation-shell input,
.navigation-shell select,
.navigation-shell textarea {
min-height: 38px;
border-color: var(--border);
background: var(--panel);
}
.navigation-shell input::placeholder,
.navigation-shell textarea::placeholder {
color: var(--text-soft);
opacity: 0.9;
}
.navigation-shell .primary-button,
.navigation-shell button.primary,
.navigation-shell .quick-create {
box-shadow: none;
}
.navigation-shell .state-card,
.navigation-shell .empty-state {
border-color: var(--border);
}
.navigation-shell .state-card.good,
.navigation-shell .state-card.warn,
.navigation-shell .state-card.bad,
.navigation-shell .state-card.info {
background: var(--panel);
}
@media (max-width: 1180px) {
.navigation-shell {
--workbench-pad: 16px;
}
.topbar {
gap: 10px;
}
}
@media (max-width: 900px) {
.navigation-shell {
--workbench-pad: 12px;
}
.topbar {
padding-top: 14px;
padding-bottom: 14px;
}
}
@media (prefers-reduced-motion: reduce) {
.navigation-shell *,
.navigation-shell *::before,
.navigation-shell *::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
transition-duration: 0.001ms !important;
}
}
.generate-page,
.profiles-page,
.materials-page,
.settings-page,
.logs-page,
.performance-detail-page,
.queue-page,
.workflow-workspace,
.quick-profile-workspace {
gap: var(--ui-space-4);
}
.generate-hero,
.queue-hero,
.profiles-workspace,
.materials-workbench,
.settings-page > .hero,
.logs-hero,
.performance-detail-page > header {
border: 1px solid var(--border);
background: var(--panel);
}
.generate-mode-actions,
.materials-view-tabs,
.materials-filter-strip,
.materials-subfilter-strip,
.queue-filter-tabs,
.profile-tabs,
.detail-tabs,
.logs-toolbar,
.workflow-section-header,
.workflow-round-toolbar {
border: 1px solid var(--border);
border-radius: var(--ui-radius-md);
background: var(--panel-muted);
}
.generate-mode-button,
.materials-view-tabs button,
.queue-filter-tabs button,
.profile-tabs button,
.detail-tabs button,
.workflow-round-toolbar button {
border-radius: var(--ui-radius-sm);
}
.generate-mode-button.active,
.materials-view-tabs button.active,
.queue-filter-tabs button.active,
.profile-tabs button.active,
.detail-tabs button.active {
border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
color: var(--text);
background: var(--primary-soft);
}
.image-generation-workspace,
.performance-detail-grid,
.queue-workbench,
.materials-workbench,
.profiles-workspace,
.settings-page .workspace,
.logs-workspace,
.workflow-layout {
min-width: 0;
}
.image-preview-panel,
.image-display-panel,
.image-info-card,
.performance-summary-panel,
.performance-breakdown,
.queue-board-panel,
.queue-detail-panel,
.queue-actions-panel,
.materials-library-panel,
.materials-actions-panel,
.profile-master,
.profile-detail,
.detail-content,
.settings-page section,
.logs-stream,
.workflow-preview-panel,
.workflow-detail-panel,
.workflow-candidate-pool,
.workflow-dependency-card,
.workflow-round-panel,
.workflow-material-drawer,
.workflow-composer-panel {
border-color: var(--border);
border-radius: var(--ui-radius-lg);
box-shadow: none;
}
.image-preview-panel,
.image-display-panel,
.image-info-card,
.performance-summary-panel,
.performance-breakdown,
.queue-board-panel,
.queue-detail-panel,
.queue-actions-panel,
.materials-library-panel,
.materials-actions-panel,
.profile-master,
.profile-detail,
.detail-content,
.settings-page section,
.logs-stream,
.workflow-preview-panel,
.workflow-detail-panel,
.workflow-candidate-pool,
.workflow-dependency-card,
.workflow-round-panel,
.workflow-material-drawer,
.workflow-composer-panel {
background: var(--panel);
}
.image-preview-card,
.queue-task-card,
.queue-list li,
.materials-library-card,
.materials-action-card,
.profile-list-item,
.workflow-candidate-card,
.workflow-round-card,
.workflow-group-card,
.workflow-material-bind-card,
.workflow-prompt-plan-card,
.workflow-branch-panel,
.workflow-chat-panel {
border-color: var(--border);
border-radius: var(--ui-radius-md);
background: var(--panel-muted);
box-shadow: none;
}
.image-preview-card:hover,
.image-preview-card.active,
.queue-task-card:hover,
.queue-list li:hover,
.materials-library-card:hover,
.profile-list-item:hover,
.profile-list-item.active,
.workflow-candidate-card:hover,
.workflow-round-card:hover {
border-color: color-mix(in srgb, var(--primary) 44%, var(--border));
background: color-mix(in srgb, var(--primary-soft) 20%, var(--panel-muted));
}
.image-stage,
.image-stage-empty,
.image-preview-empty,
.detail-empty,
.profile-detail-empty,
.logs-empty,
.workflow-candidate-empty,
.workflow-round-empty,
.workflow-dependency-empty {
border-radius: var(--ui-radius-md);
border-color: var(--border);
background: var(--panel-muted);
}
.image-stage-button,
.quick-create,
.quick-profile-hero-button,
.quick-profile-portrait-button,
.materials-primary-add,
.workflow-review-trigger,
.workflow-compare-trigger {
border-radius: var(--ui-radius-md);
}
.status-pill,
.queue-task-status,
.workflow-status-pill,
.profile-status-pill,
.material-status-pill {
border-radius: 999px;
}
.navigation-shell table {
border-collapse: separate;
border-spacing: 0;
overflow: hidden;
border: 1px solid var(--border);
border-radius: var(--ui-radius-md);
}
.navigation-shell th,
.navigation-shell td {
border-color: var(--border);
}
.navigation-shell :is(.dialog, .drawer, [class*="-dialog"], [class*="-drawer"]) {
border-radius: var(--ui-radius-lg);
box-shadow: none;
}
.navigation-shell :is(.dialog, .drawer, [class*="-dialog"], [class*="-drawer"]) > header,
.navigation-shell :is(.dialog, .drawer, [class*="-dialog"], [class*="-drawer"]) > footer {
border-color: var(--border);
}
@media (max-width: 1180px) {
.image-generation-workspace,
.performance-detail-grid,
.queue-workbench,
.materials-workbench,
.profiles-workspace,
.workflow-layout {
gap: var(--ui-space-3);
}
}
@media (max-width: 1360px) and (min-width: 901px) {
.overview-strip {
grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(120px, 0.8fr)) minmax(200px, 0.9fr);
gap: 10px;
}
.overview-strip > * {
min-width: 0;
}
}
@media (max-width: 1360px) and (min-width: 901px) {
.navigation-shell .overview-strip {
grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(120px, 0.8fr)) minmax(200px, 0.9fr);
gap: 10px;
}
.navigation-shell .overview-strip > * {
min-width: 0;
}
}
@media (max-width: 1180px) {
.navigation-shell .overview-strip {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

查看文件

@ -1,59 +0,0 @@
import fs from 'node:fs'
import path from 'node:path'
import test from 'node:test'
import assert from 'node:assert/strict'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const repoRoot = path.resolve(__dirname, '..', '..')
const frontendRoot = path.join(repoRoot, 'frontend')
const standaloneRoot = path.join(frontendRoot, 'standalone-web', 'src')
const app = fs.readFileSync(path.join(standaloneRoot, 'App.vue'), 'utf8')
const navigation = fs.readFileSync(path.join(standaloneRoot, 'features', 'navigation', 'navigation-config.ts'), 'utf8')
const workbenchStyles = fs.readFileSync(path.join(standaloneRoot, 'styles', 'workbench.css'), 'utf8')
const bridge = fs.readFileSync(path.join(frontendRoot, 'shared', 'api', 'astrbot-page-bridge.ts'), 'utf8')
const views = ['overview', 'generate', 'queue', 'performance', 'gallery', 'profiles', 'materials', 'settings', 'logs']
test('UI shell keeps all supported views and landmarks', () => {
for (const view of views) assert.match(navigation, new RegExp('key: \"' + view + '\"'), 'missing nav view: ' + view)
assert.match(app, /<main\s+[\s\S]*aria-label=\"ImageStudio workbench\"/)
assert.match(app, /<section class=\"workbench\" aria-label=\"ImageStudio workspace\">/)
assert.match(app, /role=\"status\"[\s\S]*aria-live=\"polite\"/)
})
test('UI shell preserves plugin bridge and lazy page loading', () => {
assert.match(app, /defineAsyncComponent\(\(\) => import\(\"\.\/features\/gallery\/GalleryPage\.vue\"\)\)/)
assert.match(app, /defineAsyncComponent\(\(\) => import\(\"\.\/features\/settings\/SettingsPage\.vue\"\)\)/)
assert.match(app, /defineAsyncComponent\(\(\) => import\(\"\.\/features\/workflow\/WorkflowComposer\.vue\"\)\)/)
assert.match(bridge, /kind: \"ready\"/)
assert.match(bridge, /message.kind === \"context\"/)
assert.match(bridge, /apiGet/)
assert.match(bridge, /apiPost/)
})
test('UI CSS avoids layout-property animation and supports reduced motion', () => {
assert.doesNotMatch(workbenchStyles, /transition\s*:\s*[^;]*(?:width|height|max-height|grid-template-columns|padding|margin)/i)
assert.match(workbenchStyles, /@media \(max-width: 1180px\)/)
assert.match(workbenchStyles, /@media \(max-width: 900px\)/)
assert.match(workbenchStyles, /@media \(prefers-reduced-motion: reduce\)/)
assert.match(workbenchStyles, /--ui-focus-ring/)
})
test('standalone image markup provides alt text', () => {
const files = []
const visit = (dir) => {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
const fullPath = path.join(dir, entry.name)
if (entry.isDirectory()) visit(fullPath)
else if (entry.name.endsWith('.vue')) files.push(fullPath)
}
}
visit(standaloneRoot)
for (const file of files) {
const source = fs.readFileSync(file, 'utf8')
for (const tag of source.match(/<img\b[\s\S]*?>/gi) ?? []) {
assert.match(tag, /\balt\s*=/i, 'image without alt: ' + path.relative(repoRoot, file))
}
}
})

查看文件

@ -1,50 +0,0 @@
import fs from 'node:fs'
import path from 'node:path'
import test from 'node:test'
import assert from 'node:assert/strict'
import { fileURLToPath } from 'node:url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const repoRoot = path.resolve(__dirname, '..', '..')
const tokens = fs.readFileSync(path.join(repoRoot, 'frontend', 'standalone-web', 'src', 'styles', 'tokens.css'), 'utf8')
const workbench = fs.readFileSync(path.join(repoRoot, 'frontend', 'standalone-web', 'src', 'styles', 'workbench.css'), 'utf8')
const app = fs.readFileSync(path.join(repoRoot, 'frontend', 'standalone-web', 'src', 'App.vue'), 'utf8')
const requiredTokens = [
'--ui-space-1', '--ui-space-2', '--ui-space-3', '--ui-space-4', '--ui-space-5', '--ui-space-6',
'--ui-radius-sm', '--ui-radius-md', '--ui-radius-lg', '--ui-focus-ring', '--ui-duration-fast',
]
test('visual tokens remain centralized', () => {
for (const token of requiredTokens) assert.match(tokens, new RegExp(`${token}:`), `missing token ${token}`)
assert.match(workbench, /var\(--ui-radius-md\)/)
assert.match(workbench, /var\(--ui-radius-lg\)/)
assert.doesNotMatch(workbench, /#[0-9a-f]{6}\b/i)
})
test('semantic states retain readable borders', () => {
for (const state of ['good', 'warn', 'bad', 'disabled']) {
assert.match(`${workbench}\n${app}`, new RegExp(`\\.${state}`), `missing ${state} state styling`)
}
assert.match(workbench, /color-mix\(in srgb, var\(--danger\)/)
assert.match(workbench, /color-mix\(in srgb, var\(--warn\)/)
})
function luminance(hex) {
const values = hex.match(/[0-9a-f]{2}/gi).map((value) => Number.parseInt(value, 16) / 255)
const linear = values.map((value) => value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4)
return 0.2126 * linear[0] + 0.7152 * linear[1] + 0.0722 * linear[2]
}
function contrastRatio(first, second) {
const firstLuminance = luminance(first)
const secondLuminance = luminance(second)
return (Math.max(firstLuminance, secondLuminance) + 0.05) / (Math.min(firstLuminance, secondLuminance) + 0.05)
}
test('dark and light text tokens meet AA contrast targets', () => {
assert.ok(contrastRatio('#edf4fb', '#111522') >= 4.5)
assert.ok(contrastRatio('#9aa8ba', '#111522') >= 4.5)
assert.ok(contrastRatio('#18202b', '#f3f6fb') >= 4.5)
assert.ok(contrastRatio('#667085', '#f3f6fb') >= 4.5)
})

查看文件

@ -2,7 +2,7 @@ name: astrbot_plugin_imagestudio
display_name: ImageStudio display_name: ImageStudio
desc: AstrBot >=4.25 ImageStudio role asset and image-generation workspace for Windows, Linux, macOS and Docker. desc: AstrBot >=4.25 ImageStudio role asset and image-generation workspace for Windows, Linux, macOS and Docker.
short_desc: AstrBot 鍐呯殑瑙掕壊璧勪骇銆佸伐浣滄祦涓庡浘鐗囩敓鎴愮鐞嗗伐浣滃彴銆? short_desc: AstrBot 鍐呯殑瑙掕壊璧勪骇銆佸伐浣滄祦涓庡浘鐗囩敓鎴愮鐞嗗伐浣滃彴銆?
version: 1.0.66 version: 1.0.67
author: YokiiroBW author: YokiiroBW
repo: "http://192.168.31.210:18085/YokiiroBW/astrbot_plugin_imagestudio" repo: "http://192.168.31.210:18085/YokiiroBW/astrbot_plugin_imagestudio"
astrbot_version: ">=4.25.0,<5" astrbot_version: ">=4.25.0,<5"

查看文件

@ -4,8 +4,8 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AstrBot ImageStudio</title> <title>AstrBot ImageStudio</title>
<script type="module" crossorigin src="./assets/index-BZ25rUbw.js"></script> <script type="module" crossorigin src="./assets/index-BdfW6FGF.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-B8Z-z8zX.css"> <link rel="stylesheet" crossorigin href="./assets/index-iU5Ed_RF.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

查看文件

@ -24,6 +24,7 @@ from backend.services.advanced_style_set_service import (
_normalize_artist_signature, _normalize_artist_signature,
_normalize_style_deltas, _normalize_style_deltas,
_normalize_style_dimension_scores, _normalize_style_dimension_scores,
_build_style_profile_v2,
_normalize_rendering_layer_scores, _normalize_rendering_layer_scores,
_normalized_feature_evidence, _normalized_feature_evidence,
_scale_specific_style_prompt, _scale_specific_style_prompt,
@ -1769,5 +1770,35 @@ class AdvancedStyleSetWorkflowTests(unittest.TestCase):
self.assertEqual(comparison["recommendation"], "keep_previous_candidate") self.assertEqual(comparison["recommendation"], "keep_previous_candidate")
self.assertIn("fullbody", comparison["scenario_regressions"]) self.assertIn("fullbody", comparison["scenario_regressions"])
def test_style_profile_v2_separates_regions_and_scale_adapters(self) -> None:
payload = {
"normalized_asset_profile": {
"must_preserve": [
"thin tinted lavender contour lines",
"short broad rounded face with a tiny tapered chin",
"opaque creamy hair highlight shapes",
]
},
"artist_signature": [
{"dimension": "eye_design", "phrase": "layered irises with clustered white catchlights", "support_ratio": 1.0, "confidence": 0.95},
{"dimension": "shading", "phrase": "two translucent lavender cel-shadow bands", "support_ratio": 1.0, "confidence": 0.95},
],
"scale_capsules": {
"portrait": {"prompt_parts": ["preserve face width-to-length ratio", "preserve iris construction"]},
"fullbody": {"prompt_parts": ["preserve adult-appropriate anatomy and limb length"]},
"novel_scene": {"prompt_parts": ["separate character linework from background detail"]},
},
"feature_evidence": [],
}
profile = _build_style_profile_v2(payload)
self.assertEqual(profile["schema_version"], 1)
self.assertIn("eyes", profile["invariants"])
self.assertIn("shading", profile["invariants"])
self.assertEqual(set(profile["adapters"]), {"portrait", "fullbody", "novel_scene"})
prompt = _detailed_style_prompt({**payload, "style_profile_v2": profile}, "fallback")
self.assertLessEqual(len(prompt.split(", ")), 14)
self.assertIn("layered irises", prompt)
self.assertIn("face:", prompt)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()

文件差异因一行或多行过长而隐藏

文件差异因一行或多行过长而隐藏

查看文件

@ -4,8 +4,8 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AstrBot ImageStudio</title> <title>AstrBot ImageStudio</title>
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-EHiWqZav.js"></script> <script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DLzyriu-.js"></script>
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-Fxlc51Vo.css"> <link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-C0KIlCkM.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>