diff --git a/apps/dashboard/app/api-keys/page.tsx b/apps/dashboard/app/api-keys/page.tsx new file mode 100644 index 00000000000..8f3c4f89ad1 --- /dev/null +++ b/apps/dashboard/app/api-keys/page.tsx @@ -0,0 +1,45 @@ +import { getServerSession } from "next-auth" +import { Box, Link, Typography } from "@mui/joy" + +import { authOptions } from "@/app/api/auth/[...nextauth]/route" +import ContentContainer from "@/components/content-container" +import ApiKeysList from "@/components/api-keys/list" +import ApiKeyCreate from "@/components/api-keys/create" + +export default async function Home() { + const session = await getServerSession(authOptions) + return ( + + + + + Your API Keys that can be used to access the{" "} + Blink API + + + + + + + ) +} diff --git a/apps/dashboard/app/url.ts b/apps/dashboard/app/url.ts index bb7e6b725e6..51ac81c1c64 100644 --- a/apps/dashboard/app/url.ts +++ b/apps/dashboard/app/url.ts @@ -9,4 +9,5 @@ export const URLS: Record = { "/security": { title: "Security", protected: true }, "/security/email/add": { title: "Add Email", protected: true }, "/security/email/verify": { title: "Verify Email", protected: true }, + "/api-keys": { title: "API Keys", protected: true }, } diff --git a/apps/dashboard/components/api-keys/create.tsx b/apps/dashboard/components/api-keys/create.tsx new file mode 100644 index 00000000000..dd14a3330e3 --- /dev/null +++ b/apps/dashboard/components/api-keys/create.tsx @@ -0,0 +1,71 @@ +"use client" + +import { Box, Button, Modal, ModalClose, Sheet, Typography } from "@mui/joy" +import AddIcon from "@mui/icons-material/Add" +import { useState } from "react" + +const ApiKeyCreate = () => { + const [open, setOpen] = useState(false) + return ( + <> + + setOpen(false)} + sx={{ display: "flex", justifyContent: "center", alignItems: "center" }} + > + + + + + Create API Key + + + + Create an API Key to use with your Blink Account. + + + + + + ) +} + +export default ApiKeyCreate diff --git a/apps/dashboard/components/api-keys/list.tsx b/apps/dashboard/components/api-keys/list.tsx new file mode 100644 index 00000000000..7adf00e0752 --- /dev/null +++ b/apps/dashboard/components/api-keys/list.tsx @@ -0,0 +1,57 @@ +import * as React from "react" +import Table from "@mui/joy/Table" + +const ApiKeysList = () => { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dessert (100g serving)CaloriesFat (g)Carbs (g)Protein (g)
Frozen yoghurt1596244
Ice cream sandwich2379374.3
Eclair26216246
Cupcake3053.7674.3
Gingerbread35616493.9
+ ) +} + +export default ApiKeysList diff --git a/apps/dashboard/components/side-bar/index.tsx b/apps/dashboard/components/side-bar/index.tsx index 40e3b11aafe..153d0f52bf7 100644 --- a/apps/dashboard/components/side-bar/index.tsx +++ b/apps/dashboard/components/side-bar/index.tsx @@ -6,8 +6,9 @@ import Sheet from "@mui/joy/Sheet" import Divider from "@mui/material/Divider" import ReceiptLongIcon from "@mui/icons-material/ReceiptLong" import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined" -import { usePathname } from "next/navigation" import SecurityIcon from "@mui/icons-material/Security" +import KeyIcon from "@mui/icons-material/Key" +import { usePathname } from "next/navigation" import Logo from "./../logo" import { SidebarStyles } from "./side-bar-style" @@ -92,7 +93,13 @@ const Sidebar: React.FC = () => { } - label="security" + label="Security" + isCurrentPath={isCurrentPath} + /> + } + label="API Keys" isCurrentPath={isCurrentPath} />