Cleaned up UI
This commit is contained in:
parent
45fbc890b6
commit
5c182813f4
4 changed files with 26 additions and 5 deletions
|
|
@ -3,6 +3,7 @@ import { Inter } from 'next/font/google'
|
||||||
import './globals.css'
|
import './globals.css'
|
||||||
import { ThemeProvider } from '@/components/theme-provider'
|
import { ThemeProvider } from '@/components/theme-provider'
|
||||||
import { Toaster } from '@/components/ui/toaster'
|
import { Toaster } from '@/components/ui/toaster'
|
||||||
|
import Navbar from '@/components/Navbar'
|
||||||
|
|
||||||
const inter = Inter({ subsets: ['latin'] })
|
const inter = Inter({ subsets: ['latin'] })
|
||||||
|
|
||||||
|
|
@ -27,6 +28,7 @@ export default function RootLayout({
|
||||||
enableSystem
|
enableSystem
|
||||||
disableTransitionOnChange
|
disableTransitionOnChange
|
||||||
>
|
>
|
||||||
|
<Navbar />
|
||||||
{children}
|
{children}
|
||||||
<Toaster />
|
<Toaster />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
|
|
||||||
20
app/page.tsx
20
app/page.tsx
|
|
@ -1,4 +1,5 @@
|
||||||
import RouteCards from '@/components/RouteCards';
|
import RouteCards from '@/components/RouteCards';
|
||||||
|
import { CardTitle, Card, CardDescription, CardHeader, CardContent } from '@/components/ui/card';
|
||||||
import { getRoutes } from '@/lib/serverActions';
|
import { getRoutes } from '@/lib/serverActions';
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
|
|
@ -6,10 +7,21 @@ export default async function Home() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main>
|
<main>
|
||||||
<div className=''>
|
<div className='flex items-center justify-center p-2'>
|
||||||
<div className='flex grid grid-cols-6 p-2'>
|
<Card className='flex'>
|
||||||
<RouteCards routes={routes} />
|
<CardHeader>
|
||||||
</div>
|
<CardTitle>Active Routes</CardTitle>
|
||||||
|
<CardDescription>Amount of configured routes</CardDescription>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className='flex items-center'>
|
||||||
|
<div className=''>
|
||||||
|
<p className='text-xl font-semibold translate-y-2'>{routes.length}</p>
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</div>
|
||||||
|
<div className='grid grid-flow-row-dense md:grid-cols-6 sm:grid-cols-2 p-2'>
|
||||||
|
<RouteCards routes={routes} />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
7
components/Navbar.tsx
Normal file
7
components/Navbar.tsx
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
export default function Navbar() {
|
||||||
|
return (
|
||||||
|
<div className='bg-red-500 flex items-center justify-center h-12'>
|
||||||
|
<p>Navbar</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ export default function RouteCards({ routes }: { routes: Array<Route> }) {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent>
|
<CardContent>
|
||||||
<p className="text-sm font-medium leading-none">
|
<p className="text-sm font-medium leading-none">
|
||||||
Proxying to
|
Tunneling to
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-muted-foreground">{getRouteUpstreams(route)?.map((upstream => upstream.dial))}</p>
|
<p className="text-sm text-muted-foreground">{getRouteUpstreams(route)?.map((upstream => upstream.dial))}</p>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue