feat: 增加角色管理与奖池配置迁移,优化管理端权限与样式

This commit is contained in:
2026-05-19 14:40:04 +08:00
parent d625c59393
commit a1fb163f1b
45 changed files with 1080 additions and 518 deletions

View File

@@ -0,0 +1,16 @@
import { ModuleScaffold } from "@/components/admin/module-scaffold";
import { AdminRolesConsole } from "@/modules/admin-roles/admin-roles-console";
import { adminRolesModuleMeta } from "@/modules/admin-roles/meta";
import type { Metadata } from "next";
export const metadata: Metadata = {
title: adminRolesModuleMeta.title,
};
export default function AdminRolesPage() {
return (
<ModuleScaffold className="w-full max-w-none">
<AdminRolesConsole />
</ModuleScaffold>
);
}

View File

@@ -0,0 +1,20 @@
import { JackpotSubNav } from "@/modules/jackpot/jackpot-subnav";
import { JackpotPoolsConsole } from "@/modules/jackpot/jackpot-pools-console";
import { jackpotModuleMeta } from "@/modules/jackpot/meta";
import type { Metadata } from "next";
export const metadata: Metadata = {
title: `奖池配置 · ${jackpotModuleMeta.title}`,
};
export default function AdminConfigJackpotPage() {
return (
<div className="w-full max-w-none px-1">
<JackpotSubNav />
<div className="mx-auto mb-6 max-w-5xl">
<h1 className="text-lg font-semibold tracking-tight">{jackpotModuleMeta.title}</h1>
</div>
<JackpotPoolsConsole />
</div>
);
}

View File

@@ -0,0 +1,21 @@
import { JackpotSubNav } from "@/modules/jackpot/jackpot-subnav";
import { JackpotRecordsConsole } from "@/modules/jackpot/jackpot-records-console";
import { jackpotModuleMeta } from "@/modules/jackpot/meta";
import type { Metadata } from "next";
export const metadata: Metadata = {
title: `Jackpot 记录 · ${jackpotModuleMeta.title}`,
};
export default function AdminConfigJackpotRecordsPage() {
return (
<div className="w-full max-w-none px-1">
<JackpotSubNav />
<div className="mx-auto mb-6 max-w-5xl">
<h1 className="text-lg font-semibold tracking-tight">Jackpot </h1>
<p className="mt-1 text-sm text-muted-foreground"></p>
</div>
<JackpotRecordsConsole />
</div>
);
}

View File

@@ -1,10 +0,0 @@
import { JackpotSubNav } from "@/modules/jackpot/jackpot-subnav";
export default function AdminJackpotLayout({ children }: { children: React.ReactNode }) {
return (
<div className="w-full max-w-none px-1">
<JackpotSubNav />
{children}
</div>
);
}

View File

@@ -1,18 +1,5 @@
import { JackpotPoolsConsole } from "@/modules/jackpot/jackpot-pools-console";
import { jackpotModuleMeta } from "@/modules/jackpot/meta";
import type { Metadata } from "next";
import { redirect } from "next/navigation";
export const metadata: Metadata = {
title: `奖池配置 · ${jackpotModuleMeta.title}`,
};
export default function AdminJackpotPoolsPage() {
return (
<>
<div className="mx-auto mb-6 max-w-5xl">
<h1 className="text-lg font-semibold tracking-tight">{jackpotModuleMeta.title}</h1>
</div>
<JackpotPoolsConsole />
</>
);
export default function AdminJackpotPoolsRedirectPage() {
redirect("/admin/config/jackpot");
}

View File

@@ -1,19 +1,5 @@
import { JackpotRecordsConsole } from "@/modules/jackpot/jackpot-records-console";
import { jackpotModuleMeta } from "@/modules/jackpot/meta";
import type { Metadata } from "next";
import { redirect } from "next/navigation";
export const metadata: Metadata = {
title: `Jackpot 记录 · ${jackpotModuleMeta.title}`,
};
export default function AdminJackpotRecordsPage() {
return (
<>
<div className="mx-auto mb-6 max-w-5xl">
<h1 className="text-lg font-semibold tracking-tight">Jackpot </h1>
<p className="text-muted-foreground mt-1 text-sm"></p>
</div>
<JackpotRecordsConsole />
</>
);
export default function AdminJackpotRecordsRedirectPage() {
redirect("/admin/config/jackpot/records");
}

View File

@@ -49,72 +49,72 @@
}
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--background: #f7fbff;
--foreground: #0f1f3d;
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--card-foreground: #0f1f3d;
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--popover-foreground: #0f1f3d;
--primary: #0b55c4;
--primary-foreground: #ffffff;
--secondary: #eef5ff;
--secondary-foreground: #10336e;
--muted: #f2f7ff;
--muted-foreground: #64748b;
--accent: #e8f1ff;
--accent-foreground: #0b55c4;
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
--border: #d8e6fb;
--input: #d8e6fb;
--ring: #7aa7ee;
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.708 0 0);
--sidebar: #01266c;
--sidebar-foreground: #f8fbff;
--sidebar-primary: #e60012;
--sidebar-primary-foreground: #ffffff;
--sidebar-accent: rgb(255 255 255 / 12%);
--sidebar-accent-foreground: #ffffff;
--sidebar-border: rgb(255 255 255 / 14%);
--sidebar-ring: rgb(255 255 255 / 36%);
}
.dark {
--background: oklch(0.145 0 0);
--background: #081426;
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.922 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--primary: #77a7ff;
--primary-foreground: #061328;
--secondary: #10233f;
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent: #102a50;
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
--border: rgb(148 180 220 / 24%);
--input: rgb(148 180 220 / 28%);
--ring: #77a7ff;
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0);
--sidebar: #01266c;
--sidebar-foreground: #f8fbff;
--sidebar-primary: #e60012;
--sidebar-primary-foreground: #ffffff;
--sidebar-accent: rgb(255 255 255 / 12%);
--sidebar-accent-foreground: #ffffff;
--sidebar-border: rgb(255 255 255 / 14%);
--sidebar-ring: rgb(255 255 255 / 36%);
}
@layer base {
@@ -127,4 +127,4 @@
html {
@apply font-sans;
}
}
}