HEL-840: prioritize projects in studio and share header styling
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { parseDbTs } from '$lib/dbtime';
|
||||
import { parseDbTs } from "$lib/dbtime";
|
||||
import { resolve } from "$app/paths";
|
||||
import { goto } from "$app/navigation";
|
||||
import { createMutation, useQueryClient } from "@tanstack/svelte-query";
|
||||
@@ -198,11 +198,12 @@
|
||||
style:color={placeholderIconColor}
|
||||
aria-hidden="true"
|
||||
>
|
||||
<span class="cover-type"
|
||||
>✳<small>STORY / {String(project.id).padStart(3, "0")}</small></span
|
||||
>
|
||||
<span class="cover-type"><small>暂无封面</small></span>
|
||||
</span>
|
||||
{/if}
|
||||
{#if stats.active_jobs}<span class="active-count"
|
||||
>{stats.active_jobs} 个任务进行中</span
|
||||
>{/if}
|
||||
<span class="status-tag {cover.cls}">{cover.label}</span>
|
||||
</span>
|
||||
<span class="body">
|
||||
@@ -215,10 +216,9 @@
|
||||
<span class="seg {segClass(key)}" title={t(`workbench.stage.${key}`)}
|
||||
></span>
|
||||
{/each}
|
||||
|
||||
</span>
|
||||
<span class="meta">
|
||||
<span>阶段 {Math.min(5, stats.stage_confirmed + 1)}/5</span>
|
||||
<span>场景 {stats.scene_count} · 角色 {stats.character_count}</span>
|
||||
<span class="meta-time">{updatedLabel}</span>
|
||||
</span>
|
||||
</span>
|
||||
@@ -299,6 +299,10 @@
|
||||
/>
|
||||
|
||||
<style>
|
||||
.a-card,
|
||||
.a-card :global(*) {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.a-card {
|
||||
position: relative;
|
||||
background: var(--bg-2);
|
||||
@@ -310,7 +314,7 @@
|
||||
border-color var(--t-base);
|
||||
}
|
||||
.a-card:hover {
|
||||
transform: translateY(-3px);
|
||||
transform: translateY(-1px);
|
||||
border-color: var(--line-3);
|
||||
}
|
||||
.card-main {
|
||||
@@ -365,6 +369,16 @@
|
||||
background: var(--media-scrim);
|
||||
color: var(--media-text);
|
||||
}
|
||||
.active-count {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
bottom: 6px;
|
||||
font-size: 10px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 4px;
|
||||
background: var(--media-scrim);
|
||||
color: var(--media-text);
|
||||
}
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -378,11 +392,16 @@
|
||||
gap: 8px;
|
||||
}
|
||||
.title {
|
||||
font-size: 13.5px;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
min-height: 35px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
.arrow {
|
||||
margin-left: auto;
|
||||
@@ -412,6 +431,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
color: var(--tx-3);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import "./studio-header.css";
|
||||
import { resolve } from "$app/paths";
|
||||
import Icon from "$lib/components/ui/Icon.svelte";
|
||||
let {
|
||||
@@ -25,8 +26,8 @@
|
||||
class="studio-search"
|
||||
onclick={onSearch}
|
||||
aria-keyshortcuts="Control+K Meta+K"
|
||||
><Icon name="project-search" size={14} /><span>搜索项目、工作流、素材…</span><kbd
|
||||
>Ctrl K</kbd
|
||||
></button
|
||||
><Icon name="project-search" size={14} /><span
|
||||
>搜索项目、工作流、素材…</span
|
||||
><kbd>Ctrl K</kbd></button
|
||||
>{/if}
|
||||
</header>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
.home,
|
||||
.home *,
|
||||
.studio-header,
|
||||
.studio-header *,
|
||||
.project-workspace,
|
||||
.project-workspace * {
|
||||
box-sizing: border-box;
|
||||
@@ -742,101 +740,3 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.studio-header {
|
||||
height: var(--head);
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s3);
|
||||
padding: 0 var(--s4);
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--project-header-bg);
|
||||
backdrop-filter: blur(10px);
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
.studio-crumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: var(--tx-3);
|
||||
font-size: 12px;
|
||||
}
|
||||
.studio-crumb b {
|
||||
color: var(--tx-1);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.studio-crumb a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.studio-greeting {
|
||||
font-size: 12px;
|
||||
color: var(--tx-3);
|
||||
}
|
||||
.studio-search {
|
||||
width: 280px;
|
||||
height: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-radius: var(--r-sm);
|
||||
background: var(--well);
|
||||
border: 1px solid var(--line-2);
|
||||
padding: 0 10px;
|
||||
color: var(--tx-3);
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.studio-search kbd {
|
||||
margin-left: auto;
|
||||
font: 500 10.5px/1 var(--mono);
|
||||
color: var(--tx-3);
|
||||
border: 1px solid var(--line-2);
|
||||
border-bottom-width: 2px;
|
||||
padding: 3px 5px;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-2);
|
||||
}
|
||||
/* Configure the existing controls at the page boundary, keeping their source shared. */
|
||||
.home,
|
||||
.project-workspace,
|
||||
.studio-header {
|
||||
--icon-stroke: var(--project-icon-stroke);
|
||||
--button-height: 32px;
|
||||
--button-font-size: 12.5px;
|
||||
--button-weight: 500;
|
||||
--button-radius: var(--project-button-radius);
|
||||
--tag-height: 18px;
|
||||
--tag-padding: 6px;
|
||||
--tag-radius: 4px;
|
||||
--tag-font-size: 11px;
|
||||
--tag-border-width: 1px;
|
||||
--tag-border: var(--line);
|
||||
--tag-background: rgb(var(--ink) / 0.05);
|
||||
--tag-color: var(--tx-2);
|
||||
--tag-warn-color: var(--sc-agent);
|
||||
--tag-warn-background: rgb(var(--ink) / 0.05);
|
||||
--tag-warn-border: color-mix(in srgb, var(--sc-agent) 40%, transparent);
|
||||
--button-sm-font-size: 12px;
|
||||
--button-sm-height: 26px;
|
||||
--button-sm-padding: 9px;
|
||||
--button-sm-radius: var(--project-button-sm-radius);
|
||||
--button-primary-height: 32px;
|
||||
--button-primary-padding: 12px;
|
||||
--button-primary-radius: var(--project-button-radius);
|
||||
--button-primary-weight: 700;
|
||||
--button-primary-border-width: 0px;
|
||||
--button-primary-disabled-opacity: 1;
|
||||
--button-primary-disabled-filter: var(--project-button-disabled-filter);
|
||||
--button-primary-disabled-bg: var(--project-button-disabled-bg);
|
||||
--button-primary-disabled-color: var(--project-button-disabled-color);
|
||||
--button-secondary-bg: var(--bg-3);
|
||||
--button-secondary-border: var(--line-2);
|
||||
--button-secondary-hover-border: var(--line-3);
|
||||
--button-secondary-padding: 12px;
|
||||
--button-secondary-active-transform: translateY(1px);
|
||||
--button-secondary-radius: var(--project-button-radius);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
.studio-header,
|
||||
.studio-header * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.studio-header {
|
||||
height: var(--head);
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--s3);
|
||||
padding: 0 var(--s4);
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--project-header-bg);
|
||||
backdrop-filter: blur(10px);
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
.studio-crumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: var(--tx-3);
|
||||
font-size: 12px;
|
||||
}
|
||||
.studio-crumb b {
|
||||
color: var(--tx-1);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.studio-crumb a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
.studio-greeting {
|
||||
font-size: 12px;
|
||||
color: var(--tx-3);
|
||||
}
|
||||
.studio-search {
|
||||
width: 280px;
|
||||
height: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-radius: var(--r-sm);
|
||||
background: var(--well);
|
||||
border: 1px solid var(--line-2);
|
||||
padding: 0 10px;
|
||||
color: var(--tx-3);
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.studio-search kbd {
|
||||
margin-left: auto;
|
||||
font: 500 10.5px/1 var(--mono);
|
||||
color: var(--tx-3);
|
||||
border: 1px solid var(--line-2);
|
||||
border-bottom-width: 2px;
|
||||
padding: 3px 5px;
|
||||
border-radius: 4px;
|
||||
background: var(--bg-2);
|
||||
}
|
||||
|
||||
.studio-header .b3-grow {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.home,
|
||||
.project-workspace,
|
||||
.st2,
|
||||
.studio-header {
|
||||
--icon-stroke: var(--project-icon-stroke);
|
||||
--button-height: 32px;
|
||||
--button-font-size: 12.5px;
|
||||
--button-weight: 500;
|
||||
--button-radius: var(--project-button-radius);
|
||||
--tag-height: 18px;
|
||||
--tag-padding: 6px;
|
||||
--tag-radius: 4px;
|
||||
--tag-font-size: 11px;
|
||||
--tag-border-width: 1px;
|
||||
--tag-border: var(--line);
|
||||
--tag-background: rgb(var(--ink) / 0.05);
|
||||
--tag-color: var(--tx-2);
|
||||
--tag-warn-color: var(--sc-agent);
|
||||
--tag-warn-background: rgb(var(--ink) / 0.05);
|
||||
--tag-warn-border: color-mix(in srgb, var(--sc-agent) 40%, transparent);
|
||||
--button-sm-font-size: 12px;
|
||||
--button-sm-height: 26px;
|
||||
--button-sm-padding: 9px;
|
||||
--button-sm-radius: var(--project-button-sm-radius);
|
||||
--button-primary-height: 32px;
|
||||
--button-primary-padding: 12px;
|
||||
--button-primary-radius: var(--project-button-radius);
|
||||
--button-primary-weight: 700;
|
||||
--button-primary-border-width: 0px;
|
||||
--button-primary-disabled-opacity: 1;
|
||||
--button-primary-disabled-filter: var(--project-button-disabled-filter);
|
||||
--button-primary-disabled-bg: var(--project-button-disabled-bg);
|
||||
--button-primary-disabled-color: var(--project-button-disabled-color);
|
||||
--button-secondary-bg: var(--bg-3);
|
||||
--button-secondary-border: var(--line-2);
|
||||
--button-secondary-hover-border: var(--line-3);
|
||||
--button-secondary-padding: 12px;
|
||||
--button-secondary-active-transform: translateY(1px);
|
||||
--button-secondary-radius: var(--project-button-radius);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import "$lib/components/workbench/project.css";
|
||||
import "$lib/components/manage/management.css";
|
||||
import { assetUrl } from "$lib/api";
|
||||
import StudioHeader from "$lib/components/workbench/StudioHeader.svelte";
|
||||
import { resolve } from "$app/paths";
|
||||
@@ -28,7 +28,9 @@
|
||||
import Button from "$lib/components/ui/Button.svelte";
|
||||
import Icon from "$lib/components/ui/Icon.svelte";
|
||||
import ProgressBar from "$lib/components/ui/ProgressBar.svelte";
|
||||
import Skeleton from "$lib/components/ui/Skeleton.svelte";
|
||||
import Modal from "$lib/components/ui/Modal.svelte";
|
||||
import SafeMedia from "$lib/components/SafeMedia.svelte";
|
||||
import "./studio-v2.css";
|
||||
import { toast } from "$lib/toast";
|
||||
import { t } from "$lib/i18n.svelte";
|
||||
import { classifyEndpoint, endpointTypeLabel } from "$lib/endpointKind";
|
||||
@@ -58,15 +60,25 @@
|
||||
// 进行中 = started the five-stage flow but not all five confirmed yet.
|
||||
const stageKeys = ["script", "style", "storyboard", "assets", "shot"];
|
||||
const stageNames = ["故事", "风格", "分镜", "素材", "镜头脚本"];
|
||||
let projectFilter = $state("最近");
|
||||
let projectFilter = $state("全部");
|
||||
let titleFilter = $state("");
|
||||
let projectSort = $state("recent");
|
||||
let showWaiting = $state(false);
|
||||
const visibleProjects = $derived(
|
||||
allProjects.filter(
|
||||
(p) =>
|
||||
projectFilter === "最近" ||
|
||||
(projectFilter === "已完成"
|
||||
? (p.stats?.stage_confirmed ?? 0) >= 5
|
||||
: (p.stats?.stage_confirmed ?? 0) < 5),
|
||||
),
|
||||
allProjects
|
||||
.filter(
|
||||
(p) =>
|
||||
p.title.toLowerCase().includes(titleFilter.toLowerCase()) &&
|
||||
(projectFilter === "全部" ||
|
||||
(projectFilter === "已完成"
|
||||
? (p.stats?.stage_confirmed ?? 0) >= 5
|
||||
: (p.stats?.stage_confirmed ?? 0) < 5)),
|
||||
)
|
||||
.toSorted((a, b) =>
|
||||
projectSort === "name"
|
||||
? a.title.localeCompare(b.title)
|
||||
: parseDbTs(b.updated_at) - parseDbTs(a.updated_at),
|
||||
),
|
||||
);
|
||||
const recent = $derived(allProjects[0]);
|
||||
const recentStage = $derived(
|
||||
@@ -252,7 +264,12 @@
|
||||
// ------------------------------------------------------------------
|
||||
// Right task area — real queue records only (spec §5 four states).
|
||||
// ------------------------------------------------------------------
|
||||
const recentJobs = $derived(($jobsQuery.data ?? []).slice(0, 10));
|
||||
const recentJobs = $derived(($jobsQuery.data ?? []).slice(0, 20));
|
||||
const queuedJobs = $derived(
|
||||
recentJobs.filter((j) =>
|
||||
["pending", "running", "failed"].includes(j.status),
|
||||
),
|
||||
);
|
||||
const activeJobCount = $derived(
|
||||
($jobsQuery.data ?? []).filter(
|
||||
(j) => j.status === "pending" || j.status === "running",
|
||||
@@ -314,18 +331,6 @@
|
||||
: workflowName(job) || jobSourceLabel(job);
|
||||
}
|
||||
|
||||
function jobMeta(job: Job): string {
|
||||
const wf = workflowName(job);
|
||||
const parts = [
|
||||
wf === jobTitle(job) ? "" : wf,
|
||||
jobSourceLabel(job),
|
||||
formatJobTime(job.created_at),
|
||||
];
|
||||
if (job.status === "failed" && job.error && job.error !== "cancelled")
|
||||
parts.push(job.error);
|
||||
return parts.filter(Boolean).join(" · ");
|
||||
}
|
||||
|
||||
function jobBar(job: Job): {
|
||||
value: number;
|
||||
tone: "run" | "success" | "error";
|
||||
@@ -390,398 +395,362 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<AppShell active="projects" title="工作室" subtitle={t("home.subtitle")}>
|
||||
<AppShell
|
||||
active="projects"
|
||||
title="工作室"
|
||||
subtitle={t("home.subtitle")}
|
||||
workspace
|
||||
>
|
||||
{#snippet pageHeader({ openSearch })}<StudioHeader
|
||||
title="工作室"
|
||||
onSearch={openSearch}
|
||||
/>{/snippet}
|
||||
|
||||
<div class="home">
|
||||
<section class="main-col">
|
||||
{#if entryMode === "none"}
|
||||
<div class="studio-hero">
|
||||
{#if recent?.cover_path}<img
|
||||
class="hero-art"
|
||||
src={assetUrl(recent.cover_path) ?? ""}
|
||||
alt=""
|
||||
/>{/if}
|
||||
<div class="hero-shade"></div>
|
||||
<div class="hero-copy">
|
||||
<span class="studio-eyebrow"
|
||||
>{recent
|
||||
? "继续创作 · " +
|
||||
new Date(recent.updated_at).toLocaleDateString()
|
||||
: "开始创作"}</span
|
||||
<div class="st2" class:empty={!allProjects.length}>
|
||||
<section class="st2-main">
|
||||
{#if $projectsQuery.isLoading}<p>
|
||||
正在读取项目…
|
||||
</p>{:else if $projectsQuery.isError}<p>
|
||||
项目加载失败<Button onclick={() => $projectsQuery.refetch()}
|
||||
>重试</Button
|
||||
>
|
||||
</p>{:else if recent}
|
||||
<section class="resume">
|
||||
<div class="cover">
|
||||
{#if recent.cover_path}<SafeMedia
|
||||
src={assetUrl(recent.cover_path)}
|
||||
alt={recent.title}
|
||||
/>{:else}<span class="cover-blank">暂无封面</span>{/if}
|
||||
</div>
|
||||
<div class="copy">
|
||||
<small
|
||||
>继续创作 · {new Date(
|
||||
parseDbTs(recent.updated_at),
|
||||
).toLocaleDateString()}</small
|
||||
>
|
||||
<h1 class="studio-display">
|
||||
{recent ? "《" + recent.title + "》" : "还没有项目"}<br /><em
|
||||
>{recent
|
||||
? stageNames[Math.max(recentStage, 0)]
|
||||
: "从一个想法开始"}</em
|
||||
>
|
||||
{recent
|
||||
? recentStage < 0
|
||||
? "已完成"
|
||||
: recent.stats?.stage_status?.[stageKeys[recentStage]] ===
|
||||
"awaiting_confirm"
|
||||
<h2 class="t1" title={recent.title}>《{recent.title}》</h2>
|
||||
<b class="resume-stage"
|
||||
>{recentStage < 0
|
||||
? "已完成"
|
||||
: stageNames[recentStage] +
|
||||
" · " +
|
||||
(recent.stats?.stage_status?.[stageKeys[recentStage]] ===
|
||||
"awaiting_confirm"
|
||||
? "等你确认"
|
||||
: "继续创作"
|
||||
: ""}
|
||||
</h1>
|
||||
<p class="hero-description">
|
||||
{recent?.idea ||
|
||||
(recent
|
||||
? "草稿确认后,才会交给下一阶段使用。"
|
||||
: "创建五阶段项目,或直接开始图片与视频创作。")}
|
||||
</p>
|
||||
: "继续创作")}</b
|
||||
>
|
||||
<p class="next">草稿确认后,才会交给下一阶段使用。</p>
|
||||
<div class="studio-stages">
|
||||
{#each stageKeys as key, i (key)}<div
|
||||
class:done={recent?.stats?.stage_status?.[key] ===
|
||||
"confirmed"}
|
||||
class:cur={recentStage === i}
|
||||
>
|
||||
<i></i>{stageNames[i]}
|
||||
</div>{/each}
|
||||
{#each stageKeys as key, i (key)}<span
|
||||
class:done={recent.stats?.stage_status?.[key] === "confirmed"}
|
||||
class:cur={recentStage === i}><i></i>{stageNames[i]}</span
|
||||
>{/each}
|
||||
</div>
|
||||
<div class="b3-row">
|
||||
{#if recent}<a
|
||||
class="a-btn primary"
|
||||
href={resolve(`/workbench/${recent.id}`)}
|
||||
>打开项目 <Icon name="project-arrow" size={14} /></a
|
||||
><a
|
||||
class="a-btn secondary"
|
||||
href={resolve(
|
||||
`/workbench/${recent.id}?stage=${stageKeys[Math.max(0, recentStage)]}`,
|
||||
)}>查看阶段草稿</a
|
||||
>{:else}<button class="a-btn primary" onclick={openIdea}
|
||||
>从创意开始</button
|
||||
>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="studio-quick" aria-label="创作工具">
|
||||
<button onclick={openIdea}
|
||||
><span class="qi"><Icon name="project-book" size={20} /></span><b
|
||||
>从创意开始</b
|
||||
>
|
||||
<p>一句话想法 → 五阶段项目</p></button
|
||||
>
|
||||
<button onclick={openScript}
|
||||
><span class="qi"><Icon name="project-folder-in" size={20} /></span><b
|
||||
>导入剧本</b
|
||||
>
|
||||
<p>粘贴剧本文本</p></button
|
||||
>
|
||||
<a
|
||||
href={resolve("/create?kind=image")}
|
||||
style:--scene="var(--sc-image)"
|
||||
><span class="qi"><Icon name="project-image" size={20} /></span><b
|
||||
>独立生图</b
|
||||
>
|
||||
<p>文生图 · 图生图 · 遮罩</p></a
|
||||
>
|
||||
<a
|
||||
href={resolve("/create?kind=video")}
|
||||
style:--scene="var(--sc-video)"
|
||||
><span class="qi"><Icon name="project-film" size={20} /></span><b
|
||||
>独立生视频</b
|
||||
>
|
||||
<p>文生 · 首尾帧 · 参考</p></a
|
||||
>
|
||||
</section>
|
||||
{:else if entryMode === "idea"}
|
||||
<form class="entry-form" onsubmit={submitIdea}>
|
||||
<div class="form-head">
|
||||
<h2>{t("home.entryIdeaTitle")}</h2>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
aria-label={t("projects.close")}
|
||||
onclick={closeEntry}
|
||||
>
|
||||
<Icon name="close" size={16} />
|
||||
</button>
|
||||
</div>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.titleField")}<em>*</em></span
|
||||
>
|
||||
<input
|
||||
class="field-input"
|
||||
class:invalid={showErrors && ideaErrors.title}
|
||||
bind:value={ideaForm.title}
|
||||
placeholder={t("projects.titlePlaceholder")}
|
||||
/>
|
||||
{#if showErrors && ideaErrors.title}<span class="field-error"
|
||||
>{ideaErrors.title}</span
|
||||
>{/if}
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.ideaField")}</span>
|
||||
<textarea
|
||||
class="field-textarea"
|
||||
bind:value={ideaForm.idea}
|
||||
placeholder={t("home.ideaPlaceholder")}
|
||||
rows={4}
|
||||
></textarea>
|
||||
<span class="field-hint">{t("projects.ideaHint")}</span>
|
||||
</label>
|
||||
<div class="f-grid">
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.genre")}</span>
|
||||
<select class="field-input" bind:value={ideaForm.genre}>
|
||||
{#each GENRES as v (v)}<option value={v}
|
||||
>{t("genres." + genreKey(v))}</option
|
||||
>{/each}
|
||||
</select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.tone")}</span>
|
||||
<select class="field-input" bind:value={ideaForm.tone}>
|
||||
{#each TONES as v (v)}<option value={v}
|
||||
>{t("tones." + toneKey(v))}</option
|
||||
>{/each}
|
||||
</select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.duration")}</span>
|
||||
<select class="field-input" bind:value={ideaForm.duration}>
|
||||
{#each DURATIONS as v (v)}<option value={v}
|
||||
>{t("durations." + durationKey(v))}</option
|
||||
>{/each}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<Button variant="ghost" onclick={closeEntry}
|
||||
>{t("projects.cancel")}</Button
|
||||
>
|
||||
<Button
|
||||
variant="primary"
|
||||
type="submit"
|
||||
loading={$ideaMutation.isPending}
|
||||
>
|
||||
{t("projects.create")}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
{:else}
|
||||
<form class="entry-form" onsubmit={submitScript}>
|
||||
<div class="form-head">
|
||||
<h2>{t("home.entryScriptTitle")}</h2>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
aria-label={t("projects.close")}
|
||||
onclick={closeEntry}
|
||||
>
|
||||
<Icon name="close" size={16} />
|
||||
</button>
|
||||
</div>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.titleField")}<em>*</em></span
|
||||
>
|
||||
<input
|
||||
class="field-input"
|
||||
class:invalid={showErrors && scriptErrors.title}
|
||||
bind:value={scriptForm.title}
|
||||
placeholder={t("projects.titlePlaceholder")}
|
||||
/>
|
||||
{#if showErrors && scriptErrors.title}<span class="field-error"
|
||||
>{scriptErrors.title}</span
|
||||
>{/if}
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("home.scriptField")}<em>*</em></span>
|
||||
<textarea
|
||||
class="field-textarea"
|
||||
class:invalid={showErrors && scriptErrors.script}
|
||||
bind:value={scriptForm.script}
|
||||
placeholder={t("home.scriptPlaceholder")}
|
||||
rows={9}
|
||||
></textarea>
|
||||
{#if showErrors && scriptErrors.script}<span class="field-error"
|
||||
>{scriptErrors.script}</span
|
||||
>{/if}
|
||||
<span class="field-hint">{t("home.scriptHint")}</span>
|
||||
</label>
|
||||
<div class="form-actions">
|
||||
<Button variant="ghost" onclick={closeEntry}
|
||||
>{t("projects.cancel")}</Button
|
||||
>
|
||||
<Button
|
||||
variant="primary"
|
||||
type="submit"
|
||||
loading={$scriptMutation.isPending}
|
||||
>
|
||||
{t("home.importScript")}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<div class="projects-head">
|
||||
<h2>我的项目</h2>
|
||||
<span class="a-tag">{allProjects.length}</span>
|
||||
<div class="b3-grow"></div>
|
||||
<div class="studio-filters">
|
||||
{#each ["最近", "进行中", "已完成"] as filter (filter)}<button
|
||||
class:on={projectFilter === filter}
|
||||
onclick={() => (projectFilter = filter)}>{filter}</button
|
||||
>{/each}
|
||||
</div>
|
||||
</div>
|
||||
{#if $projectsQuery.isLoading}
|
||||
<div class="cards" aria-busy="true">
|
||||
{#each [1, 2, 3] as n (n)}
|
||||
<div class="skel-card">
|
||||
<Skeleton height="132px" />
|
||||
<div class="skel-body">
|
||||
<Skeleton width="55%" height="15px" />
|
||||
<Skeleton width="90%" />
|
||||
<Skeleton width="40%" height="11px" />
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else if $projectsQuery.isError}
|
||||
<div class="panel-empty error">
|
||||
<Icon name="alert" size={18} />
|
||||
<p>{t("projects.loadError")}</p>
|
||||
<Button variant="secondary" onclick={() => $projectsQuery.refetch()}>
|
||||
<Icon name="retry" size={14} />
|
||||
{t("common.retry")}
|
||||
</Button>
|
||||
</div>
|
||||
{:else if allProjects.length === 0}
|
||||
<div class="panel-empty">
|
||||
<Icon name="project-folder-in" size={20} />
|
||||
<p>{t("home.emptyProjects")}</p>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="cards">
|
||||
{#each visibleProjects as project (project.id)}
|
||||
<AProjectCard {project} />
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<aside class="studio-side">
|
||||
<section class="studio-side-card">
|
||||
<h3>
|
||||
<span class="waiting-dot"></span>待你确认<span class="b3-grow"
|
||||
></span><span class="a-tag">{waiting.length}</span>
|
||||
</h3>
|
||||
{#each waiting as item (item.project.id + item.key)}<div
|
||||
class="confirm-item"
|
||||
>
|
||||
<div class="b3-row">
|
||||
<b>{item.name}</b><span class="b3-grow"></span><small
|
||||
>{item.project.title}</small
|
||||
>
|
||||
</div>
|
||||
<div class="b3-row">
|
||||
<div class="acts">
|
||||
<a
|
||||
class="a-btn secondary sm"
|
||||
class="a-btn primary"
|
||||
href={resolve(
|
||||
`/workbench/${item.project.id}?stage=${item.key}`,
|
||||
)}>去确认</a
|
||||
><a
|
||||
class="a-btn ghost sm"
|
||||
href={resolve(
|
||||
`/workbench/${item.project.id}?stage=${item.key}`,
|
||||
)}>看草稿</a
|
||||
`/workbench/${recent.id}?stage=${stageKeys[Math.max(0, recentStage)]}`,
|
||||
)}>继续创作 →</a
|
||||
><span class="meta"
|
||||
>阶段 {Math.min(5, (recent.stats?.stage_confirmed ?? 0) + 1)}/5
|
||||
· 场景 {recent.stats?.scene_count ?? 0} · 角色 {recent.stats
|
||||
?.character_count ?? 0}</span
|
||||
>
|
||||
</div>
|
||||
</div>{:else}<p class="b3-empty">暂无待确认草稿</p>{/each}
|
||||
</section>
|
||||
<section class="studio-side-card">
|
||||
<h3>
|
||||
<Icon name="project-queue" size={14} />生成队列<span class="b3-grow"
|
||||
></span><small>{activeJobCount} 个进行中</small>
|
||||
</h3>
|
||||
{#if $jobsQuery.isLoading}
|
||||
<div class="tasks-loading">{t("common.loading")}…</div>
|
||||
{:else if recentJobs.length === 0}
|
||||
<div class="tasks-empty">
|
||||
<Icon name="project-queue" size={20} />
|
||||
<p>{t("home.emptyJobs")}</p>
|
||||
<p class="tasks-empty-sub">{t("home.emptyJobsSub")}</p>
|
||||
</div>
|
||||
{:else}
|
||||
<ul class="job-list">
|
||||
{#each recentJobs as job (job.id)}
|
||||
{@const tag = jobTag(job)}
|
||||
{@const bar = jobBar(job)}
|
||||
<li class="job-row" class:failed={job.status === "failed"}>
|
||||
<div class="job-top">
|
||||
<span class="a-tag">{tag.label}</span>
|
||||
<span class="job-name" title={jobTitle(job)}
|
||||
>{jobTitle(job)}</span
|
||||
>
|
||||
<span class="job-side">
|
||||
{#if job.status === "failed" && job.error !== "cancelled"}
|
||||
<span class="job-status mono failed-text"
|
||||
>{jobStatusLabel(job.status)}</span
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="retry-link"
|
||||
onclick={() => $retryMutation.mutate(job.id)}
|
||||
>
|
||||
{t("common.retry")}
|
||||
</button>
|
||||
{:else}
|
||||
<span
|
||||
class="job-status mono {job.status === 'done'
|
||||
? 'done-text'
|
||||
: job.status === 'running'
|
||||
? 'running-text'
|
||||
: 'queued-text'}"
|
||||
>
|
||||
{#if job.status === "running"}<span
|
||||
class="dot breathe"
|
||||
aria-hidden="true"
|
||||
></span>{Math.round(
|
||||
bar.value,
|
||||
)}%{:else}{jobStatusLabel(job.status)}{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<ProgressBar bare size="sm" value={bar.value} tone={bar.tone} />
|
||||
<p class="job-meta mono" title={jobMeta(job)}>{jobMeta(job)}</p>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
{/if}
|
||||
<a class="a-btn ghost sm" href={resolve("/tasks")}
|
||||
>全部任务 <Icon name="project-arrow" size={14} /></a
|
||||
</section>
|
||||
{:else}<div class="firstrun">
|
||||
<h2>开始你的第一个片子</h2>
|
||||
<p>把想法变成故事、画面与镜头。每个阶段先给草稿,等你确认再继续。</p>
|
||||
<div>
|
||||
<Button variant="primary" onclick={openIdea}>从创意开始</Button
|
||||
><Button variant="ghost" onclick={openScript}>导入剧本</Button>
|
||||
</div>
|
||||
</div>{/if}
|
||||
<section class="starts" aria-label="开始新工作">
|
||||
<button class="start" onclick={openIdea}
|
||||
><span class="qi"><Icon name="project-book" /></span><span
|
||||
><b>从创意开始</b><small>一句话想法 → 五阶段</small></span
|
||||
></button
|
||||
><button class="start" onclick={openScript}
|
||||
><span class="qi"><Icon name="project-folder-in" /></span><span
|
||||
><b>导入剧本</b><small>粘贴剧本文本</small></span
|
||||
></button
|
||||
><a
|
||||
class="start"
|
||||
href={resolve("/create?kind=image")}
|
||||
style:--scene="var(--sc-image)"
|
||||
><span class="qi"><Icon name="project-image" /></span><span
|
||||
><b>独立生图</b><small>文生图 · 图生图 · 遮罩</small></span
|
||||
></a
|
||||
><a
|
||||
class="start"
|
||||
href={resolve("/create?kind=video")}
|
||||
style:--scene="var(--sc-video)"
|
||||
><span class="qi"><Icon name="project-film" /></span><span
|
||||
><b>独立生视频</b><small>文生 · 首尾帧 · 参考</small></span
|
||||
></a
|
||||
>
|
||||
</section>
|
||||
<section class="studio-side-card">
|
||||
<h3>最近产出</h3>
|
||||
<div class="studio-outputs">
|
||||
{#if allProjects.length}<section class="plist">
|
||||
<div class="plist-h">
|
||||
<h2>我的项目 <small>{allProjects.length}</small></h2>
|
||||
<div class="studio-filters">
|
||||
{#each ["全部", "进行中", "已完成"] as filter (filter)}<button
|
||||
class:on={projectFilter === filter}
|
||||
onclick={() => (projectFilter = filter)}>{filter}</button
|
||||
>{/each}
|
||||
</div>
|
||||
<span class="mg-grow"></span><input
|
||||
class="a-input"
|
||||
aria-label="筛选项目标题"
|
||||
placeholder="筛选项目标题"
|
||||
bind:value={titleFilter}
|
||||
/><select
|
||||
class="a-select"
|
||||
aria-label="项目排序"
|
||||
bind:value={projectSort}
|
||||
><option value="recent">最近编辑</option><option value="name"
|
||||
>项目名称</option
|
||||
></select
|
||||
>
|
||||
</div>
|
||||
<div class="plist-b">
|
||||
<div class="pg2">
|
||||
<button class="newp" onclick={openIdea}
|
||||
><Icon name="plus" size={24} />新建项目</button
|
||||
>{#each visibleProjects as project (project.id)}<AProjectCard
|
||||
{project}
|
||||
/>{/each}
|
||||
</div>
|
||||
{#if !visibleProjects.length}<p class="empty-card">
|
||||
没有匹配的项目
|
||||
</p>{/if}
|
||||
</div>
|
||||
</section>{/if}
|
||||
</section>
|
||||
<aside class="st2-side">
|
||||
<section class="sc2">
|
||||
<h3>
|
||||
待你确认 <span class="mg-grow"></span><small>{waiting.length}</small>
|
||||
</h3>
|
||||
{#each waiting.slice(0, showWaiting ? undefined : 3) as item (item.project.id + item.key)}<div
|
||||
class="cf2"
|
||||
>
|
||||
<b>{item.name}</b><small title={item.project.title}
|
||||
>{item.project.title}</small
|
||||
><a
|
||||
class="a-btn secondary sm"
|
||||
href={resolve(`/workbench/${item.project.id}?stage=${item.key}`)}
|
||||
>去确认</a
|
||||
>
|
||||
</div>{:else}<p class="empty-card">
|
||||
暂无待确认草稿
|
||||
</p>{/each}{#if waiting.length > 3}<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onclick={() => (showWaiting = !showWaiting)}
|
||||
>{showWaiting
|
||||
? "收起"
|
||||
: "展开其余 " + (waiting.length - 3) + " 条"}</Button
|
||||
>{/if}
|
||||
</section>
|
||||
<section class="sc2">
|
||||
<h3>
|
||||
最近成果 <span class="mg-grow"></span><small
|
||||
>最近 {outputs.length} 条产出</small
|
||||
>
|
||||
</h3>
|
||||
<div class="outs2">
|
||||
{#each outputs as job (job.id)}<a
|
||||
href={assetUrl(job.output_paths[0]) ?? "#"}
|
||||
target="_blank"
|
||||
rel="noopener external"
|
||||
aria-label={jobTitle(job)}
|
||||
>{#if job.kind === "video"}<video
|
||||
src={assetUrl(job.output_paths[0]) ?? ""}
|
||||
preload="metadata"
|
||||
muted
|
||||
></video>{:else}<img
|
||||
src={assetUrl(job.output_paths[0]) ?? ""}
|
||||
alt={jobTitle(job)}
|
||||
/>{/if}</a
|
||||
><SafeMedia
|
||||
src={assetUrl(job.output_paths[0])}
|
||||
kind={job.kind === "video" ? "video" : "image"}
|
||||
alt={jobTitle(job)}
|
||||
controls={false}
|
||||
/><span class="k">{job.kind === "video" ? "视频" : "图片"}</span
|
||||
></a
|
||||
>{/each}
|
||||
</div>
|
||||
{#if !outputs.length}<p class="b3-empty">暂无生成产出</p>{/if}
|
||||
{#if !outputs.length}<p class="empty-card">暂无生成产出</p>{/if}
|
||||
</section>
|
||||
<section class="sc2">
|
||||
<h3>
|
||||
生成队列 <span class="mg-grow"></span><small
|
||||
>{activeJobCount} 个进行中(当前查询)</small
|
||||
>
|
||||
</h3>
|
||||
{#each queuedJobs as job (job.id)}{@const bar = jobBar(job)}
|
||||
<div class="studio-job">
|
||||
<div class="job-name">
|
||||
<span title={jobTitle(job)}>{jobTitle(job)}</span><small
|
||||
>{jobStatusLabel(job.status)}</small
|
||||
>{#if job.status === "failed" && job.error !== "cancelled"}<Button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onclick={() => $retryMutation.mutate(job.id)}>重试</Button
|
||||
>{/if}
|
||||
</div>
|
||||
<ProgressBar
|
||||
bare
|
||||
size="sm"
|
||||
value={bar.value}
|
||||
tone={bar.tone}
|
||||
/><small
|
||||
>{jobTag(job).label} · {formatJobTime(job.created_at)}</small
|
||||
>
|
||||
</div>{:else}<p class="empty-card">
|
||||
暂无进行中、排队或失败任务
|
||||
</p>{/each}
|
||||
<div class="qsum">
|
||||
最近 {recentJobs.length} 条:完成 {recentJobs.filter(
|
||||
(j) => j.status === "done",
|
||||
).length} · 失败 {recentJobs.filter((j) => j.status === "failed")
|
||||
.length}
|
||||
</div>
|
||||
<a class="a-btn ghost sm" href={resolve("/tasks")}>全部任务 →</a>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
</AppShell>
|
||||
<Modal
|
||||
open={entryMode !== "none"}
|
||||
title={entryMode === "idea" ? "从创意开始" : "导入剧本"}
|
||||
size="lg"
|
||||
onclose={closeEntry}
|
||||
>
|
||||
{#if entryMode === "idea"}
|
||||
<form class="entry-form" onsubmit={submitIdea}>
|
||||
<div class="form-head">
|
||||
<h2>{t("home.entryIdeaTitle")}</h2>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
aria-label={t("projects.close")}
|
||||
onclick={closeEntry}
|
||||
>
|
||||
<Icon name="close" size={16} />
|
||||
</button>
|
||||
</div>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.titleField")}<em>*</em></span>
|
||||
<input
|
||||
class="field-input"
|
||||
class:invalid={showErrors && ideaErrors.title}
|
||||
bind:value={ideaForm.title}
|
||||
placeholder={t("projects.titlePlaceholder")}
|
||||
/>
|
||||
{#if showErrors && ideaErrors.title}<span class="field-error"
|
||||
>{ideaErrors.title}</span
|
||||
>{/if}
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.ideaField")}</span>
|
||||
<textarea
|
||||
class="field-textarea"
|
||||
bind:value={ideaForm.idea}
|
||||
placeholder={t("home.ideaPlaceholder")}
|
||||
rows={4}
|
||||
></textarea>
|
||||
<span class="field-hint">{t("projects.ideaHint")}</span>
|
||||
</label>
|
||||
<div class="f-grid">
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.genre")}</span>
|
||||
<select class="field-input" bind:value={ideaForm.genre}>
|
||||
{#each GENRES as v (v)}<option value={v}
|
||||
>{t("genres." + genreKey(v))}</option
|
||||
>{/each}
|
||||
</select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.tone")}</span>
|
||||
<select class="field-input" bind:value={ideaForm.tone}>
|
||||
{#each TONES as v (v)}<option value={v}
|
||||
>{t("tones." + toneKey(v))}</option
|
||||
>{/each}
|
||||
</select>
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.duration")}</span>
|
||||
<select class="field-input" bind:value={ideaForm.duration}>
|
||||
{#each DURATIONS as v (v)}<option value={v}
|
||||
>{t("durations." + durationKey(v))}</option
|
||||
>{/each}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<Button variant="ghost" onclick={closeEntry}
|
||||
>{t("projects.cancel")}</Button
|
||||
>
|
||||
<Button
|
||||
variant="primary"
|
||||
type="submit"
|
||||
loading={$ideaMutation.isPending}
|
||||
>
|
||||
{t("projects.create")}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
{:else}
|
||||
<form class="entry-form" onsubmit={submitScript}>
|
||||
<div class="form-head">
|
||||
<h2>{t("home.entryScriptTitle")}</h2>
|
||||
<button
|
||||
type="button"
|
||||
class="icon-btn"
|
||||
aria-label={t("projects.close")}
|
||||
onclick={closeEntry}
|
||||
>
|
||||
<Icon name="close" size={16} />
|
||||
</button>
|
||||
</div>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("projects.titleField")}<em>*</em></span>
|
||||
<input
|
||||
class="field-input"
|
||||
class:invalid={showErrors && scriptErrors.title}
|
||||
bind:value={scriptForm.title}
|
||||
placeholder={t("projects.titlePlaceholder")}
|
||||
/>
|
||||
{#if showErrors && scriptErrors.title}<span class="field-error"
|
||||
>{scriptErrors.title}</span
|
||||
>{/if}
|
||||
</label>
|
||||
<label class="field">
|
||||
<span class="field-label">{t("home.scriptField")}<em>*</em></span>
|
||||
<textarea
|
||||
class="field-textarea"
|
||||
class:invalid={showErrors && scriptErrors.script}
|
||||
bind:value={scriptForm.script}
|
||||
placeholder={t("home.scriptPlaceholder")}
|
||||
rows={9}
|
||||
></textarea>
|
||||
{#if showErrors && scriptErrors.script}<span class="field-error"
|
||||
>{scriptErrors.script}</span
|
||||
>{/if}
|
||||
<span class="field-hint">{t("home.scriptHint")}</span>
|
||||
</label>
|
||||
<div class="form-actions">
|
||||
<Button variant="ghost" onclick={closeEntry}
|
||||
>{t("projects.cancel")}</Button
|
||||
>
|
||||
<Button
|
||||
variant="primary"
|
||||
type="submit"
|
||||
loading={$scriptMutation.isPending}
|
||||
>
|
||||
{t("home.importScript")}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
{/if}</Modal
|
||||
>
|
||||
|
||||
<style>
|
||||
.entry-form {
|
||||
|
||||
@@ -0,0 +1,515 @@
|
||||
.st2,
|
||||
.st2 * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.st2 {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) var(--studio-side);
|
||||
gap: 16px;
|
||||
padding: 16px 20px 20px;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
}
|
||||
.st2-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.st2-side {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.resume {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(220px, 38%) 1fr;
|
||||
gap: 0;
|
||||
border-radius: var(--r-xl);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line-2);
|
||||
background: var(--bg-1);
|
||||
min-height: 188px;
|
||||
flex: none;
|
||||
}
|
||||
[data-theme="day"] .resume {
|
||||
background: var(--bg-2);
|
||||
}
|
||||
.resume .cover {
|
||||
position: relative;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
min-width: 0;
|
||||
}
|
||||
.resume .cover::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(90deg, transparent 55%, var(--bg-1));
|
||||
}
|
||||
[data-theme="day"] .resume .cover::after {
|
||||
background: linear-gradient(90deg, transparent 60%, var(--bg-2));
|
||||
}
|
||||
.resume .cover .tc {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
font: 500 10.5px var(--mono);
|
||||
color: var(--media-text);
|
||||
background: var(--media-scrim);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.resume .copy {
|
||||
padding: 18px 22px 16px 18px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
gap: 6px;
|
||||
}
|
||||
.resume h2 {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.resume h2.t1 {
|
||||
-webkit-line-clamp: 1;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.resume h2.t2 {
|
||||
margin-top: -8px;
|
||||
}
|
||||
.resume h2 em {
|
||||
font-style: normal;
|
||||
background: var(--display-grad);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
.resume .next {
|
||||
font-size: 12.5px;
|
||||
color: var(--tx-2);
|
||||
margin: 0;
|
||||
}
|
||||
.resume .stagebar {
|
||||
max-width: 460px;
|
||||
}
|
||||
.resume .acts {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: auto;
|
||||
align-items: center;
|
||||
}
|
||||
.resume .meta {
|
||||
font-size: 11px;
|
||||
color: var(--tx-3);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.starts {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
flex: none;
|
||||
}
|
||||
.start {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
height: 54px;
|
||||
padding: 0 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--line);
|
||||
background: var(--bg-2);
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
transition:
|
||||
border-color var(--t-base),
|
||||
transform var(--t-base) var(--ease-out);
|
||||
isolation: isolate;
|
||||
color: var(--tx-1);
|
||||
text-decoration: none;
|
||||
}
|
||||
.start:hover {
|
||||
border-color: color-mix(in srgb, var(--scene) 45%, transparent);
|
||||
}
|
||||
.start .qi {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 9px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: color-mix(in srgb, var(--scene) 15%, transparent);
|
||||
color: var(--scene);
|
||||
flex: none;
|
||||
}
|
||||
.start b {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
}
|
||||
.start small {
|
||||
font-size: 11px;
|
||||
color: var(--tx-3);
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.plist {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
border-radius: var(--r-lg);
|
||||
border: 1px solid var(--line);
|
||||
background: var(--bg-1);
|
||||
}
|
||||
.plist-h {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
flex: none;
|
||||
}
|
||||
.plist-h h2 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.plist-h .input {
|
||||
height: 30px;
|
||||
width: 200px;
|
||||
}
|
||||
.plist-b {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
padding: 12px;
|
||||
min-height: 0;
|
||||
}
|
||||
.pg2 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.sc2 {
|
||||
border-radius: var(--r-lg);
|
||||
background: var(--bg-1);
|
||||
border: 1px solid var(--line);
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.sc2 h3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
.sc2 h3 .grow {
|
||||
flex: 1;
|
||||
}
|
||||
.cf2 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
align-items: center;
|
||||
gap: 4px 8px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid color-mix(in srgb, var(--sc-agent) 32%, transparent);
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
color-mix(in srgb, var(--sc-agent) 9%, transparent),
|
||||
transparent
|
||||
);
|
||||
}
|
||||
.cf2 b {
|
||||
font-size: 12.5px;
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.cf2 small {
|
||||
grid-column: 1;
|
||||
font-size: 11px;
|
||||
color: var(--tx-3);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.outs2 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 6px;
|
||||
}
|
||||
.outs2 button {
|
||||
position: relative;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 8px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border: 1px solid var(--line);
|
||||
overflow: hidden;
|
||||
}
|
||||
.outs2 button:hover {
|
||||
border-color: var(--line-3);
|
||||
}
|
||||
.outs2 .k {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
font: 500 10px var(--mono);
|
||||
color: var(--media-text);
|
||||
background: var(--media-scrim);
|
||||
padding: 1px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.q2 {
|
||||
display: grid;
|
||||
grid-template-columns: 36px 1fr;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding: 4px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.q2 .th {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 6px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-color: var(--bg-3);
|
||||
}
|
||||
.q2 .row {
|
||||
font-size: 12px;
|
||||
}
|
||||
.q2 .sub {
|
||||
font-size: 10.5px;
|
||||
color: var(--tx-3);
|
||||
}
|
||||
.qsum {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 11.5px;
|
||||
color: var(--tx-3);
|
||||
padding: 6px 4px 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
.qsum b {
|
||||
color: var(--tx-2);
|
||||
font-weight: 500;
|
||||
}
|
||||
.empty-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
text-align: center;
|
||||
padding: 18px 8px;
|
||||
color: var(--tx-3);
|
||||
font-size: 12px;
|
||||
}
|
||||
.st2.empty .plist {
|
||||
display: none;
|
||||
}
|
||||
.firstrun {
|
||||
border-radius: var(--r-xl);
|
||||
border: 1px dashed var(--line-3);
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
text-align: center;
|
||||
padding: 24px;
|
||||
background: radial-gradient(
|
||||
60% 70% at 50% 40%,
|
||||
color-mix(in srgb, var(--gold) 6%, transparent),
|
||||
transparent 70%
|
||||
);
|
||||
display: flex;
|
||||
min-height: 188px;
|
||||
flex: none;
|
||||
}
|
||||
.st2.empty .firstrun {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
.st2.empty .resume {
|
||||
display: none;
|
||||
}
|
||||
.firstrun h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
.firstrun p {
|
||||
color: var(--tx-2);
|
||||
max-width: 460px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.resume .cover img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
object-fit: cover;
|
||||
}
|
||||
.cover-blank {
|
||||
font: 11px var(--mono);
|
||||
color: var(--tx-3);
|
||||
}
|
||||
.resume .copy > small {
|
||||
font-size: 11px;
|
||||
color: var(--tx-2);
|
||||
}
|
||||
.resume-stage {
|
||||
font-size: 14px;
|
||||
color: var(--gold);
|
||||
}
|
||||
.studio-stages {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
.studio-stages > span {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
font-size: 11px;
|
||||
color: var(--tx-3);
|
||||
}
|
||||
.studio-stages i {
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
border-radius: 50%;
|
||||
background: var(--tx-3);
|
||||
}
|
||||
.studio-stages .done i {
|
||||
background: var(--ok);
|
||||
}
|
||||
.studio-stages .cur {
|
||||
color: var(--gold);
|
||||
}
|
||||
.studio-stages .cur i {
|
||||
background: var(--gold);
|
||||
}
|
||||
.start > span:last-child {
|
||||
min-width: 0;
|
||||
}
|
||||
.plist-h .a-input {
|
||||
height: 30px;
|
||||
width: 160px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.plist-h .a-select {
|
||||
height: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.plist-h small,
|
||||
.sc2 h3 small {
|
||||
font-size: 11px;
|
||||
color: var(--tx-2);
|
||||
font-weight: 400;
|
||||
}
|
||||
.studio-filters {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
padding: 2px;
|
||||
background: var(--well);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.studio-filters button {
|
||||
background: none;
|
||||
border: 0;
|
||||
color: var(--tx-2);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.studio-filters button.on {
|
||||
background: var(--bg-3);
|
||||
color: var(--tx-1);
|
||||
}
|
||||
.newp {
|
||||
border: 1px dashed var(--line-2);
|
||||
border-radius: 12px;
|
||||
min-height: 180px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: none;
|
||||
color: var(--tx-3);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.outs2 a {
|
||||
position: relative;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
.outs2 img,
|
||||
.outs2 video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.cf2 .a-btn {
|
||||
grid-row: 1/3;
|
||||
grid-column: 2;
|
||||
}
|
||||
.studio-job {
|
||||
padding: 5px 4px;
|
||||
}
|
||||
.job-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.job-name > span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
}
|
||||
.job-name small,
|
||||
.studio-job > small {
|
||||
color: var(--tx-2);
|
||||
font-size: 10.5px;
|
||||
}
|
||||
.st2 .empty-card {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.st2 :is(h2, h3, p) {
|
||||
margin: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user