feat(ui): add light theme with system auto-switch + Cyrene avatar
- Miuix day/night dual theme CSS variables - themeStore: light default, follows prefers-color-scheme - Header: sun/moon toggle button - All components migrated to CSS variables - Cyrene avatar image replaces 'C' logo everywhere - Favicon added
This commit is contained in:
1 parent
78c5f0f1b0
commit
5faa955bce
24 files changed
+337
-218
No files matched your search
@@ -34,13 +34,13 @@ export default function LLMCallsPage() {
|
||||
</div>
|
||||
|
||||
{/* Calls table */}
|
||||
<div className="bg-[#000] rounded-[18px] border border-[#404040] overflow-hidden">
|
||||
<div className="bg-[var(--mx-surface)] rounded-[18px] border border-[var(--mx-outline)] overflow-hidden">
|
||||
{calls.length === 0 ? (
|
||||
<div className="p-8 text-center text-white/30 text-sm">暂无 LLM 调用记录</div>
|
||||
<div className="p-8 text-center text-[var(--mx-text-dim)] text-sm">暂无 LLM 调用记录</div>
|
||||
) : (
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
<tr className="border-b border-[#393939] text-white/40 text-xs">
|
||||
<tr className="border-b border-[var(--mx-divider)] text-[var(--mx-text-dim)] text-xs">
|
||||
<th className="text-left px-4 py-2 font-normal">时间</th>
|
||||
<th className="text-left px-4 py-2 font-normal">模型</th>
|
||||
<th className="text-left px-4 py-2 font-normal">用途</th>
|
||||
@@ -51,16 +51,16 @@ export default function LLMCallsPage() {
|
||||
</thead>
|
||||
<tbody>
|
||||
{calls.map((c, i) => (
|
||||
<tr key={c.id || i} className="border-b border-[#393939]/50">
|
||||
<td className="px-4 py-2.5 text-white/50 text-xs font-mono">{c.time?.slice(11,19) || '-'}</td>
|
||||
<td className="px-4 py-2.5 text-[#F2F2F2]">{c.model || '-'}</td>
|
||||
<td className="px-4 py-2.5 text-white/50 text-xs">
|
||||
<span className="px-1.5 py-0.5 rounded bg-[#2B3B54]/50 text-[#4788FF]">{c.purpose || '-'}</span>
|
||||
<tr key={c.id || i} className="border-b border-[var(--mx-divider)]/50">
|
||||
<td className="px-4 py-2.5 text-[var(--mx-text-dim)] text-xs font-mono">{c.time?.slice(11,19) || '-'}</td>
|
||||
<td className="px-4 py-2.5 text-[var(--mx-text)]">{c.model || '-'}</td>
|
||||
<td className="px-4 py-2.5 text-[var(--mx-text-dim)] text-xs">
|
||||
<span className="px-1.5 py-0.5 rounded bg-[var(--mx-badge-blue)]/50 text-[var(--mx-tertiary-text)]">{c.purpose || '-'}</span>
|
||||
</td>
|
||||
<td className="px-4 py-2.5 text-white/50 text-xs text-right">{c.duration_ms}ms</td>
|
||||
<td className="px-4 py-2.5 text-white/50 text-xs text-right">{(c.prompt_tokens||0)+(c.completion_tokens||0)}</td>
|
||||
<td className="px-4 py-2.5 text-[var(--mx-text-dim)] text-xs text-right">{c.duration_ms}ms</td>
|
||||
<td className="px-4 py-2.5 text-[var(--mx-text-dim)] text-xs text-right">{(c.prompt_tokens||0)+(c.completion_tokens||0)}</td>
|
||||
<td className="px-4 py-2.5 text-center">
|
||||
<span className={`text-xs ${c.success ? 'text-[#4788FF]' : 'text-[#F12522]'}`}>
|
||||
<span className={`text-xs ${c.success ? 'text-[var(--mx-tertiary-text)]' : 'text-[var(--mx-error)]'}`}>
|
||||
{c.success ? '✓' : '✗'}
|
||||
</span>
|
||||
</td>
|
||||
@@ -76,9 +76,9 @@ export default function LLMCallsPage() {
|
||||
|
||||
function MiniStat({ label, value }: { label:string; value:string|number }) {
|
||||
return (
|
||||
<div className="bg-[#000] border border-[#404040] rounded-[18px] px-4 py-3">
|
||||
<p className="text-xs text-white/40 mb-1">{label}</p>
|
||||
<p className="text-lg font-bold text-[#F2F2F2]">{value}</p>
|
||||
<div className="bg-[var(--mx-surface)] border border-[var(--mx-outline)] rounded-[18px] px-4 py-3">
|
||||
<p className="text-xs text-[var(--mx-text-dim)] mb-1">{label}</p>
|
||||
<p className="text-lg font-bold text-[var(--mx-text)]">{value}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user