From fc51faf9e16d04b4e4cfaf0330492244ae5477b2 Mon Sep 17 00:00:00 2001 From: Lea Date: Sat, 2 Sep 2023 22:51:22 +0200 Subject: [PATCH] feat: email classification UI --- app/panel/shield/classifications/page.tsx | 22 ++++++ app/panel/shield/page.tsx | 14 ++++ components/common/NavigationLinks.tsx | 7 ++ .../pages/shield/EmailClassificationRow.tsx | 68 +++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 app/panel/shield/classifications/page.tsx create mode 100644 app/panel/shield/page.tsx create mode 100644 components/pages/shield/EmailClassificationRow.tsx diff --git a/app/panel/shield/classifications/page.tsx b/app/panel/shield/classifications/page.tsx new file mode 100644 index 0000000..ac6210b --- /dev/null +++ b/app/panel/shield/classifications/page.tsx @@ -0,0 +1,22 @@ +import EmailClassificationRow from "@/components/pages/shield/EmailClassificationRow"; +import { Card } from "@/components/ui/card"; +import { Table, TableBody, TableHead, TableHeader, TableRow } from "@/components/ui/table"; + +export default function Classifications() { + return ( + + + + + Domain + Classification + Action + + + + + +
+
+ ); +} diff --git a/app/panel/shield/page.tsx b/app/panel/shield/page.tsx new file mode 100644 index 0000000..b4c0328 --- /dev/null +++ b/app/panel/shield/page.tsx @@ -0,0 +1,14 @@ +import { Button } from "@/components/ui/button"; +import Link from "next/link"; +import { redirect } from "next/navigation"; + +export default function Shield() { + // todo add a list of buttons here once there's more categories + redirect("/panel/shield/classifications"); + // return ( + //
+ // + //
+ // ); + } + \ No newline at end of file diff --git a/components/common/NavigationLinks.tsx b/components/common/NavigationLinks.tsx index 20f21c8..1a147c9 100644 --- a/components/common/NavigationLinks.tsx +++ b/components/common/NavigationLinks.tsx @@ -7,6 +7,7 @@ import { Home, ScrollText, Search, + Shield, Siren, Sparkles, TrendingUp, @@ -39,6 +40,12 @@ export function NavigationLinks() { > + + + + {domain} + + + + + + + + {CLASSIFICATIONS.map((c) => ( + { + setSelectClassification(false); + setClassification(c); + }} + > + + {c} + + ))} + + + + + + + + + ); + } \ No newline at end of file