-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
import { getCurrentUser } from '~/server/lib/user' | ||
import { Card, CardBody } from '@nextui-org/card' | ||
|
||
export default async function Admin() { | ||
const user = await getCurrentUser() | ||
|
||
return ( | ||
<> | ||
{ user ? | ||
<div> | ||
<p>控制台(已登录)</p> | ||
<p>{JSON.stringify(user)}</p> | ||
</div> | ||
: | ||
'控制台(未登录)' | ||
} | ||
</> | ||
) | ||
<div className="flex flex-col space-y-2 h-full flex-1"> | ||
<Card> | ||
<CardBody> | ||
<p> | ||
{user ? | ||
<div> | ||
<p>控制台(已登录)</p> | ||
</div> | ||
: | ||
'控制台(未登录)' | ||
} | ||
</p> | ||
</CardBody> | ||
</Card> | ||
<Card className="flex-1"> | ||
<CardBody> | ||
<p> | ||
<p>{JSON.stringify(user)}</p> | ||
</p> | ||
</CardBody> | ||
</Card> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,34 @@ | ||
export default async function Admin() { | ||
'use client' | ||
|
||
import React from 'react' | ||
import {Tabs, Tab, Card, CardBody} from '@nextui-org/react' | ||
|
||
export default async function Settings() { | ||
return ( | ||
<> | ||
系统设置 | ||
</> | ||
<div className="flex flex-col space-y-2 h-full flex-1"> | ||
<Tabs aria-label="设置选项卡" radius="md" variant="light"> | ||
<Tab key="system" title="系统"> | ||
<Card> | ||
<CardBody> | ||
系统设置 | ||
</CardBody> | ||
</Card> | ||
</Tab> | ||
<Tab key="s3" title="S3"> | ||
<Card> | ||
<CardBody> | ||
S3 设置 | ||
</CardBody> | ||
</Card> | ||
</Tab> | ||
<Tab key="alist" title="AList"> | ||
<Card> | ||
<CardBody> | ||
AList 设置 | ||
</CardBody> | ||
</Card> | ||
</Tab> | ||
</Tabs> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters