- 设置页重写进 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>
134 lines
2.5 KiB
Svelte
134 lines
2.5 KiB
Svelte
<script lang="ts">
|
|
interface Props {
|
|
value?: number;
|
|
indeterminate?: boolean;
|
|
label?: string;
|
|
size?: 'sm' | 'md';
|
|
/** §5 进度条: running = amber, done = green, failed = red (static). */
|
|
tone?: 'accent' | 'success' | 'error';
|
|
/** Track only — no label / percentage row. */
|
|
bare?: boolean;
|
|
}
|
|
|
|
let {
|
|
value = 0,
|
|
indeterminate = false,
|
|
label,
|
|
size = 'md',
|
|
tone = 'accent',
|
|
bare = false,
|
|
}: Props = $props();
|
|
|
|
const pct = $derived(Math.round(Math.min(100, Math.max(0, value))));
|
|
const showMeta = $derived(!bare && (Boolean(label) || !indeterminate));
|
|
</script>
|
|
|
|
<div class="progress progress-{size} tone-{tone}">
|
|
{#if showMeta}
|
|
<div class="progress-meta">
|
|
{#if label}
|
|
<span class="progress-label">{label}</span>
|
|
{/if}
|
|
{#if !indeterminate}
|
|
<span class="progress-value">{pct}%</span>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
<div
|
|
class="track"
|
|
role="progressbar"
|
|
aria-valuemin={0}
|
|
aria-valuemax={100}
|
|
aria-valuenow={indeterminate ? undefined : pct}
|
|
aria-label={label ?? 'Progress'}
|
|
>
|
|
{#if indeterminate}
|
|
<div class="fill indeterminate"></div>
|
|
{:else}
|
|
<div class="fill" style:width={pct + '%'}></div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.progress {
|
|
width: 100%;
|
|
}
|
|
.progress-meta {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.progress-label {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
.progress-value {
|
|
margin-left: auto;
|
|
font-family: var(--font-mono);
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
}
|
|
.track {
|
|
position: relative;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
background: var(--surface-3);
|
|
border-radius: 999px;
|
|
}
|
|
.progress-sm .track {
|
|
height: 4px;
|
|
}
|
|
.progress-md .track {
|
|
height: 6px;
|
|
}
|
|
.fill {
|
|
height: 100%;
|
|
background: var(--accent);
|
|
border-radius: 999px;
|
|
transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
}
|
|
.tone-success .fill {
|
|
background: var(--success);
|
|
}
|
|
.tone-error .fill {
|
|
background: var(--error);
|
|
}
|
|
.fill.indeterminate {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 40%;
|
|
background: linear-gradient(
|
|
90deg,
|
|
transparent,
|
|
var(--accent) 40%,
|
|
var(--accent) 60%,
|
|
transparent
|
|
);
|
|
transition: none;
|
|
animation: progress-slide 1.2s ease-in-out infinite;
|
|
}
|
|
@keyframes progress-slide {
|
|
0% {
|
|
left: -40%;
|
|
}
|
|
100% {
|
|
left: 100%;
|
|
}
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.fill {
|
|
transition: none;
|
|
}
|
|
.fill.indeterminate {
|
|
animation: none;
|
|
left: 0;
|
|
width: 100%;
|
|
opacity: 0.4;
|
|
}
|
|
}
|
|
</style>
|