Skip to content

Commit

Permalink
feat(ui): add basic pages
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemeowx2 committed Feb 4, 2025
1 parent feed95f commit 0378ae9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MainPage } from "@/pages/main"

function App() {
return <div className="text-6xl">
Test
</div>
return <><MainPage /></>
}

export default App
32 changes: 32 additions & 0 deletions ui/src/pages/main/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { SelectNet } from "./select"



export const MainPage: React.FC = () => {
return <>
<Tabs defaultValue="overview" className="max-w-[1024px] mx-auto">
<TabsList className="grid w-full grid-cols-3">
<TabsTrigger value="overview">Overview</TabsTrigger>
<TabsTrigger value="select">Select</TabsTrigger>
<TabsTrigger value="connection">Connection</TabsTrigger>
</TabsList>
<TabsContent value="overview">
<Card>
<CardHeader>
<CardTitle>选择网络</CardTitle>
<CardDescription>你可以在这里更改代理节点</CardDescription>
</CardHeader>
<CardContent className="space-y-2">
<SelectNet />
</CardContent>
</Card>
</TabsContent>
<TabsContent value="select">
</TabsContent>
<TabsContent value="connection">
</TabsContent>
</Tabs>
</>
}
8 changes: 8 additions & 0 deletions ui/src/pages/main/select.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import useSWR from 'swr'

export const SelectNet: React.FC = () => {

return <>

</>
}

0 comments on commit 0378ae9

Please sign in to comment.