feat(theme): complete Minecraft overhaul for all pages including admin/utility

这个提交包含在:
X
2026-02-15 17:06:24 -08:00
父节点 e4742ff5ea
当前提交 3a98882a71
修改 24 个文件,包含 1203 行新增208 行删除

查看文件

@@ -5,6 +5,7 @@ import { useEffect, useState } from "react";
import { apiFetch } from "@/lib/api";
import { readToken } from "@/lib/auth";
import { useI18nText } from "@/lib/i18n";
import { RefreshCw, Save, Shield, UserCog, Users } from "lucide-react";
type AdminUser = {
id: number;
@@ -75,7 +76,8 @@ export default function AdminUsersPage() {
return (
<main className="mx-auto max-w-6xl px-3 py-6 max-[390px]:px-2 sm:px-4 md:px-6 md:py-8">
<h1 className="text-xl font-semibold max-[390px]:text-lg sm:text-2xl">
<h1 className="text-xl font-semibold max-[390px]:text-lg sm:text-2xl flex items-center gap-2">
<Users size={24} />
{tx("管理员用户与积分", "Admin Users & Rating")}
</h1>
<p className="mt-2 text-sm text-zinc-600">
@@ -85,10 +87,11 @@ export default function AdminUsersPage() {
<div className="mt-4 flex flex-wrap gap-2">
<button
className="rounded bg-zinc-900 px-4 py-2 text-sm text-white disabled:opacity-50"
className="rounded bg-zinc-900 px-4 py-2 text-sm text-white disabled:opacity-50 flex items-center gap-2"
onClick={() => void load()}
disabled={loading}
>
<RefreshCw size={16} className={loading ? "animate-spin" : ""} />
{loading ? tx("刷新中...", "Refreshing...") : tx("刷新用户列表", "Refresh users")}
</button>
</div>
@@ -103,7 +106,10 @@ export default function AdminUsersPage() {
<tr>
<th className="px-3 py-2">ID</th>
<th className="px-3 py-2">{tx("用户名", "Username")}</th>
<th className="px-3 py-2">Rating</th>
<th className="px-3 py-2 flex items-center gap-1">
<Shield size={14} />
Rating
</th>
<th className="px-3 py-2">{tx("创建时间", "Created At")}</th>
<th className="px-3 py-2">{tx("操作", "Action")}</th>
</tr>
@@ -130,9 +136,10 @@ export default function AdminUsersPage() {
<td className="px-3 py-2 text-zinc-600">{fmtTs(user.created_at)}</td>
<td className="px-3 py-2">
<button
className="rounded border px-3 py-1 text-xs hover:bg-zinc-100"
className="rounded border px-3 py-1 text-xs hover:bg-zinc-100 flex items-center gap-1"
onClick={() => void updateRating(user.id, Math.max(0, Number(user.rating) || 0))}
>
<Save size={12} />
{tx("保存", "Save")}
</button>
</td>