feat(admin-ui): 管理后台整体切换为浅色主题(ModernLight) + 新增 lightbulb 图标

1. layout(管理控制台 dashboard.vue): main bg-[#09090b] text-zinc-100 → bg-[#f8fafc] text-zinc-900; header bg-zinc-950/60 border-zinc-800 → bg-white/80 border-zinc-200; 移动菜单按钮/新手引导按钮 text-zinc-300/400 hover:bg-zinc-800 → text-zinc-600 hover:bg-zinc-100 border-zinc-200

2. Admin/Sidebar.vue: bg-[#09090b] border-zinc-800 → bg-white border-zinc-200 + shadow-sm; 标题 text-zinc-100 → 900; activeTab bg-blue-600/10 text-blue-400 → bg-blue-50 text-blue-700 border-blue-200; 未选中 text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800/40 → text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100; 用户卡 avatar/首字母 bg-white/70 border-zinc-200 + 退出按钮 hover:bg-red-50 text-red-600

3. 批量 33 个 Admin 组件硬编码深色原子类 1414 处替换(bg-zinc-9xx / border-zinc-8xx / text-zinc-100,200,300 / shadow-black/ -> 对应 light 版本) + style 块原生 CSS rgba(255,255,255,x) 16 处改为 rgba(0,0,0,x) / var 浅色主题 + 硬编码 bg-[#0c0c0e] / border-white/10 / color:white / surface-primary fallback 对应浅色修正

4. 二轮批量追加: bg-zinc-950 + opacity 变体(80/60/50/40/30/20/10) 共 431 处 → bg-white 对应 opacity 版本;placeholder:text-zinc-800 → 500;text-blue/red/emerald/amber/rose/purple 400 版 → 700/600 深浅一致版;border color /500 /30 → 200;focus:ring /20 → /30;shadow color 阴影降低强度

5. hover:text-white 扫尾: 13 处 DataAnalysisPanel/DatabaseManager/NotificationSender/SemesterManager/SongManagement/UserSongsModal hover 文本从 white → zinc-900;按钮三态从 hover:bg-*600 白字 → hover:bg-*-100/200 对应深字色,和前台 indigo/浅色体系保持一致

6. BlacklistManager 前台可见提示 💡→ <Icon lightbulb amber-600 size=13>;ChangelogManager 徽章色从 emerald-300/blue-300/zinc-400 → emerald-700/blue-700/zinc-600 可读;Icon.vue 新增 lightbulb 分支 stroke 图标

7. 受影响文件: dashboard.vue + Sidebar.vue + Icon.vue + Admin/* (33个组件共 1874 处批量替换 + 20 处手工精细化修正)
This commit is contained in:
2026-09-19 08:30:59 +08:00
parent 357876a716
commit 573e168702
36 changed files with 1023 additions and 1017 deletions
+23 -23
View File
@@ -3,14 +3,14 @@
class="flex flex-col space-y-8 pb-12 lg:pb-20 animate-in fade-in slide-in-from-bottom-4 duration-500"
>
<div class="flex flex-col space-y-2">
<h2 class="text-2xl font-bold tracking-tight text-zinc-100">打印排期</h2>
<h2 class="text-2xl font-bold tracking-tight text-zinc-900">打印排期</h2>
<p class="text-sm text-zinc-500">自定义打印设置,预览并导出排期表</p>
</div>
<!-- 权限检查 -->
<div
v-if="!canPrintSchedule"
class="flex flex-col items-center justify-center py-20 bg-zinc-900/50 rounded-xl border border-zinc-800"
class="flex flex-col items-center justify-center py-20 bg-zinc-50/50 rounded-xl border border-zinc-200"
>
<div
class="w-16 h-16 bg-red-500/10 rounded-full flex items-center justify-center text-red-500 mb-4"
@@ -21,7 +21,7 @@
<path d="m9 9 6 6" />
</svg>
</div>
<h3 class="text-lg font-bold text-zinc-100">权限不足</h3>
<h3 class="text-lg font-bold text-zinc-900">权限不足</h3>
<p class="text-zinc-500 mt-2">您没有打印排期的权限,请联系管理员获取相应权限。</p>
</div>
@@ -29,9 +29,9 @@
<!-- 设置面板 -->
<div class="lg:col-span-4 flex flex-col gap-6 h-auto">
<div
class="bg-zinc-900/40 border border-zinc-800 rounded-xl p-6 space-y-6 shadow-lg flex flex-col h-auto"
class="bg-zinc-50/40 border border-zinc-200 rounded-xl p-6 space-y-6 shadow-lg flex flex-col h-auto"
>
<h3 class="text-lg font-bold flex items-center gap-2 text-zinc-100 shrink-0">
<h3 class="text-lg font-bold flex items-center gap-2 text-zinc-900 shrink-0">
<Layout class="w-4 h-4 text-blue-500" /> 打印设置
</h3>
@@ -59,8 +59,8 @@
:class="[
'py-2.5 rounded-lg text-sm font-bold transition-all',
settings.orientation === 'portrait'
? 'border border-blue-500/30 bg-blue-600/10 text-blue-400 shadow-sm'
: 'border border-zinc-800 bg-zinc-950 text-zinc-500 hover:text-zinc-300'
? 'border border-blue-200 bg-blue-50 text-blue-700 shadow-sm'
: 'border border-zinc-200 bg-white text-zinc-500 hover:text-zinc-600'
]"
@click="settings.orientation = 'portrait'"
>
@@ -70,8 +70,8 @@
:class="[
'py-2.5 rounded-lg text-sm font-bold transition-all',
settings.orientation === 'landscape'
? 'border border-blue-500/30 bg-blue-600/10 text-blue-400 shadow-sm'
: 'border border-zinc-800 bg-zinc-950 text-zinc-500 hover:text-zinc-300'
? 'border border-blue-200 bg-blue-50 text-blue-700 shadow-sm'
: 'border border-zinc-200 bg-white text-zinc-500 hover:text-zinc-600'
]"
@click="settings.orientation = 'landscape'"
>
@@ -89,13 +89,13 @@
<input
v-model="settings.startDate"
type="date"
class="bg-zinc-950 border border-zinc-800 rounded-lg px-3 py-2 text-sm text-zinc-300 focus:outline-none focus:border-blue-500/50 transition-colors"
class="bg-white border border-zinc-200 rounded-lg px-3 py-2 text-sm text-zinc-600 focus:outline-none focus:border-blue-500/50 transition-colors"
max="9999-12-31"
>
<input
v-model="settings.endDate"
type="date"
class="bg-zinc-950 border border-zinc-800 rounded-lg px-3 py-2 text-sm text-zinc-300 focus:outline-none focus:border-blue-500/50 transition-colors"
class="bg-white border border-zinc-200 rounded-lg px-3 py-2 text-sm text-zinc-600 focus:outline-none focus:border-blue-500/50 transition-colors"
max="9999-12-31"
>
</div>
@@ -103,7 +103,7 @@
<button
v-for="range in dateRanges"
:key="range.value"
class="px-2 py-1 bg-zinc-800/50 hover:bg-zinc-800 text-[10px] text-zinc-400 rounded-md transition-colors border border-zinc-800"
class="px-2 py-1 bg-zinc-100/50 hover:bg-zinc-100 text-[10px] text-zinc-400 rounded-md transition-colors border border-zinc-200"
@click="setDateRange(range.value)"
>
{{ range.label }}
@@ -127,7 +127,7 @@
'w-5 h-5 rounded flex items-center justify-center border transition-all',
settings[option.key]
? 'bg-blue-600 border-blue-600'
: 'bg-zinc-950 border-zinc-800 group-hover:border-zinc-700'
: 'bg-white border-zinc-200 group-hover:border-zinc-200'
]"
>
<CheckCircle2 v-if="settings[option.key]" class="w-3 h-3 text-white" />
@@ -137,7 +137,7 @@
:class="[
'text-sm font-medium transition-colors',
settings[option.key]
? 'text-zinc-200'
? 'text-zinc-700'
: 'text-zinc-500 group-hover:text-zinc-400'
]"
>{{ option.label }}</span
@@ -153,7 +153,7 @@
'w-5 h-5 rounded flex items-center justify-center border transition-all',
settings.showSchoolLogo
? 'bg-blue-600 border-blue-600'
: 'bg-zinc-950 border-zinc-800 group-hover:border-zinc-700'
: 'bg-white border-zinc-200 group-hover:border-zinc-200'
]"
>
<CheckCircle2 v-if="settings.showSchoolLogo" class="w-3 h-3 text-white" />
@@ -163,7 +163,7 @@
:class="[
'text-sm font-medium transition-colors',
settings.showSchoolLogo
? 'text-zinc-200'
? 'text-zinc-700'
: 'text-zinc-500 group-hover:text-zinc-400'
]"
>学校Logo</span
@@ -180,15 +180,15 @@
<textarea
v-model="settings.remark"
placeholder="请输入备注信息(可选)"
class="w-full bg-zinc-950 border border-zinc-800 rounded-lg px-4 py-3 text-sm focus:outline-none text-zinc-300 min-h-[80px] resize-none focus:border-blue-500/50 transition-colors"
class="w-full bg-white border border-zinc-200 rounded-lg px-4 py-3 text-sm focus:outline-none text-zinc-600 min-h-[80px] resize-none focus:border-blue-500/50 transition-colors"
/>
</div>
</div>
<!-- 操作按钮 -->
<div class="space-y-2 pt-4 border-t border-zinc-800 shrink-0">
<div class="space-y-2 pt-4 border-t border-zinc-200 shrink-0">
<button
class="w-full flex items-center justify-center gap-2 py-3 bg-zinc-800/80 hover:bg-zinc-700 text-zinc-300 text-sm font-bold rounded-lg border border-zinc-700 transition-all"
class="w-full flex items-center justify-center gap-2 py-3 bg-zinc-100/80 hover:bg-zinc-200 text-zinc-600 text-sm font-bold rounded-lg border border-zinc-200 transition-all"
@click="refreshPreview"
>
<RefreshCw class="w-4 h-4" /> 刷新预览
@@ -223,10 +223,10 @@
<!-- 预览区域 -->
<div class="lg:col-span-8 flex flex-col gap-4 h-[700px] lg:h-0 lg:min-h-full mb-8 lg:mb-0">
<div
class="bg-zinc-900/40 border border-zinc-800 rounded-xl overflow-hidden flex flex-col h-full shadow-lg"
class="bg-zinc-50/40 border border-zinc-200 rounded-xl overflow-hidden flex flex-col h-full shadow-lg"
>
<div class="px-6 py-5 border-b border-zinc-800 flex items-center justify-between">
<h3 class="text-lg font-bold flex items-center gap-2 text-zinc-100">
<div class="px-6 py-5 border-b border-zinc-200 flex items-center justify-between">
<h3 class="text-lg font-bold flex items-center gap-2 text-zinc-900">
<AlignLeft class="w-4.5 h-4.5 text-zinc-500" /> 预览区域
</h3>
<div class="flex items-center gap-2 text-xs font-bold">
@@ -245,7 +245,7 @@
</div>
<div
class="flex-1 bg-zinc-950/50 p-6 md:p-12 overflow-auto custom-scrollbar flex items-start"
class="flex-1 bg-white/70 p-6 md:p-12 overflow-auto custom-scrollbar flex items-start"
>
<!-- 纸张预览 -->
<div