diff --git a/bun.lockb b/bun.lockb new file mode 100644 index 0000000..5ce9deb Binary files /dev/null and b/bun.lockb differ diff --git a/public/media/browsers/chrome.svg b/public/media/browsers/chrome.svg new file mode 100644 index 0000000..f9533e1 --- /dev/null +++ b/public/media/browsers/chrome.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/media/browsers/edge.svg b/public/media/browsers/edge.svg new file mode 100644 index 0000000..f744852 --- /dev/null +++ b/public/media/browsers/edge.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/media/browsers/firefox.svg b/public/media/browsers/firefox.svg new file mode 100644 index 0000000..2f6c51e --- /dev/null +++ b/public/media/browsers/firefox.svg @@ -0,0 +1,147 @@ + + + + Firefox Browser logo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Firefox Browser logo + + + + \ No newline at end of file diff --git a/public/media/browsers/safari.svg b/public/media/browsers/safari.svg new file mode 100644 index 0000000..47ae0d5 --- /dev/null +++ b/public/media/browsers/safari.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/media/browsers/samsung.svg b/public/media/browsers/samsung.svg new file mode 100644 index 0000000..8689cd9 --- /dev/null +++ b/public/media/browsers/samsung.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/dashboard/org/status-page/create-status-page-dialog.tsx b/src/components/dashboard/org/status-page/create-status-page-dialog.tsx new file mode 100644 index 0000000..3562fb5 --- /dev/null +++ b/src/components/dashboard/org/status-page/create-status-page-dialog.tsx @@ -0,0 +1,36 @@ +import { ReactElement } from "react"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; +import { Button } from "@/components/ui/button"; +import SimpleTooltip from "@/components/simple-tooltip"; + +const CreateStatusPageDialog = (): ReactElement => { + return ( + + + + + + + + + Are you absolutely sure? + + This action cannot be undone. This will permanently + delete your account and remove your data from our + servers. + + + + + ); +}; +export default CreateStatusPageDialog; diff --git a/src/components/dashboard/org/status-page/status-page-list.tsx b/src/components/dashboard/org/status-page/status-page-list.tsx index 904a87b..51c77fc 100644 --- a/src/components/dashboard/org/status-page/status-page-list.tsx +++ b/src/components/dashboard/org/status-page/status-page-list.tsx @@ -1,13 +1,12 @@ "use client"; import { ReactElement } from "react"; -import { Button } from "@/components/ui/button"; -import SimpleTooltip from "@/components/simple-tooltip"; import { Organization } from "@/app/types/org/organization"; import { useOrganizationContext } from "@/app/provider/organization-provider"; import { OrganizationState } from "@/app/store/organization-store"; import { StatusPage as StatusPageType } from "@/app/types/page/status-page"; import StatusPage from "@/components/dashboard/org/status-page/status-page"; +import CreateStatusPageDialog from "@/components/dashboard/org/status-page/create-status-page-dialog"; /** * A list of status pages for the @@ -22,11 +21,9 @@ const StatusPageList = (): ReactElement => { return (
{/* Create */} - - - +
+ +
{/* Status Pages */} {organization?.statusPages.map( diff --git a/src/components/dashboard/user/settings/device/device.tsx b/src/components/dashboard/user/settings/device/device.tsx index beee1da..fa3791e 100644 --- a/src/components/dashboard/user/settings/device/device.tsx +++ b/src/components/dashboard/user/settings/device/device.tsx @@ -7,15 +7,29 @@ import { DateTime } from "luxon"; import { ArrowLeftEndOnRectangleIcon, ComputerDesktopIcon, + DevicePhoneMobileIcon, + DeviceTabletIcon, + QuestionMarkCircleIcon, } from "@heroicons/react/24/outline"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; +import SimpleTooltip from "@/components/simple-tooltip"; +import Image from "next/image"; const deviceIcons = { DESKTOP: , - TABLET: , - PHONE: , - UNKNOWN: , + TABLET: , + PHONE: , + UNKNOWN: , +}; + +const browserIcons = { + FIREFOX: "firefox.svg", + EDGE: "edge.svg", + CHROME: "firefox.svg", + SAFARI: "safari.svg", + SAMSUNGBROWSER: "samsung.svg", + UNKNOWN: , }; const Device = ({ @@ -28,6 +42,7 @@ const Device = ({ const [timeSinceFirstLogin, setTimeSinceFirstLogin] = useState( DateTime.fromISO(device.firstLogin.toString()).toRelative() ); + const browserIcon: ReactElement | string = browserIcons[device.browserType]; useEffect(() => { const interval = setInterval(() => { @@ -45,6 +60,18 @@ const Device = ({
{deviceIcons[device.type]}
+
+ {typeof browserIcon === "string" ? ( + {`The + ) : ( + browserIcon + )} +
{/* Name & Location */} @@ -53,10 +80,12 @@ const Device = ({ {capitalizeWords(device.type)} ·{" "} {capitalizeWords(device.browserType)} -

- {device.location ?? "Unknown Location"} ·{" "} - {timeSinceFirstLogin} -

+ +

+ {device.location ?? "Unknown Location"} ·{" "} + {timeSinceFirstLogin} +

+
{/* Corner Content */}