Skip to content

Commit ceeb0cd

Browse files
committed
chore: polish dashboard styling
1 parent 20a5b5a commit ceeb0cd

7 files changed

Lines changed: 84 additions & 19 deletions

File tree

dashboard/src/components/CodeEditor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function CodeEditorFallback({
2626
}: Pick<CodeEditorProps, 'height' | 'minHeight' | 'maxHeight' | 'className'>) {
2727
return (
2828
<div
29+
data-dashboard-code-editor="true"
2930
className={`bg-muted animate-pulse rounded-md border ${className}`}
3031
style={{ height, minHeight, maxHeight }}
3132
/>

dashboard/src/components/CodeEditorImpl.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export default function CodeEditorImpl({
6363
const effectiveTheme = theme ?? resolvedTheme
6464

6565
return (
66-
<div className={`custom-scrollbar overflow-hidden rounded-md border ${className}`}>
66+
<div
67+
data-dashboard-code-editor="true"
68+
className={`custom-scrollbar overflow-hidden rounded-md border ${className}`}
69+
>
6770
<CodeMirror
6871
value={value}
6972
height={height}

dashboard/src/components/layout/LogoArea.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface LogoAreaProps {
77

88
export function LogoArea({ sidebarOpen }: LogoAreaProps) {
99
return (
10-
<div className="flex h-20 items-center border-b px-4">
10+
<div data-dashboard-logo-area="true" className="flex h-20 items-center border-b px-4">
1111
<div
1212
className={cn(
1313
'relative flex items-center justify-center flex-1 transition-all overflow-hidden',
@@ -21,7 +21,10 @@ export function LogoArea({ sidebarOpen }: LogoAreaProps) {
2121
"flex min-w-0 flex-col items-start justify-center gap-1",
2222
!sidebarOpen && "lg:hidden"
2323
)}>
24-
<span className="max-w-full truncate whitespace-nowrap text-xl font-bold text-primary-gradient">
24+
<span
25+
data-dashboard-logo-title="true"
26+
className="max-w-full truncate whitespace-nowrap text-xl font-bold text-primary-gradient"
27+
>
2528
MaiBot WebUI
2629
</span>
2730
<div className="flex max-w-full items-center gap-2 overflow-hidden">

dashboard/src/i18n/locales/zh.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -738,19 +738,19 @@
738738
"restart": {
739739
"preparing": "准备重启",
740740
"preparingDesc": "正在发送重启请求...",
741-
"preparingTip": "🔄 正在准备重启麦麦...",
741+
"preparingTip": "正在准备重启麦麦...",
742742
"restarting": "正在重启麦麦",
743743
"restartingDesc": "请稍候,麦麦正在重启中...",
744-
"restartingTip": "🔄 配置已保存,正在重启主程序...",
744+
"restartingTip": "配置已保存,正在重启主程序...",
745745
"checking": "检查服务状态",
746746
"checkingDesc": "等待服务恢复... ({{current}}/{{max}})",
747747
"checkingTip": "重启中,请勿关闭页面...",
748748
"success": "重启成功",
749749
"successDesc": "正在跳转到登录页面...",
750-
"successTip": "配置已生效,服务运行正常",
750+
"successTip": "配置已生效,服务运行正常",
751751
"failed": "重启超时",
752752
"failedDesc": "服务未能在预期时间内恢复",
753-
"failedTip": "⚠️ 如果长时间无响应,请尝试手动重启",
753+
"failedTip": "如果长时间无响应,请尝试手动重启",
754754
"refreshPage": "刷新页面",
755755
"retryCheck": "重试检测",
756756
"elapsed": "已用时:"
@@ -816,8 +816,8 @@
816816
"navigatedTo": "已导航至 {{page}}"
817817
},
818818
"home": {
819-
"title": "实时监控面板",
820-
"subtitle": "麦麦运行状态和统计数据一览",
819+
"title": "首页",
820+
"subtitle": "观看基本信息和快捷入口",
821821
"loading": "Thinking...",
822822
"loadingHint": "Thinking...",
823823
"timeRange": {
@@ -843,7 +843,7 @@
843843
},
844844
"survey": {
845845
"title": "反馈问卷",
846-
"description": "帮助我们改进产品体验",
846+
"description": "帮助我们改进麦麦体验",
847847
"webui": "WebUI 反馈",
848848
"maibot": "麦麦反馈"
849849
},

dashboard/src/index.css

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,22 @@
495495
opacity: 1;
496496
}
497497

498-
:root[data-dashboard-style='future-retro'] [data-dashboard-sidebar='true'] .text-xl {
499-
font-size: 1.35rem;
498+
:root[data-dashboard-style='future-retro'] [data-dashboard-logo-area='true'] {
499+
padding-inline: 0.75rem !important;
500+
}
501+
502+
:root[data-dashboard-style='future-retro']
503+
[data-dashboard-logo-area='true']
504+
> div {
505+
justify-content: flex-start !important;
506+
}
507+
508+
:root[data-dashboard-style='future-retro'] [data-dashboard-logo-title='true'] {
509+
font-size: 1.28rem;
510+
font-weight: 900;
500511
line-height: 1.05;
512+
letter-spacing: 0;
513+
text-transform: uppercase;
501514
}
502515

503516
:root[data-dashboard-style='future-retro'] [data-dashboard-main='true'] h1 {
@@ -588,6 +601,51 @@
588601
color: var(--retro-ink) !important;
589602
}
590603

604+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] {
605+
border: var(--retro-stroke) solid var(--retro-line) !important;
606+
border-radius: 2px !important;
607+
background: var(--retro-recessed) !important;
608+
box-shadow: none !important;
609+
}
610+
611+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-editor {
612+
background: transparent !important;
613+
color: var(--retro-ink) !important;
614+
font-family: var(--typography-font-family-code) !important;
615+
}
616+
617+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-scroller,
618+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-content {
619+
background: transparent !important;
620+
font-family: var(--typography-font-family-code) !important;
621+
}
622+
623+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-gutters {
624+
border-right: var(--retro-stroke) solid var(--retro-line) !important;
625+
background: var(--retro-recessed-strong) !important;
626+
color: var(--retro-ink-soft) !important;
627+
}
628+
629+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-activeLine,
630+
:root[data-dashboard-style='future-retro']
631+
[data-dashboard-code-editor='true']
632+
.cm-activeLineGutter {
633+
background: color-mix(in srgb, var(--retro-gold) 18%, transparent) !important;
634+
}
635+
636+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-selectionBackground,
637+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-content ::selection {
638+
background: color-mix(in srgb, var(--retro-rust) 35%, transparent) !important;
639+
}
640+
641+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-cursor {
642+
border-left-color: var(--retro-rust) !important;
643+
}
644+
645+
:root[data-dashboard-style='future-retro'] [data-dashboard-code-editor='true'] .cm-placeholder {
646+
color: color-mix(in srgb, var(--retro-ink) 58%, transparent) !important;
647+
}
648+
591649
:root[data-dashboard-style='future-retro'] [data-dashboard-input='true']::placeholder,
592650
:root[data-dashboard-style='future-retro'] textarea::placeholder {
593651
color: color-mix(in srgb, var(--retro-ink) 58%, transparent);

dashboard/src/routes/resource/knowledge-base.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ export function KnowledgeBasePage() {
19861986
}
19871987

19881988
return (
1989-
<div className="flex h-full flex-col bg-gradient-to-b from-background via-background to-muted/15">
1989+
<div className="flex h-full flex-col bg-background">
19901990
<div className="flex-1 overflow-auto">
19911991
<div className="mx-auto flex w-full max-w-[1800px] flex-col gap-6 px-6 py-6">
19921992
<div>
@@ -2182,7 +2182,7 @@ export function KnowledgeBasePage() {
21822182
onValueChange={(value) => setActiveTab(value as typeof activeTab)}
21832183
className="space-y-5"
21842184
>
2185-
<div className="-mx-6 border-b border-border/40 bg-background/85 px-6 pb-2 pt-1 backdrop-blur supports-[backdrop-filter]:bg-background/70">
2185+
<div className="-mx-6 border-b border-border/40 px-6 pb-2 pt-1">
21862186
<div className="flex flex-wrap items-center gap-3">
21872187
<MemoryMiniTabs
21882188
items={[

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)