HEL-733: align approved motion and audit remaining sample gaps
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -17,11 +17,14 @@
|
||||
import { storageGet, storageSet } from "$lib/storage";
|
||||
import Modal from "$lib/components/ui/Modal.svelte";
|
||||
import ThemeChoices from "./ThemeChoices.svelte";
|
||||
import { themeStorageUnavailable } from "$lib/theme";
|
||||
|
||||
/** Desktop studio shell: six named sections, project scope, search,
|
||||
* real queue and connection status. Individual tools keep their routes. */
|
||||
interface Props {
|
||||
workspace?: boolean;
|
||||
/** The workspace supplies its own full-height header (creative desk). */
|
||||
hideHeader?: boolean;
|
||||
pageHeader?: import("svelte").Snippet<[{ openSearch: () => void }]>;
|
||||
active: NavId;
|
||||
title: string;
|
||||
@@ -37,6 +40,7 @@
|
||||
children,
|
||||
pageHeader,
|
||||
workspace = false,
|
||||
hideHeader = false,
|
||||
}: Props = $props();
|
||||
|
||||
let paletteOpen = $state(false);
|
||||
@@ -282,7 +286,9 @@
|
||||
class="app-body"
|
||||
style:background={pageHeader ? "var(--manage-page-background)" : undefined}
|
||||
>
|
||||
{#if pageHeader}{@render pageHeader({ openSearch: openPalette })}{:else}
|
||||
{#if pageHeader}{@render pageHeader({
|
||||
openSearch: openPalette,
|
||||
})}{:else if !hideHeader}
|
||||
<header class="topbar">
|
||||
<div class="breadcrumb">
|
||||
{currentNav?.label ?? title}<span>/</span><span class="page-name"
|
||||
@@ -333,16 +339,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<CommandPalette bind:open={paletteOpen} />
|
||||
<Modal bind:open={themeOpen} title="外观主题">
|
||||
<Modal bind:open={themeOpen} title="界面主题" rail>
|
||||
{#snippet headerActions()}<span class="theme-subtitle">同一布局与功能,只换灯光</span>{/snippet}
|
||||
<ThemeChoices compact />
|
||||
<label class="theme-motion"
|
||||
><Switch
|
||||
checked={reduceMotion.system || reduceMotion.manual}
|
||||
{#snippet footer()}
|
||||
<div class="theme-motion"><span class="theme-foot-note" role="status"><Icon name={$themeStorageUnavailable ? "close" : "check"} size={18} />{$themeStorageUnavailable ? "浏览器禁止本地存储:本次有效,其他操作不受影响" : "已记住,下次打开沿用 · 正在编辑的内容不受影响"}</span><button class="a-btn secondary sm"
|
||||
disabled={reduceMotion.system}
|
||||
label={t("shell.reduceMotion")}
|
||||
onchange={setReduceMotion}
|
||||
/><span>减少动效</span></label
|
||||
>
|
||||
onclick={() => setReduceMotion(!reduceMotion.manual)}
|
||||
aria-pressed={!reduceMotion.system && !reduceMotion.manual}
|
||||
><Icon name="motion" size={14} />{reduceMotion.system || reduceMotion.manual ? "动效关" : "动效开"}</button></div>
|
||||
{/snippet}
|
||||
</Modal>
|
||||
|
||||
<style>
|
||||
@@ -358,15 +364,20 @@
|
||||
);
|
||||
box-shadow: 0 0 0 1px var(--line-3);
|
||||
}
|
||||
.theme-subtitle { font-size: var(--theme-pop-note-size); color: var(--tx-3); }
|
||||
.theme-foot-note { display: flex; align-items: center; gap: var(--theme-pop-footer-gap); }
|
||||
.theme-motion {
|
||||
--button-sm-height: var(--theme-pop-button-height);
|
||||
--button-sm-padding: var(--theme-pop-button-padding);
|
||||
--button-sm-font-size: var(--theme-pop-button-size);
|
||||
--button-sm-radius: var(--theme-pop-button-radius);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid var(--line);
|
||||
font-size: 12px;
|
||||
color: var(--tx-2);
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
gap: var(--theme-pop-footer-gap);
|
||||
font-size: var(--theme-pop-note-size);
|
||||
color: var(--tx-3);
|
||||
}
|
||||
.nav-item[aria-current="page"] :global(svg) {
|
||||
color: var(--nav-c, var(--gold));
|
||||
@@ -385,7 +396,7 @@
|
||||
grid-template-columns: var(--rail-expanded-width) minmax(0, 1fr);
|
||||
}
|
||||
.sidebar {
|
||||
background: var(--bg-1);
|
||||
background: var(--rail-background);
|
||||
border-right: 1px solid var(--line);
|
||||
--icon-stroke: var(--manage-icon-stroke);
|
||||
padding: var(--rail-padding);
|
||||
@@ -560,6 +571,7 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
.app-body {
|
||||
animation: a-page-enter var(--t-slow) var(--ease-out);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
|
||||
Reference in New Issue
Block a user