feat(ui): enhance table and admin components with improved layout and status display
- Updated global CSS to center-align table headers and cells, ensuring a consistent layout. - Modified admin table components to replace switches with status badges for better clarity. - Enhanced internationalization support by adding new strings for version actions and validation messages in multiple locales. - Refactored configuration document screens to include version selection and improved user feedback on status changes.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { AdminPermissionGate } from "@/components/admin/admin-permission-gate";
|
||||
@@ -14,6 +14,7 @@ import { RulesPageShell } from "@/modules/rules/rules-page-shell";
|
||||
/** 赔率与回水:共用赔率版本线,单页上下分区。 */
|
||||
export function RulesOddsConfigScreen() {
|
||||
const { t } = useTranslation("config");
|
||||
const [sharedVersionId, setSharedVersionId] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
const scrollToRebate = () => {
|
||||
@@ -30,16 +31,20 @@ export function RulesOddsConfigScreen() {
|
||||
return (
|
||||
<RulesPageShell>
|
||||
<AdminPermissionGate requiredAny={PRD_RULES_ODDS_ACCESS_ANY}>
|
||||
<ConfigDocPage
|
||||
title={t("nav.rulesOddsTitle")}
|
||||
description={t("nav.rulesOddsDescription")}
|
||||
contentClassName="space-y-10"
|
||||
>
|
||||
<ConfigSection title={t("nav.items.odds")} description={t("odds.sectionHint")}>
|
||||
<OddsConfigDocScreen embedded />
|
||||
<ConfigDocPage title={t("nav.rulesOddsTitle")} contentClassName="space-y-8">
|
||||
<ConfigSection title={t("nav.items.odds")}>
|
||||
<OddsConfigDocScreen
|
||||
embedded
|
||||
versionId={sharedVersionId}
|
||||
onVersionIdChange={setSharedVersionId}
|
||||
/>
|
||||
</ConfigSection>
|
||||
<ConfigSection id="rebate" title={t("nav.items.rebate")} description={t("rebate.sectionHint")}>
|
||||
<RebateConfigDocScreen embedded />
|
||||
<ConfigSection id="rebate" title={t("nav.items.rebate")}>
|
||||
<RebateConfigDocScreen
|
||||
embedded
|
||||
versionId={sharedVersionId}
|
||||
onVersionIdChange={setSharedVersionId}
|
||||
/>
|
||||
</ConfigSection>
|
||||
</ConfigDocPage>
|
||||
</AdminPermissionGate>
|
||||
|
||||
Reference in New Issue
Block a user