refactor(admin): tokenize remaining admin pages for dark mode

- 8 个 admin 页面(users/roles/zones/media/notifications/page/content×2)全部 gray→token
- 深色面板 bg-gray-900/800 → bg-dark-bg / bg-dark-bg-secondary(两模式保持深色)
- 深色面板上的文字保留 text-white(固定亮色,两模式可读)
- 遮罩 bg-black/50 → bg-overlay/50(独立 token,不随反色)
- border-t-gray-900 → border-t-border-dark 单独处理
- 验证: type-check 0 / lint 0 / Tailwind 生成确认 token 类产出 / 无 gray- 残留
This commit is contained in:
2026-08-31 21:46:59 +08:00
parent 860a7f454a
commit 8090ba2b9e
8 changed files with 256 additions and 256 deletions
+15 -15
View File
@@ -74,7 +74,7 @@ export default function ZonesPage() {
if (authLoading || loading) {
return (
<div className="flex items-center justify-center h-64">
<div className="animate-spin w-8 h-8 border-2 border-gray-900 border-t-transparent rounded-full" />
<div className="animate-spin w-8 h-8 border-2 border-border-dark border-t-transparent rounded-full" />
</div>
);
}
@@ -82,64 +82,64 @@ export default function ZonesPage() {
return (
<div className="space-y-6">
<div>
<h1 className="text-xl font-bold text-gray-900">页面区域配置</h1>
<p className="text-sm text-gray-500 mt-1">管理系统各页面的内容区域布局</p>
<h1 className="text-xl font-bold text-text-primary">页面区域配置</h1>
<p className="text-sm text-text-muted mt-1">管理系统各页面的内容区域布局</p>
</div>
<div className="grid gap-4">
{zones.map((zone) => (
<div key={zone.id} className="bg-white rounded-lg border border-gray-200 p-4">
<div key={zone.id} className="bg-bg-primary rounded-lg border border-border-primary p-4">
<div className="flex items-center justify-between">
<div>
<h3 className="text-sm font-semibold text-gray-900">{zone.name}</h3>
<p className="text-xs text-gray-500 mt-0.5">
<h3 className="text-sm font-semibold text-text-primary">{zone.name}</h3>
<p className="text-xs text-text-muted mt-0.5">
Code: {zone.code} | 页面: {zone.pageCode || '-'} | 区域: {zone.zoneKey || '-'}
</p>
<p className="text-xs text-gray-400 mt-0.5">
<p className="text-xs text-text-muted mt-0.5">
允许模型: {zone.allowedModels?.join(', ') || '-'} | 内容数: {zone.items?.length || 0}
</p>
</div>
<button
onClick={() => setEditingZone(editingZone?.id === zone.id ? null : zone)}
className="text-sm text-gray-600 hover:text-gray-900 px-3 py-1.5 rounded border border-gray-300 hover:border-gray-400 transition-colors"
className="text-sm text-text-tertiary hover:text-text-primary px-3 py-1.5 rounded border border-border-secondary hover:border-border-secondary transition-colors"
>
{editingZone?.id === zone.id ? '取消编辑' : '编辑'}
</button>
</div>
{editingZone?.id === zone.id && (
<div className="mt-4 pt-4 border-t border-gray-100 space-y-4">
<div className="mt-4 pt-4 border-t border-border-light space-y-4">
<div className="grid grid-cols-2 gap-4">
<div>
<label className="block text-xs font-medium text-gray-700 mb-1">名称</label>
<label className="block text-xs font-medium text-text-secondary mb-1">名称</label>
<input
type="text"
value={editingZone.name}
onChange={(e) => setEditingZone({ ...editingZone, name: e.target.value })}
className="w-full px-3 py-1.5 border border-gray-300 rounded text-sm"
className="w-full px-3 py-1.5 border border-border-secondary rounded text-sm"
/>
</div>
<div>
<label className="block text-xs font-medium text-gray-700 mb-1">页面标识</label>
<label className="block text-xs font-medium text-text-secondary mb-1">页面标识</label>
<input
type="text"
value={editingZone.pageCode}
onChange={(e) => setEditingZone({ ...editingZone, pageCode: e.target.value })}
className="w-full px-3 py-1.5 border border-gray-300 rounded text-sm"
className="w-full px-3 py-1.5 border border-border-secondary rounded text-sm"
/>
</div>
</div>
<div className="flex justify-end gap-2">
<button
onClick={() => setEditingZone(null)}
className="text-sm text-gray-600 px-4 py-1.5 rounded border border-gray-300 hover:bg-gray-50"
className="text-sm text-text-tertiary px-4 py-1.5 rounded border border-border-secondary hover:bg-bg-secondary"
>
取消
</button>
<button
onClick={handleSave}
disabled={saving}
className="flex items-center gap-1.5 text-sm bg-gray-900 text-white px-4 py-1.5 rounded hover:bg-gray-800 disabled:opacity-50"
className="flex items-center gap-1.5 text-sm bg-dark-bg text-white px-4 py-1.5 rounded hover:bg-dark-bg-secondary disabled:opacity-50"
>
<Save className="w-3.5 h-3.5" />
保存