feat: 更新主题配置与系统设置
This commit is contained in:
1 parent
1555d5344b
commit
151ecceb85
12 files changed
+145
-27
No files matched your search
@@ -607,6 +607,27 @@ html.lightyellow .light-topnav-item--active::after {
|
||||
}
|
||||
|
||||
/* ── 侧边栏:二级图标卡片列(96px)+ 右侧三级列(展开时整体变宽,带过渡)──────── */
|
||||
/* Runtime themes use their configurable header gradient rather than the
|
||||
red/blue banner artwork. Navigation copy follows an automatically chosen
|
||||
contrasting foreground so both pale and deep brand colours remain legible. */
|
||||
html[data-custom-theme="true"] .light-topnav-item,
|
||||
html[data-custom-theme="true"] .top-submenu-item {
|
||||
color: var(--navigation-foreground);
|
||||
}
|
||||
|
||||
html[data-custom-theme="true"] .light-topnav-item:hover,
|
||||
html[data-custom-theme="true"] .light-topnav-item--active,
|
||||
html[data-custom-theme="true"] .light-topnav-item--active:hover,
|
||||
html[data-custom-theme="true"] .top-submenu-item:hover,
|
||||
html[data-custom-theme="true"] .top-submenu-item--active {
|
||||
color: var(--navigation-foreground);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
html[data-custom-theme="true"] .light-topnav-item--active::after {
|
||||
background: var(--navigation-foreground);
|
||||
}
|
||||
|
||||
.light-sidebar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
||||
@@ -26,7 +26,7 @@ import { buildLightAppUrl } from "@/strategy-components/lib/light-app";
|
||||
* - "banner-dark" / "banner-light":Header 落在主题 banner 上(白字 / 浅色 hover)。
|
||||
* - "content":简洁模式聊天页浅底顶栏,走 foreground / muted-foreground。
|
||||
*/
|
||||
export type AppearanceControlTone = "banner-dark" | "banner-light" | "content";
|
||||
export type AppearanceControlTone = "banner-dark" | "banner-light" | "banner-custom" | "content";
|
||||
|
||||
// 换肤色板:红色=红白主题(light),蓝色=浅蓝主题(lightblue),冰川蓝=柔和浅蓝主题(iceblue),浅黄色=柔和黄主题(lightyellow),深蓝色=深色主题(dark)
|
||||
export const THEME_SWATCHES: { id: ThemeType; label: string; color: string }[] = [
|
||||
@@ -43,6 +43,8 @@ const triggerToneClass = (tone: AppearanceControlTone) =>
|
||||
? "text-slate-400 hover:bg-slate-800/50 hover:text-slate-400"
|
||||
: tone === "banner-light"
|
||||
? "text-white hover:bg-[var(--brand-950)] hover:text-white active:bg-[#8a0618]"
|
||||
: tone === "banner-custom"
|
||||
? "text-[var(--navigation-foreground)] hover:bg-white/20 hover:text-[var(--navigation-foreground)] active:bg-white/30"
|
||||
: "text-muted-foreground hover:bg-muted hover:text-foreground";
|
||||
|
||||
export function CompactShortcutButtons({ tone }: { tone: AppearanceControlTone }) {
|
||||
|
||||
@@ -70,6 +70,18 @@ const ADVANCED_COLOR_FIELDS: Array<{
|
||||
description: "主按钮悬停时的背景色",
|
||||
token: "--theme-button-hover",
|
||||
},
|
||||
{
|
||||
key: "navigation_gradient_start",
|
||||
label: "导航渐变起点",
|
||||
description: "全量模式顶部导航栏左侧的渐变色",
|
||||
token: "--navigation-gradient-start",
|
||||
},
|
||||
{
|
||||
key: "navigation_gradient_end",
|
||||
label: "导航渐变终点",
|
||||
description: "全量模式顶部导航栏右侧的渐变色",
|
||||
token: "--navigation-gradient-end",
|
||||
},
|
||||
{
|
||||
key: "selected_background",
|
||||
label: "选中背景",
|
||||
@@ -268,14 +280,20 @@ function CustomThemePreview({ theme }: { theme: CustomThemePreset }) {
|
||||
style={tokens}
|
||||
aria-label={`${theme.name} 的颜色预览`}
|
||||
>
|
||||
<div className="flex items-center gap-2 border-b border-[var(--border)] bg-[var(--background)] px-3 py-2">
|
||||
<div
|
||||
className="flex items-center gap-2 border-b border-[var(--border)] px-3 py-2"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"linear-gradient(105deg, var(--navigation-gradient-start) 0%, var(--primary) 52%, var(--navigation-gradient-end) 100%)",
|
||||
}}
|
||||
>
|
||||
<span
|
||||
className="flex size-5 items-center justify-center rounded-md bg-[var(--primary)] text-[10px] font-bold text-[var(--primary-foreground)] ring-2 ring-[var(--ring)]"
|
||||
className="flex size-5 items-center justify-center rounded-md bg-white/25 text-[10px] font-bold text-[var(--navigation-foreground)] ring-2 ring-white/35"
|
||||
aria-hidden
|
||||
>
|
||||
C
|
||||
</span>
|
||||
<span className="text-xs font-semibold text-[var(--foreground)]">
|
||||
<span className="text-xs font-semibold text-[var(--navigation-foreground)]">
|
||||
实时预览
|
||||
</span>
|
||||
<span
|
||||
|
||||
Reference in new issue
Block a user