This commit is contained in:
+15
-1
@@ -24,6 +24,14 @@ const CATEGORIES = [
|
|||||||
|
|
||||||
type Category = (typeof CATEGORIES)[number]["id"];
|
type Category = (typeof CATEGORIES)[number]["id"];
|
||||||
|
|
||||||
|
function DashboardCatName({ name }: { name: string }) {
|
||||||
|
return (
|
||||||
|
<div class="flex flex-col gap-2 ml-1 md:ml-0">
|
||||||
|
<span class="text-lg font-bold">{name}</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function LinkList({ links }: { links: Link[] }) {
|
function LinkList({ links }: { links: Link[] }) {
|
||||||
if (links.length === 0)
|
if (links.length === 0)
|
||||||
return <div class="alert mt-4">No links in config</div>;
|
return <div class="alert mt-4">No links in config</div>;
|
||||||
@@ -190,14 +198,20 @@ function MainScreen({
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{category === "dashboard" && (
|
{category === "dashboard" && (
|
||||||
<div class="flex flex-row gap-2 justify-center mt-4">
|
<div class="flex flex-col md:flex-row gap-2 justify-center mt-4">
|
||||||
|
<div>
|
||||||
|
<DashboardCatName name="Links" />
|
||||||
<LinkList links={content.links} />
|
<LinkList links={content.links} />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<DashboardCatName name="Monitors" />
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
{content.monitors.map((it) => (
|
{content.monitors.map((it) => (
|
||||||
<MonitorCard s={it} />
|
<MonitorCard s={it} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{category === "exec" && (
|
{category === "exec" && (
|
||||||
<div class="flex flex-col gap-3 mt-4">
|
<div class="flex flex-col gap-3 mt-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user