refactor: 更新管理端页面元数据,统一国际化支持,移除冗余代码

This commit is contained in:
2026-05-21 17:27:52 +08:00
parent 26feed3c4f
commit e8a5507411
77 changed files with 1669 additions and 732 deletions

View File

@@ -1,6 +1,7 @@
"use client";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useExportLabels } from "@/hooks/use-export-labels";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
@@ -62,6 +63,7 @@ const PLAYER_STATUS_OPTIONS = [
export function PlayersConsole(): React.ReactElement {
const { t } = useTranslation(["players", "common"]);
const exportLabels = useExportLabels("players");
const profile = useAdminProfile();
useAdminCurrencyCatalog();
const canManagePlayers = adminHasAnyPermission(profile?.permissions, ["prd.users.manage"]);
@@ -275,8 +277,8 @@ export function PlayersConsole(): React.ReactElement {
<div className="admin-list-actions">
<AdminTableExportButton
tableId="players-table"
filename="玩家列表"
sheetName="玩家列表"
filename={exportLabels.filename}
sheetName={exportLabels.sheetName}
/>
<Button
type="button"