update UI

This commit is contained in:
sophie committed 2026-05-27 16:44:21 +08:00
1 parent 0c6f1c0ffc
commit 0c5939ed7a
7 files changed
+218 -61

No files matched your search

+83 -27
View File
@@ -32,6 +32,53 @@
.select-field-ds { @apply select-field; }
/* 顶栏语言图标 — 无圆圈,与 theme-toggle-btn--inline 同占位对齐 */
.header-locale-btn {
@apply flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border-0 bg-transparent p-0 text-muted shadow-none transition-colors hover:text-primary;
}
.header-locale-btn:focus-visible {
outline: none;
box-shadow: 0 0 0 2px var(--focus-ring);
border-radius: 0.5rem;
}
@media (min-width: 768px) {
.header-locale-btn {
@apply h-9 w-9;
}
}
.header-locale-btn--floating {
@apply fixed bottom-5 right-5 z-[70] h-11 w-11 rounded-full;
}
/* 顶栏语言图标 — 下拉菜单 */
.header-locale-menu {
@apply absolute right-0 top-full z-[60] mt-1.5 min-w-[9.5rem] overflow-hidden rounded-xl border border-default py-1 shadow-elevated;
background-color: var(--bg-surface);
}
.header-locale-menu--sidebar {
@apply bottom-full top-auto right-0 left-auto mb-1.5 mt-0;
}
.header-locale-menu__item {
@apply flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm font-medium text-secondary transition-colors;
}
.header-locale-menu__item:hover {
@apply bg-surface-soft text-primary;
}
.header-locale-menu__item--active {
@apply bg-brand-50 text-brand-700;
}
html.dark .header-locale-menu__item--active {
@apply bg-brand-950/40 text-brand-300;
}
.card-ds { @apply card; }
.card-ds-interactive {
@@ -539,61 +586,70 @@
@apply w-5 h-5 cursor-pointer rounded border-default text-blue-600 focus:ring-blue-500;
}
/* Segment control — toggle / single-choice (not action buttons) */
/* Segment control — 与个人中心「主题」切换同款(细边框 + brand 选中态) */
.segment-control {
@apply inline-flex max-w-full flex-wrap gap-2;
@apply grid w-full gap-2;
}
/* 2–3 个短选项:独立细边框芯片 */
.segment-control--chips {
@apply gap-2;
.segment-control--cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* 等分宽、独立细边框(如 Cron 四选一)— 无共用轨道 */
.segment-control--chips-equal {
@apply flex w-full flex-nowrap gap-2;
.segment-control--cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.segment-control--chips-equal .segment-item {
@apply min-w-0 flex-1 justify-center text-center;
.segment-control--cols-4 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
.segment-control--cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
/* 工具栏内 2 个短标签(如 数据库直联 | 外部 API) */
.segment-control--fit {
@apply inline-grid w-auto;
grid-template-columns: repeat(2, max-content);
}
.segment-control--fit .segment-item {
@apply w-auto;
}
.segment-item {
@apply shrink-0 cursor-pointer whitespace-nowrap rounded-xl border px-3 py-2 text-sm font-semibold transition-colors duration-200;
color: var(--text-secondary);
background-color: var(--bg-surface);
border-color: var(--border-default);
box-shadow: none;
@apply w-full cursor-pointer whitespace-nowrap rounded-xl border border-default bg-surface px-3 py-3 text-center text-sm font-medium text-secondary transition-colors;
}
.segment-item:hover:not(.segment-item--active) {
color: var(--text-primary);
background-color: var(--bg-surface-soft);
.segment-item:hover:not(:disabled):not(.segment-item--active) {
@apply bg-surface-soft text-primary;
}
.segment-item--active {
color: #0284c7;
background-color: color-mix(in srgb, #0ea5e9 12%, var(--bg-surface));
border-color: color-mix(in srgb, #0ea5e9 38%, var(--border-default));
@apply border-brand-500 bg-brand-50 text-brand-700;
}
html.dark .segment-item--active {
color: #7dd3fc;
background-color: color-mix(in srgb, #0ea5e9 20%, var(--bg-surface));
border-color: color-mix(in srgb, #38bdf8 45%, var(--border-default));
@apply border-brand-400 bg-brand-950/50 text-brand-300;
}
.segment-item:disabled {
@apply cursor-not-allowed opacity-60;
}
.segment-control--sm .segment-item {
@apply px-3 py-1.5 text-xs;
@apply px-3 py-2 text-xs;
}
.segment-control--md .segment-item {
@apply px-4 py-2.5 text-sm;
@apply px-3 py-3 text-sm;
}
/* @deprecated — use .segment-control + .segment-item */
.btn-segment-group {
@apply segment-control segment-control--chips segment-control--sm;
@apply segment-control segment-control--cols-2 segment-control--sm;
}
.btn-segment-group .btn-segment {