mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-24 01:36:48 +08:00
尝试增加管理页面
This commit is contained in:
39
app/app/(admin)/admin/page.tsx
Normal file
39
app/app/(admin)/admin/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
"use client";
|
||||
import { Grid, Col, Card, Text, AreaChart, Metric } from "@tremor/react";
|
||||
|
||||
export default function AdminPage() {
|
||||
return (
|
||||
<Grid numItems={1} numItemsSm={2} numItemsLg={3} className="gap-2">
|
||||
<Col numColSpan={1} numColSpanLg={2}>
|
||||
<Card>
|
||||
<Text>Title</Text>
|
||||
{/*<AreaChart*/}
|
||||
{/* className="mt-6 h-28"*/}
|
||||
{/* data={data}*/}
|
||||
{/* index="Month"*/}
|
||||
{/* valueFormatter={(number: number) =>*/}
|
||||
{/* `${Intl.NumberFormat("us").format(number).toString()}`*/}
|
||||
{/* }*/}
|
||||
{/* categories={["Total Visitors"]}*/}
|
||||
{/* colors={["blue"]}*/}
|
||||
{/* showXAxis={true}*/}
|
||||
{/* showGridLines={false}*/}
|
||||
{/* startEndOnly={true}*/}
|
||||
{/* showYAxis={false}*/}
|
||||
{/* showLegend={false}*/}
|
||||
{/*/>*/}
|
||||
</Card>
|
||||
</Col>
|
||||
<Card>
|
||||
<Text>Title</Text>
|
||||
<Metric>KPI 2</Metric>
|
||||
</Card>
|
||||
<Col>
|
||||
<Card>
|
||||
<Text>Title</Text>
|
||||
<Metric>KPI 3</Metric>
|
||||
</Card>
|
||||
</Col>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
24
app/app/(admin)/layout.tsx
Normal file
24
app/app/(admin)/layout.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import "@/app/app/login.scss";
|
||||
import { Metadata } from "next";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Admin | 管理页面",
|
||||
};
|
||||
|
||||
export default async function AdminLayout({
|
||||
children,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<div className="flex max-w-screen-xl flex-col space-y-12 p-8">
|
||||
<div className="flex flex-col space-y-6">
|
||||
<h1 className="font-cal text-3xl font-bold dark:text-white">
|
||||
Admin Page
|
||||
</h1>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user