From 3dfbccaf23fc8eaa12613557cb0a6fa39cc1fed4 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Thu, 9 Nov 2023 11:44:49 -0500 Subject: [PATCH] better looking dashboard --- components/DashboardItem.tsx | 29 ++++++++++++++ components/SettingsSidebar.tsx | 9 +++++ layouts/MainLayout.tsx | 6 +-- package.json | 2 +- pages/collections/index.tsx | 4 +- pages/dashboard.tsx | 69 +++++++++++++++++++--------------- pages/links/index.tsx | 2 +- styles/globals.css | 4 -- 8 files changed, 83 insertions(+), 42 deletions(-) create mode 100644 components/DashboardItem.tsx diff --git a/components/DashboardItem.tsx b/components/DashboardItem.tsx new file mode 100644 index 0000000..38d6c16 --- /dev/null +++ b/components/DashboardItem.tsx @@ -0,0 +1,29 @@ +import { IconProp } from "@fortawesome/fontawesome-svg-core"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + +type Props = { + name: string; + value: number; + icon: IconProp; +}; + +export default function dashboardItem({ name, value, icon }: Props) { + return ( +
+
+ +
+
+

+ {name} +

+

+ {value} +

+
+
+ ); +} diff --git a/components/SettingsSidebar.tsx b/components/SettingsSidebar.tsx index ac9a7b7..787217c 100644 --- a/components/SettingsSidebar.tsx +++ b/components/SettingsSidebar.tsx @@ -20,6 +20,8 @@ import { } from "@fortawesome/free-brands-svg-icons"; export default function SettingsSidebar({ className }: { className?: string }) { + const LINKWARDEN_VERSION = "v2.1.0"; + const { collections } = useCollectionStore(); const router = useRouter(); @@ -136,6 +138,13 @@ export default function SettingsSidebar({ className }: { className?: string }) {
+ + Linkwarden {LINKWARDEN_VERSION} +
{children} diff --git a/package.json b/package.json index 5f53bc2..a77e211 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkwarden", - "version": "1.0.0", + "version": "2.1.0", "main": "index.js", "repository": "https://github.com/Daniel31x13/link-warden.git", "author": "Daniel31X13 ", diff --git a/pages/collections/index.tsx b/pages/collections/index.tsx index a06ad6c..32459c6 100644 --- a/pages/collections/index.tsx +++ b/pages/collections/index.tsx @@ -44,7 +44,7 @@ export default function Collections() { Your Collections

-

+

Collections you own

@@ -150,7 +150,7 @@ export default function Collections() { Other Collections

-

+

Shared collections you're a member of

diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index 8729cc8..67823c0 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -5,6 +5,9 @@ import { faChevronRight, faClockRotateLeft, faFileImport, + faFolder, + faHashtag, + faLink, faThumbTack, } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; @@ -22,6 +25,7 @@ import useModalStore from "@/store/modals"; import { toast } from "react-hot-toast"; import { MigrationFormat, MigrationRequest } from "@/types/global"; import ClickAwayHandler from "@/components/ClickAwayHandler"; +import DashboardItem from "@/components/DashboardItem"; export default function Dashboard() { const { collections } = useCollectionStore(); @@ -118,44 +122,47 @@ export default function Dashboard() { return (
-
-
- -

+

+ +
+

Dashboard

+ +

+ A brief overview of your data +

-
-
-

- {numberOfLinks} -

-

- {numberOfLinks === 1 ? "Link" : "Links"} -

-
+
+
+ -
-

- {collections.length} -

-

- {collections.length === 1 ? "Collection" : "Collections"} -

-
+
+
-
-

- {tags.length} -

-

- {tags.length === 1 ? "Tag" : "Tags"} -

+ + +
+
+ +
diff --git a/pages/links/index.tsx b/pages/links/index.tsx index 3fd46a1..5e57345 100644 --- a/pages/links/index.tsx +++ b/pages/links/index.tsx @@ -31,7 +31,7 @@ export default function Links() { All Links

-

+

Links from every Collections

diff --git a/styles/globals.css b/styles/globals.css index 82b1178..5769211 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -176,10 +176,6 @@ body { padding: 0; } -.sky-shadow { - box-shadow: 0px 0px 3px #0ea5e9; -} - .primary-btn-gradient { box-shadow: inset 0px -10px 10px #0071b7; }