功能:完善自定义主题与独立登录会话

This commit is contained in:
董宏凯 committed 2026-07-26 18:19:50 +08:00
1 parent 3779bb69ef
commit f1e53ef5c0
23 files changed
+1742 -196

No files matched your search

+114
View File
@@ -1845,3 +1845,117 @@ html.lightyellow .gq-history-item--active .bg-primary {
.lightyellow .bg-primary\/70 { background-color: rgba(243, 251, 217, 0.70); }
.lightyellow .bg-primary\/90 { background-color: rgba(243, 251, 217, 0.90); }
}
/* Runtime-created themes deliberately use semantic variables rather than a
generated class per colour. These compatibility rules keep the selected,
hovered and compact-navigation states readable on Chrome 109 as well. */
html[data-custom-theme="true"] .agent-avatar {
background-color: var(--accent);
color: var(--accent-foreground);
box-shadow: inset 0 0 0 1px rgb(var(--legacy-workspace-brand-rgb) / 0.2);
}
html[data-custom-theme="true"] .agent-sidebar-card--active,
html[data-custom-theme="true"] .gq-sidebar .agent-sidebar-card--active,
html[data-custom-theme="true"] .gq-history-item--active {
border-color: rgb(var(--legacy-workspace-brand-rgb) / 0.52) !important;
background-color: var(--accent) !important;
color: var(--accent-foreground) !important;
}
html[data-custom-theme="true"] .workspace-compact-new-chat,
html[data-custom-theme="true"] .workspace-nav-new-chat {
border-color: rgb(var(--legacy-workspace-brand-rgb) / 0.38) !important;
color: var(--accent-foreground) !important;
}
html[data-custom-theme="true"] .workspace-compact-new-chat :is(svg, span),
html[data-custom-theme="true"] .workspace-nav-new-chat :is(svg, span),
html[data-custom-theme="true"] .workspace-nav-item:hover :is(svg, span),
html[data-custom-theme="true"] .workspace-nav-item[data-active="true"] :is(svg, span),
html[data-custom-theme="true"] .gq-history-item--active :is(svg, span),
html[data-custom-theme="true"] .gq-sidebar .agent-sidebar-card--active .text-primary {
color: var(--accent-foreground) !important;
}
html[data-custom-theme="true"] .workspace-compact-new-chat:hover,
html[data-custom-theme="true"] .workspace-compact-new-chat[data-active="true"],
html[data-custom-theme="true"] .workspace-nav-new-chat:hover,
html[data-custom-theme="true"] .workspace-nav-new-chat[data-active="true"],
html[data-custom-theme="true"] .workspace-nav-item:hover,
html[data-custom-theme="true"] .workspace-nav-item[data-active="true"] {
border-color: rgb(var(--legacy-workspace-brand-rgb) / 0.6) !important;
background-color: var(--accent) !important;
color: var(--accent-foreground) !important;
box-shadow: inset 3px 0 0 var(--brand-900);
}
html[data-custom-theme="true"] .gq-new-chat-button {
border-color: var(--brand-900) !important;
background-color: var(--accent) !important;
color: var(--accent-foreground) !important;
}
html[data-custom-theme="true"] .gq-new-chat-button:hover {
background-color: var(--theme-button-hover) !important;
}
/* The shared primary Button uses Tailwind's hover:bg-primary/90 utility.
Let a custom theme's optional button-hover override reach those buttons
too, without changing the fixed built-in theme palettes. */
html[data-custom-theme="true"] [class~="hover:bg-primary/90"]:hover {
background-color: var(--theme-button-hover) !important;
}
/* Keep the user-selected primary button text local to actions. Brand marks,
badges and other non-button primary surfaces retain their automatic, legible
foreground. */
html[data-custom-theme="true"] :is(button, a)[class~="bg-primary"] {
color: var(--button-foreground, var(--primary-foreground)) !important;
}
/* Scoped brand-title styling: built-in themes continue using their existing
title classes, while custom themes can tune the icon-adjacent headings. */
html[data-custom-theme="true"] .theme-brand-title {
color: var(--brand-title-foreground) !important;
}
/* The destructive token intentionally has its own advanced setting. */
html[data-custom-theme="true"] [class~="hover:bg-destructive/90"]:hover {
background-color: rgb(var(--legacy-destructive-rgb) / 0.9) !important;
}
html[data-custom-theme="true"] .gq-sidebar .agent-sidebar-card--active .bg-primary,
html[data-custom-theme="true"] .gq-history-item--active .bg-primary {
background-color: var(--brand-900) !important;
}
@supports not (color: oklch(1 0 0)) {
html[data-custom-theme="true"] .bg-primary\/5 { background-color: rgb(var(--legacy-primary-rgb) / 0.05); }
html[data-custom-theme="true"] .bg-primary\/8 { background-color: rgb(var(--legacy-primary-rgb) / 0.08); }
html[data-custom-theme="true"] .bg-primary\/10 { background-color: rgb(var(--legacy-primary-rgb) / 0.10); }
html[data-custom-theme="true"] .bg-primary\/14 { background-color: rgb(var(--legacy-primary-rgb) / 0.14); }
html[data-custom-theme="true"] .bg-primary\/15 { background-color: rgb(var(--legacy-primary-rgb) / 0.15); }
html[data-custom-theme="true"] .bg-primary\/20 { background-color: rgb(var(--legacy-primary-rgb) / 0.20); }
html[data-custom-theme="true"] .bg-primary\/25 { background-color: rgb(var(--legacy-primary-rgb) / 0.25); }
html[data-custom-theme="true"] .bg-primary\/30 { background-color: rgb(var(--legacy-primary-rgb) / 0.30); }
html[data-custom-theme="true"] .bg-primary\/60 { background-color: rgb(var(--legacy-primary-rgb) / 0.60); }
html[data-custom-theme="true"] .bg-primary\/70 { background-color: rgb(var(--legacy-primary-rgb) / 0.70); }
html[data-custom-theme="true"] .bg-primary\/90 { background-color: rgb(var(--legacy-primary-rgb) / 0.90); }
html[data-custom-theme="true"] .bg-destructive\/5 { background-color: rgb(var(--legacy-destructive-rgb) / 0.05); }
html[data-custom-theme="true"] .border-destructive\/30 { border-color: rgb(var(--legacy-destructive-rgb) / 0.30); }
html[data-custom-theme="true"] .border-primary\/15 { border-color: rgb(var(--legacy-primary-rgb) / 0.15); }
html[data-custom-theme="true"] .border-primary\/20 { border-color: rgb(var(--legacy-primary-rgb) / 0.20); }
html[data-custom-theme="true"] .border-primary\/25 { border-color: rgb(var(--legacy-primary-rgb) / 0.25); }
html[data-custom-theme="true"] .border-primary\/30 { border-color: rgb(var(--legacy-primary-rgb) / 0.30); }
html[data-custom-theme="true"] .border-primary\/35 { border-color: rgb(var(--legacy-primary-rgb) / 0.35); }
html[data-custom-theme="true"] .border-primary\/40 { border-color: rgb(var(--legacy-primary-rgb) / 0.40); }
html[data-custom-theme="true"] .border-primary\/50 { border-color: rgb(var(--legacy-primary-rgb) / 0.50); }
html[data-custom-theme="true"] .border-primary\/60 { border-color: rgb(var(--legacy-primary-rgb) / 0.60); }
html[data-custom-theme="true"] .ring-primary\/15 { --tw-ring-color: rgb(var(--legacy-primary-rgb) / 0.15); }
html[data-custom-theme="true"] .ring-primary\/20 { --tw-ring-color: rgb(var(--legacy-primary-rgb) / 0.20); }
html[data-custom-theme="true"] .ring-primary\/30 { --tw-ring-color: rgb(var(--legacy-primary-rgb) / 0.30); }
html[data-custom-theme="true"] .ring-primary\/40 { --tw-ring-color: rgb(var(--legacy-primary-rgb) / 0.40); }
html[data-custom-theme="true"] .ring-primary\/50 { --tw-ring-color: rgb(var(--legacy-primary-rgb) / 0.50); }
html[data-custom-theme="true"] .ring-primary\/60 { --tw-ring-color: rgb(var(--legacy-primary-rgb) / 0.60); }
}