fix(HEL-730): align media header and connection add card

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-22 01:26:21 +08:00
co-authored by multica-agent
parent 0f4d6a8961
commit 03bebec94a
6 changed files with 25 additions and 23 deletions
@@ -494,7 +494,7 @@
{/each}
<CloudModels />
<button class="mg-card pending mg-add" onclick={startAdd}
><Icon name="plus" size={24} />添加连接</button
><Icon name="plus" size={22} />添加连接</button
>
</div>{/if}
<Modal
@@ -581,7 +581,7 @@
>
</div>
</article>{/each}<button class="mg-card pending mg-add" onclick={startAdd}
><Icon name="plus" size={24} />添加大语言模型</button
><Icon name="plus" size={22} />添加大语言模型</button
>
<div class="model-assignments">
<section class="mg-field">
@@ -9,7 +9,9 @@
tools,
actions,
children,
scene = "manage",
}: {
scene?: "manage" | "gold";
title: string;
active: NavId;
tools?: Snippet;
@@ -20,12 +22,19 @@
<AppShell {title} {active} workspace>
{#snippet pageHeader()}
<header class="management-header">
<header
class="management-header"
style:--scene={scene === "gold" ? "var(--gold)" : "var(--sc-manage)"}
>
<b>{title}</b>{@render tools?.()}<span class="mg-grow"
></span>{@render actions?.()}
</header>
{/snippet}
<section class="management-page" aria-label={title}>
<section
class="management-page"
aria-label={title}
style:--scene={scene === "gold" ? "var(--gold)" : "var(--sc-manage)"}
>
{@render children()}
</section>
</AppShell>
@@ -46,7 +46,6 @@
--button-primary-padding: 12px;
--button-primary-radius: var(--manage-control-radius);
--button-secondary-radius: var(--manage-button-radius);
--scene: var(--sc-manage);
display: flex;
flex-direction: column;
height: 100%;
@@ -428,9 +427,9 @@
background: transparent;
}
.mg-add {
min-height: 160px;
align-items: center;
justify-content: center;
min-height: var(--manage-add-min-height);
display: grid;
place-items: center;
color: var(--tx-3);
cursor: pointer;
font: inherit;
+8 -15
View File
@@ -139,7 +139,7 @@
}
</script>
<ManagementPage active="library" title="素材库">
<ManagementPage active="library" title="素材库" scene="gold">
{#snippet tools()}<div class="mg-seg asset-tabs" aria-label="素材类型">
{#each [["all", "全部"], ["image", "图片"], ["video", "视频"]] as [value, label]}<button
class:on={filter === value}
@@ -148,20 +148,19 @@
>{/each}<button disabled title="当前素材接口不提供音频索引">音频</button
><button disabled title="当前素材接口不提供项目归属信息">未归属</button>
</div>{/snippet}
{#snippet actions()}<span class="mg-tag" title="当前素材索引没有项目归属信息"
>项目:全部</span
{#snippet actions()}
<span class="mg-dim">{filtered.length} 项素材</span><label class="mg-dim"
><input type="checkbox" checked={allSelected} onchange={toggleAll} />
{allSelected ? t("library.deselectAll") : t("library.selectAll")}</label
>
<span class="mg-tag" title="当前素材索引没有项目归属信息">项目:全部</span
>{#if selectedCount}<Button
size="sm"
variant="danger"
onclick={() => (confirmingDelete = true)}
>删除已选 {selectedCount} 项</Button
>{/if}{/snippet}
<div class="asset-tools">
<span class="mg-dim">{filtered.length} 项素材</span><label class="mg-dim"
><input type="checkbox" checked={allSelected} onchange={toggleAll} />
{allSelected ? t("library.deselectAll") : t("library.selectAll")}</label
>
</div>
{#if $mediaQuery.isLoading}<p class="mg-empty">
正在读取素材…
</p>{:else if $mediaQuery.isError}<div class="mg-empty" role="alert">
@@ -242,12 +241,6 @@
width: 300px;
margin-left: 12px;
}
.asset-tools {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
}
.asset-card {
background: var(--bg-1);
}