- 移除 Calliope 旧壳死代码:/project/[id] 旧四段编辑器页面与 9 个遗留组件 (NavRail/StoryStage/AssetsStage/ScriptStage/QueueStage/ActivityPanel/ JobRow/AssetThumb/ProjectCard),/projects 死页面(308→/ 已有) - 素材库 /library 迁入 AppShell 新壳:a-chip 筛选、ui/Modal、ConfirmDialog 实心红两级删除、窄屏单列;移除 A 时期 308→/ 重定向;导航轨/更多菜单新增入口 - 智能体子系统去杂色:agentPalette 默认紫→中性、回退色板收敛为 avatar 五色族; AgentChat 气泡按 §3.2/3.6(用户 bg-3/Agent bg-2+line)、进行中指示改青、 紫色空态图标清除;AgentComposer 天蓝/金芯片收敛 - 首页/工作台/五面板/StageStepper/PromptBlock/JobChip 类名收敛到全局 a-btn/ a-input/a-tag/field;Stepper 补金色当前下划+已确认✓;镜头序号按规范用 accent-lo+mono;分页/工作台选择页金色越界改中性或青 - 金色纪律修正:次级文字操作(重试/测试/链接)与必填星标、任务「测试」标签 去金色;「默认」金标签按 §3.9 保留 - 断点收敛:1023/1279/900/780/700/640 → 1180/760(1440 增强保留) - canvas/build-scene 可用级 ≤760 纵向堆叠适配 + 硬编码色/旧 fallback 清理; AppHeader 去 Calliope 品牌与死链 - favicon 收口:static/favicon.png 金色品牌图标,移除 204 stub 与构建豁免 - i18n 七语种 +3 key(shell.navLibrary/library.loadError/library.subtitle)全对齐 - 新增 e2e/fpages.mjs:F 页面三档走查/重定向/五段导入编辑/规范色断言 38 项 Co-authored-by: multica-agent <github@multica.ai>
104 lines
2.1 KiB
Svelte
104 lines
2.1 KiB
Svelte
<script lang="ts">
|
|
import type { WorkbenchJobBrief } from '$lib/api';
|
|
import { progressFor } from '$lib/jobProgress';
|
|
import { t } from '$lib/i18n.svelte';
|
|
|
|
/**
|
|
* Inline workbench job state chip (spec §5 任务条目四态):
|
|
* 排队灰 / 进行中琥珀百分比 / 完成绿 / 失败红(附原因).
|
|
*/
|
|
interface Props {
|
|
job: WorkbenchJobBrief;
|
|
}
|
|
|
|
let { job }: Props = $props();
|
|
|
|
const live = $derived(progressFor(job.id));
|
|
const pct = $derived(live?.progress ?? null);
|
|
|
|
const state = $derived(
|
|
job.status === 'done'
|
|
? 'done'
|
|
: job.status === 'failed'
|
|
? 'failed'
|
|
: job.status === 'running'
|
|
? 'running'
|
|
: 'pending',
|
|
);
|
|
</script>
|
|
|
|
<span class="job-chip st-{state}" data-testid="wb-job-chip">
|
|
{#if state === 'running'}
|
|
<span class="breath" aria-hidden="true"></span>
|
|
{#if pct != null}{t('workbench.jobRunningPct', { n: Math.round(pct) })}{:else}{t('workbench.jobRunning')}{/if}
|
|
{:else if state === 'pending'}
|
|
{t('workbench.jobQueued')}
|
|
{:else if state === 'done'}
|
|
{t('workbench.jobDone')}
|
|
{:else}
|
|
{t('workbench.jobFailed')}
|
|
{/if}
|
|
</span>
|
|
{#if state === 'failed' && job.error}
|
|
<span class="job-error">{job.error}</span>
|
|
{/if}
|
|
|
|
<style>
|
|
.job-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
padding: 1px 9px;
|
|
border-radius: 999px;
|
|
font-size: 10.5px;
|
|
font-weight: 600;
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
}
|
|
.st-pending {
|
|
color: var(--text-2);
|
|
background: var(--surface-3);
|
|
}
|
|
.st-running {
|
|
color: var(--run);
|
|
background: var(--run-soft);
|
|
}
|
|
.st-done {
|
|
color: var(--success);
|
|
background: var(--success-dim);
|
|
}
|
|
.st-failed {
|
|
color: var(--error);
|
|
background: var(--error-dim);
|
|
}
|
|
.job-error {
|
|
display: block;
|
|
font-size: 11px;
|
|
color: var(--error);
|
|
line-height: 1.5;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.breath {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--run);
|
|
animation: wb-chip-breath 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
|
|
}
|
|
@keyframes wb-chip-breath {
|
|
0%,
|
|
100% {
|
|
opacity: 0.35;
|
|
}
|
|
50% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.breath {
|
|
animation: none;
|
|
}
|
|
}
|
|
</style>
|