feat(HEL-730): reshape management pages and preserve workflow tools
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
* real queue and connection status. Individual tools keep their routes. */
|
||||
interface Props {
|
||||
workspace?: boolean;
|
||||
pageHeader?: import("svelte").Snippet;
|
||||
active: NavId;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
@@ -30,7 +31,13 @@
|
||||
children?: import("svelte").Snippet;
|
||||
}
|
||||
|
||||
let { title, actions, children, workspace = false }: Props = $props();
|
||||
let {
|
||||
title,
|
||||
actions,
|
||||
children,
|
||||
pageHeader,
|
||||
workspace = false,
|
||||
}: Props = $props();
|
||||
|
||||
let paletteOpen = $state(false);
|
||||
|
||||
@@ -258,52 +265,57 @@
|
||||
>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="app-body">
|
||||
<header class="topbar">
|
||||
<div class="breadcrumb">
|
||||
{currentNav?.label ?? title}<span>/</span><span class="page-name"
|
||||
>{title}</span
|
||||
<div
|
||||
class="app-body"
|
||||
style:background={pageHeader ? "var(--manage-page-background)" : undefined}
|
||||
>
|
||||
{#if pageHeader}{@render pageHeader()}{:else}
|
||||
<header class="topbar">
|
||||
<div class="breadcrumb">
|
||||
{currentNav?.label ?? title}<span>/</span><span class="page-name"
|
||||
>{title}</span
|
||||
>
|
||||
</div>
|
||||
<div class="grow"></div>
|
||||
{#if currentNav?.id === "connections"}
|
||||
<a
|
||||
class="a-btn secondary sm"
|
||||
href="/connections"
|
||||
aria-current={page.url.pathname === "/connections"
|
||||
? "page"
|
||||
: undefined}>ComfyUI 连接</a
|
||||
>
|
||||
<a
|
||||
class="a-btn secondary sm"
|
||||
href="/models"
|
||||
aria-current={page.url.pathname === "/models" ? "page" : undefined}
|
||||
>大语言模型</a
|
||||
>
|
||||
{/if}
|
||||
{#if scopeProjectId}<ProjectScope
|
||||
projectId={scopeProjectId}
|
||||
onProjectsList={false}
|
||||
/>{/if}
|
||||
{#if actions}<div class="topbar-actions">{@render actions()}</div>{/if}
|
||||
<button
|
||||
class="search-trigger"
|
||||
onclick={openPalette}
|
||||
aria-label={t("shell.searchTitle")}
|
||||
aria-keyshortcuts="Control+K Meta+K"
|
||||
><Icon name="search" size={16} /><span>搜索</span><kbd>Ctrl K</kbd
|
||||
></button
|
||||
>
|
||||
</div>
|
||||
<div class="grow"></div>
|
||||
{#if currentNav?.id === "connections"}
|
||||
<a
|
||||
class="a-btn secondary sm"
|
||||
href="/connections"
|
||||
aria-current={page.url.pathname === "/connections"
|
||||
? "page"
|
||||
: undefined}>ComfyUI 连接</a
|
||||
<label class="motion"
|
||||
><Switch
|
||||
checked={reduceMotion.system || reduceMotion.manual}
|
||||
disabled={reduceMotion.system}
|
||||
label={t("shell.reduceMotion")}
|
||||
onchange={setReduceMotion}
|
||||
/><span>减少动效</span></label
|
||||
>
|
||||
<a
|
||||
class="a-btn secondary sm"
|
||||
href="/models"
|
||||
aria-current={page.url.pathname === "/models" ? "page" : undefined}
|
||||
>大语言模型</a
|
||||
>
|
||||
{/if}
|
||||
{#if scopeProjectId}<ProjectScope
|
||||
projectId={scopeProjectId}
|
||||
onProjectsList={false}
|
||||
/>{/if}
|
||||
{#if actions}<div class="topbar-actions">{@render actions()}</div>{/if}
|
||||
<button
|
||||
class="search-trigger"
|
||||
onclick={openPalette}
|
||||
aria-label={t("shell.searchTitle")}
|
||||
aria-keyshortcuts="Control+K Meta+K"
|
||||
><Icon name="search" size={16} /><span>搜索</span><kbd>Ctrl K</kbd
|
||||
></button
|
||||
>
|
||||
<label class="motion"
|
||||
><Switch
|
||||
checked={reduceMotion.system || reduceMotion.manual}
|
||||
disabled={reduceMotion.system}
|
||||
label={t("shell.reduceMotion")}
|
||||
onchange={setReduceMotion}
|
||||
/><span>减少动效</span></label
|
||||
>
|
||||
<LanguageSwitcher /><QueueTray jobs={genJobs} />
|
||||
</header>
|
||||
<LanguageSwitcher /><QueueTray jobs={genJobs} />
|
||||
</header>
|
||||
{/if}
|
||||
<div class="body" class:bounded={workspace}>{@render children?.()}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user