Skip to content

Commit

Permalink
Merge pull request #142 from besscroft/v2
Browse files Browse the repository at this point in the history
fix: 修复一些问题
  • Loading branch information
besscroft authored Nov 11, 2024
2 parents 6da3a06 + bcc6137 commit c7ae993
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 367 deletions.
47 changes: 22 additions & 25 deletions app/admin/settings/storages/page.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
'use client'

import { Tabs } from '~/components/aceternity/tabs'
import AListTabs from '~/components/admin/settings/storages/AListTabs'
import S3Tabs from '~/components/admin/settings/storages/S3Tabs'
import R2Tabs from '~/components/admin/settings/storages/R2Tabs'
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from '~/components/ui/tabs'

export default function Storages() {
const tabs = [
{
title: "S3 API",
value: "s3",
content: (
<S3Tabs />
),
},
{
title: "Cloudflare R2",
value: "r2",
content: (
<R2Tabs />
),
},
{
title: "AList API",
value: "alist",
content: (
<AListTabs />
),
},
];

return (
<div className="flex flex-col space-y-2 h-full flex-1">
<Tabs tabs={tabs} />
<Tabs defaultValue="s3">
<TabsList className="grid w-full grid-cols-3">
<TabsTrigger value="s3">S3 API</TabsTrigger>
<TabsTrigger value="r2">Cloudflare R2</TabsTrigger>
<TabsTrigger value="alist">AList API</TabsTrigger>
</TabsList>
<TabsContent value="s3">
<S3Tabs />
</TabsContent>
<TabsContent value="r2">
<R2Tabs />
</TabsContent>
<TabsContent value="alist">
<AListTabs />
</TabsContent>
</Tabs>
</div>
)
}
124 changes: 0 additions & 124 deletions components/aceternity/tabs.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion components/admin/settings/storages/AListTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function AListTabs() {
<div className="flex justify-between p-2">
<div className="flex gap-5">
<div className="flex flex-col gap-1 items-start justify-center">
<h4 className="text-small font-semibold leading-none text-default-600">AList 配置信息</h4>
<h4 className="text-small font-semibold leading-none text-default-600">AList 配置</h4>
</div>
</div>
<div className="flex items-center space-x-2">
Expand Down
2 changes: 1 addition & 1 deletion components/admin/settings/storages/R2Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function R2Tabs() {
<div className="flex justify-between p-2">
<div className="flex gap-5">
<div className="flex flex-col gap-1 items-start justify-center">
<h4 className="text-small font-semibold leading-none text-default-600">Cloudflare R2 配置信息</h4>
<h4 className="text-small font-semibold leading-none text-default-600">Cloudflare R2 配置</h4>
</div>
</div>
<div className="flex items-center space-x-2">
Expand Down
2 changes: 1 addition & 1 deletion components/admin/settings/storages/S3Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function S3Tabs() {
<div className="flex justify-between p-2">
<div className="flex gap-5">
<div className="flex flex-col gap-1 items-start justify-center">
<h4 className="text-small font-semibold leading-none text-default-600">S3 配置信息</h4>
<h4 className="text-small font-semibold leading-none text-default-600">S3 配置</h4>
</div>
</div>
<div className="flex items-center space-x-2">
Expand Down
Loading

0 comments on commit c7ae993

Please sign in to comment.