Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

Merge branch 'dev' into bootstrap-icons

Danielc28c73ce1807
diff --cc pages/dashboard.tsx
index 02979419,62e4d5be..352cff91
--- a/pages/dashboard.tsx
+++ b/pages/dashboard.tsx
@@@ -1,8 -1,19 +1,9 @@@
-import useCollectionStore from "@/store/collections";
-import {
- faChartSimple,
- faChevronRight,
- faClockRotateLeft,
- faFileImport,
- faFolder,
- faHashtag,
- faLink,
- faThumbTack,
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import MainLayout from "@/layouts/MainLayout";
import useLinkStore from "@/store/links";
+import useCollectionStore from "@/store/collections";
import useTagStore from "@/store/tags";
+import MainLayout from "@/layouts/MainLayout";
+import LinkCard from "@/components/LinkCard";
+ import LinkCard from "@/components/LinkViews/LinkComponents/LinkCard";
import { useEffect, useState } from "react";
import useLinks from "@/hooks/useLinks";
import Link from "next/link";
@@@ -94,8 -105,18 +95,7 @@@ export default function Dashboard()
return (
<MainLayout>
<div style={{ flex: "1 1 auto" }} className="p-5 flex flex-col gap-5">
- <div className="flex items-center gap-3">
- <FontAwesomeIcon
- icon={faChartSimple}
- className="sm:w-10 sm:h-10 w-8 h-8 text-primary drop-shadow"
- />
- <div>
- <p className="text-3xl capitalize font-thin">Dashboard</p>
-
- <p className="sm:text-sm text-xs">A brief overview of your data</p>
- </div>
- </div>
-
+ <PageHeader icon={'bi-house '} title={'Dashboard'} description={"A brief overview of your data"} />
-
<div>
<div className="flex justify-evenly flex-col md:flex-row md:items-center gap-2 md:w-full h-full rounded-2xl p-8 border border-neutral-content bg-base-200">
<DashboardItem
diff --cc pages/links/index.tsx
index dfade81a,29bf548c..72e455f1
--- a/pages/links/index.tsx
+++ b/pages/links/index.tsx
@@@ -4,10 -4,15 +4,19 @@@ import SortDropdown from "@/components/
import useLinks from "@/hooks/useLinks";
import MainLayout from "@/layouts/MainLayout";
import useLinkStore from "@/store/links";
+import { Sort } from "@/types/global";
+import React, { useState } from "react";
+import PageHeader from "@/components/PageHeader";
+ import { Sort, ViewMode } from "@/types/global";
+ import { faLink } from "@fortawesome/free-solid-svg-icons";
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+ import { useState } from "react";
+ import ViewDropdown from "@/components/ViewDropdown";
+ import DefaultView from "@/components/LinkViews/DefaultView";
+ import GridView from "@/components/LinkViews/GridView";
+ import ListView from "@/components/LinkViews/ListView";
+
+
export default function Links() {
const { links } = useLinkStore();
@@@ -18,24 -35,26 +39,20 @@@
return (
<MainLayout>
<div className="p-5 flex flex-col gap-5 w-full h-full">
- <div className="flex gap-3 justify-between">
- <div className="flex items-center gap-3">
- <FontAwesomeIcon
- icon={faLink}
- className="sm:w-10 sm:h-10 w-8 h-8 text-primary drop-shadow"
- />
- <div>
- <p className="text-3xl capitalize font-thin">All Links</p>
-
- <p className="sm:text-sm text-xs">Links from every Collections</p>
- </div>
- </div>
-
- <div className="flex gap-2 items-center mt-2">
+ <PageHeader
+ icon={"bi-link-45deg"}
+ title={"All Links"}
+ description={"Links from every Collections"}
+ />
-
+ <div className="flex gap-3 justify-end">
+ <div className="relative mt-2">
<SortDropdown sortBy={sortBy} setSort={setSortBy} />
+ <ViewDropdown viewMode={viewMode} setViewMode={setViewMode} />
</div>
</div>
+
{links[0] ? (
- <div className="grid 2xl:grid-cols-3 xl:grid-cols-2 grid-cols-1 gap-5">
- {links.map((e, i) => {
- return <LinkCard key={i} link={e} count={i} />;
- })}
- </div>
+ <LinkComponent links={links} />
) : (
<NoLinksFound text="You Haven't Created Any Links Yet" />
)}
diff --cc pages/links/pinned.tsx
index a4a70f86,b7db42df..81a7252c
--- a/pages/links/pinned.tsx
+++ b/pages/links/pinned.tsx
@@@ -3,9 -3,14 +3,17 @@@ import SortDropdown from "@/components/
import useLinks from "@/hooks/useLinks";
import MainLayout from "@/layouts/MainLayout";
import useLinkStore from "@/store/links";
+import { Sort } from "@/types/global";
+import React, { useState } from "react";
+import PageHeader from "@/components/PageHeader";
+ import { Sort, ViewMode } from "@/types/global";
+ import { faThumbTack } from "@fortawesome/free-solid-svg-icons";
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+ import { useState } from "react";
+ import ViewDropdown from "@/components/ViewDropdown";
+ import DefaultView from "@/components/LinkViews/DefaultView";
+ import GridView from "@/components/LinkViews/GridView";
+ import ListView from "@/components/LinkViews/ListView";
export default function PinnedLinks() {
const { links } = useLinkStore();
@@@ -17,14 -34,24 +37,15 @@@
return (
<MainLayout>
<div className="p-5 flex flex-col gap-5 w-full h-full">
- <div className="flex gap-3 justify-between">
- <div className="flex items-center gap-3">
- <FontAwesomeIcon
- icon={faThumbTack}
- className="sm:w-10 sm:h-10 w-8 h-8 text-primary drop-shadow"
- />
- <div>
- <p className="text-3xl capitalize font-thin">Pinned Links</p>
-
- <p className="sm:text-sm text-xs">
- Pinned Links from your Collections
- </p>
- </div>
- </div>
-
- <div className="flex gap-2 items-center mt-2">
+ <PageHeader
+ icon={"bi-pin-angle"}
+ title={"Pinned Links"}
+ description={"Pinned Links from your Collections"}
+ />
+ <div className="flex gap-3 justify-end">
+ <div className="relative mt-2">
<SortDropdown sortBy={sortBy} setSort={setSortBy} />
+ <ViewDropdown viewMode={viewMode} setViewMode={setViewMode} />
</div>
</div>
{links.some((e) => e.pinnedBy && e.pinnedBy[0]) ? (