HEL-615: 全部页面统一为 A「片场暗房」界面
- 设置页重写进 AppShell:生成与队列 / 智能体运行 / 存储路径三段,其余设置入口链到模型设置、ComfyUI 连接、智能体;旧 ?tab= 链接跳转到对应新页 - 项目卡状态标签改为按五段真实进度显示(已完成 / 某阶段生成中·待确认 / 进行中 / 待开始) - 首页生成任务行对齐 a1(来源标签、项目名、进度条、本地时间) - 连接页:右栏默认新增表单 + 任务使用目标面板,进入页面自动实测各连接;模型页默认新增表单、自动 1-token 实测,去掉双加号 - 生图/生视频:生成参数面板标题、通栏生成按钮、成片预览、按类型的历史标题与 16:9 视频历史、顶栏连接状态胶囊,连接状态改用服务器实测 - 智能体页:五个 Agent / Skill 库 / 已装 Skill 面板标题,内置 Skill 中文名,去掉对话空态 Calliope 字样 - 侧栏底部 ComfyUI 状态修正为真实实测(原查询不响应导致一直测试中) - 统一样式来源:.a-btn/.a-panel/.a-select/.status-chip 等只在 app.css 定义一次,删除各页重复定义;新增 Switch、Button block、ProgressBar tone - 旧 Calliope 路由(/projects、/project/:id、/canvas、/library、/build-scene、/playground)重定向到 A 页面;页面标题改为影工坊 - 轮询间隔单位改为秒(7 种语言) Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { createQuery } from '@tanstack/svelte-query';
|
||||
import { toStore } from 'svelte/store';
|
||||
import LanguageSwitcher from '$lib/components/LanguageSwitcher.svelte';
|
||||
import Icon from '$lib/components/ui/Icon.svelte';
|
||||
import type { IconName } from '$lib/components/ui/icons';
|
||||
import { settings, jobsApi } from '$lib/api';
|
||||
import { settings, jobsApi, comfy } from '$lib/api';
|
||||
import { t } from '$lib/i18n.svelte';
|
||||
|
||||
/**
|
||||
@@ -81,9 +82,9 @@
|
||||
.length,
|
||||
);
|
||||
|
||||
// The ACTIVE ComfyUI connection from settings (HEL-611). The dot stays
|
||||
// neutral — a passing test is only claimed on the connections page,
|
||||
// where it comes from a real server-side probe.
|
||||
// The ACTIVE ComfyUI connection (HEL-611). Its status dot comes from a
|
||||
// real server-side probe (GET /system_stats from the workbench server,
|
||||
// §3) — green only when that probe passes.
|
||||
const activeEndpoint = $derived.by(() => {
|
||||
const s = $settingsQuery.data;
|
||||
if (!s) return null;
|
||||
@@ -100,6 +101,25 @@
|
||||
return raw;
|
||||
}
|
||||
});
|
||||
|
||||
const activeId = $derived(activeEndpoint?.id ?? null);
|
||||
const probeQuery = createQuery(
|
||||
toStore(() => ({
|
||||
queryKey: ['comfy-probe', activeId],
|
||||
queryFn: () => comfy.testEndpoint({ endpoint_id: activeId ?? undefined, timeout_sec: 5 }),
|
||||
enabled: activeId != null,
|
||||
staleTime: 60_000,
|
||||
refetchInterval: 60_000,
|
||||
retry: false,
|
||||
})),
|
||||
);
|
||||
const probeState = $derived.by<'unset' | 'testing' | 'ok' | 'fail'>(() => {
|
||||
if (!activeEndpoint) return 'unset';
|
||||
if ($probeQuery.isPending) return 'testing';
|
||||
if ($probeQuery.isError) return 'fail';
|
||||
return $probeQuery.data?.ok ? 'ok' : 'fail';
|
||||
});
|
||||
const endpointName = $derived(activeEndpoint?.name?.trim() || 'ComfyUI');
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -116,8 +136,11 @@
|
||||
<div class="shell-frame">
|
||||
<aside class="side">
|
||||
<a class="brand" href="/" title={t('shell.brandHome')}>
|
||||
<span class="brand-mark"><Icon name="film" size={17} /></span>
|
||||
<span class="brand-name">{t('shell.brand')}</span>
|
||||
<span class="brand-mark" aria-hidden="true">{t('shell.brandMark')}</span>
|
||||
<span class="brand-copy">
|
||||
<span class="brand-name">{t('shell.brand')}</span>
|
||||
<span class="brand-sub">AIGC STUDIO</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<nav class="nav" aria-label={t('shell.navAria')}>
|
||||
@@ -146,13 +169,22 @@
|
||||
</nav>
|
||||
|
||||
<div class="side-foot">
|
||||
<a class="comfy-row" href="/connections" title={t('shell.comfyManage')}>
|
||||
<span class="dot" aria-hidden="true"></span>
|
||||
<a
|
||||
class="comfy-row"
|
||||
href="/connections"
|
||||
title={probeState === 'fail'
|
||||
? ($probeQuery.data?.message ?? t('shell.comfyManage'))
|
||||
: t('shell.comfyManage')}
|
||||
>
|
||||
<span class="dot {probeState}" aria-hidden="true"></span>
|
||||
<span class="comfy-text">
|
||||
{#if comfyUrl}
|
||||
{t('shell.comfyAt', { host: comfyUrl })}
|
||||
{:else}
|
||||
{#if probeState === 'unset'}
|
||||
{t('shell.comfyUnset')}
|
||||
{:else}
|
||||
<span class="comfy-state" class:fail={probeState === 'fail'}>
|
||||
{t(`shell.comfy_${probeState}`, { name: endpointName })}
|
||||
</span>
|
||||
{#if comfyUrl}<span class="mono comfy-host">{comfyUrl}</span>{/if}
|
||||
{/if}
|
||||
</span>
|
||||
</a>
|
||||
@@ -224,21 +256,38 @@
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #e8a33d, #b96a1b);
|
||||
color: #16130a;
|
||||
background: var(--avatar-1);
|
||||
color: var(--accent-contrast);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.brand-copy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.brand-name {
|
||||
font-size: 15.5px;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.02em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.brand-sub {
|
||||
font-family: var(--font-a-mono);
|
||||
font-size: 9.5px;
|
||||
letter-spacing: 0.14em;
|
||||
color: var(--text-3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -335,21 +384,52 @@
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* Neutral until a real server-side probe says otherwise — the
|
||||
connections page (a6) owns the tested/failed states (HEL-611). */
|
||||
/* §5 连接状态点: green = probe passed, amber breathing = testing,
|
||||
red = failed, gray = no connection configured. */
|
||||
.dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--text-3);
|
||||
flex-shrink: 0;
|
||||
align-self: flex-start;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.dot.ok {
|
||||
background: var(--success);
|
||||
}
|
||||
.dot.fail {
|
||||
background: var(--error);
|
||||
}
|
||||
.dot.testing {
|
||||
background: var(--accent);
|
||||
animation: shell-breathe 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
||||
}
|
||||
@keyframes shell-breathe {
|
||||
50% {
|
||||
opacity: 0.35;
|
||||
}
|
||||
}
|
||||
|
||||
.comfy-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.comfy-state,
|
||||
.comfy-host {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.comfy-state.fail {
|
||||
color: var(--error);
|
||||
}
|
||||
.comfy-host {
|
||||
font-size: 10.5px;
|
||||
color: var(--text-3);
|
||||
}
|
||||
|
||||
.lang-row :global(.lang-switcher) {
|
||||
background: var(--surface-2);
|
||||
@@ -426,7 +506,7 @@
|
||||
padding: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
.brand-name {
|
||||
.brand-copy {
|
||||
display: none;
|
||||
}
|
||||
.nav {
|
||||
|
||||
Reference in New Issue
Block a user