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 行删除

查看文件

@@ -6,6 +6,7 @@ import { useEffect, useState } from "react";
import { apiFetch } from "@/lib/api";
import { readToken } from "@/lib/auth";
import { useI18nText } from "@/lib/i18n";
import { Activity, AlertCircle, List, Play, RefreshCw, Server, Trash2, Zap } from "lucide-react";
type BackendLogItem = {
id: number;
@@ -277,7 +278,8 @@ export default function BackendLogsPage() {
return (
<main className="mx-auto max-w-7xl px-3 py-6 max-[390px]:px-2 sm:px-4 md:px-6 md:py-8">
<div className="flex flex-wrap items-center justify-between gap-3">
<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">
<Server size={24} />
{tx("后台日志(题解异步队列)", "Backend Logs (Async Solution Queue)")}
</h1>
<div className="flex w-full flex-wrap items-center gap-2 text-sm sm:w-auto sm:justify-end">
@@ -288,10 +290,11 @@ export default function BackendLogsPage() {
{tx("缺失答案题目", "Problems missing answers")} {missingProblems}
</span>
<button
className="rounded border px-3 py-1 disabled:opacity-50"
className="rounded border px-3 py-1 disabled:opacity-50 flex items-center gap-1"
onClick={() => void triggerMissingSolutions()}
disabled={triggerLoading}
>
<Zap size={14} />
{triggerLoading ? tx("手动补全中...", "Triggering...") : tx("手动补全(可选)", "Manual fill (optional)")}
</button>
<select
@@ -303,7 +306,8 @@ export default function BackendLogsPage() {
<option value={100}>{tx("最近 100 条", "Latest 100")}</option>
<option value={200}>{tx("最近 200 条", "Latest 200")}</option>
</select>
<button className="rounded border px-3 py-1 sm:ml-auto" onClick={() => void refresh()} disabled={loading}>
<button className="rounded border px-3 py-1 sm:ml-auto flex items-center gap-1" onClick={() => void refresh()} disabled={loading}>
<RefreshCw size={14} className={loading ? "animate-spin" : ""} />
{tx("刷新", "Refresh")}
</button>
</div>
@@ -401,7 +405,10 @@ export default function BackendLogsPage() {
<section className="mt-4 grid gap-3 md:grid-cols-2">
<article className="rounded-xl border bg-white p-3">
<h2 className="text-sm font-medium">{tx("正在处理Running", "Running Jobs")}</h2>
<h2 className="text-sm font-medium flex items-center gap-2">
<Activity size={16} className="text-emerald-600" />
{tx("正在处理Running", "Running Jobs")}
</h2>
<p className="mt-1 text-xs text-zinc-600">
{tx("当前题目 ID", "Current problem IDs:")}
{runningIds.length ? runningIds.join(", ") : tx("无", "None")}
@@ -423,7 +430,10 @@ export default function BackendLogsPage() {
</article>
<article className="rounded-xl border bg-white p-3">
<h2 className="text-sm font-medium">{tx("待处理队列Queued", "Queued Jobs")}</h2>
<h2 className="text-sm font-medium flex items-center gap-2">
<List size={16} className="text-amber-600" />
{tx("待处理队列Queued", "Queued Jobs")}
</h2>
<p className="mt-1 text-xs text-zinc-600">
{tx("待处理题目 ID预览", "Queued problem IDs (preview):")}
{queuedIds.length ? queuedIds.join(", ") : tx("无", "None")}