diff --git a/components/AnnouncementBar.tsx b/components/Announcement.tsx similarity index 93% rename from components/AnnouncementBar.tsx rename to components/Announcement.tsx index 4696179..8fd42fe 100644 --- a/components/AnnouncementBar.tsx +++ b/components/Announcement.tsx @@ -5,7 +5,7 @@ type Props = { toggleAnnouncementBar: MouseEventHandler; }; -export default function AnnouncementBar({ toggleAnnouncementBar }: Props) { +export default function Announcement({ toggleAnnouncementBar }: Props) { const announcementId = localStorage.getItem("announcementId"); return ( diff --git a/components/LinkViews/LinkComponents/LinkTypeBadge.tsx b/components/LinkViews/LinkComponents/LinkTypeBadge.tsx index 0088bae..5a47c68 100644 --- a/components/LinkViews/LinkComponents/LinkTypeBadge.tsx +++ b/components/LinkViews/LinkComponents/LinkTypeBadge.tsx @@ -25,7 +25,7 @@ export default function LinkTypeBadge({ onClick={(e) => { e.stopPropagation(); }} - className="flex gap-1 item-center select-none text-neutral hover:opacity-70 duration-100" + className="flex gap-1 item-center select-none text-neutral hover:opacity-70 duration-100 max-w-full w-fit" >

{shortendURL}

diff --git a/components/LinkViews/LinkList.tsx b/components/LinkViews/LinkList.tsx index 1f13a5f..10b008d 100644 --- a/components/LinkViews/LinkList.tsx +++ b/components/LinkViews/LinkList.tsx @@ -91,7 +91,7 @@ export default function LinkCardCompact({
selectable ? handleCheckboxClick(link) @@ -117,29 +117,32 @@ export default function LinkCardCompact({ /> )} */}
!editMode && window.open(generateLinkHref(link, account), "_blank") } >
- +

- {unescapeString(link.name || link.description) || link.url} + {link.name ? ( + unescapeString(link.name) + ) : ( +

+ +
+ )}

-
+
{collection ? ( ) : undefined} - + {link.name && }
diff --git a/components/ModalContent/BulkDeleteLinksModal.tsx b/components/ModalContent/BulkDeleteLinksModal.tsx index 6de26cd..28c565c 100644 --- a/components/ModalContent/BulkDeleteLinksModal.tsx +++ b/components/ModalContent/BulkDeleteLinksModal.tsx @@ -2,6 +2,7 @@ import React from "react"; import useLinkStore from "@/store/links"; import toast from "react-hot-toast"; import Modal from "../Modal"; +import Button from "../ui/Button"; type Props = { onClose: Function; @@ -62,13 +63,10 @@ export default function BulkDeleteLinksModal({ onClose }: Props) { 'Delete' to bypass this confirmation in the future.

- +
); diff --git a/components/ModalContent/DeleteCollectionModal.tsx b/components/ModalContent/DeleteCollectionModal.tsx index 5407f68..6548553 100644 --- a/components/ModalContent/DeleteCollectionModal.tsx +++ b/components/ModalContent/DeleteCollectionModal.tsx @@ -6,6 +6,7 @@ import { CollectionIncludingMembersAndLinkCount } from "@/types/global"; import { useRouter } from "next/router"; import usePermissions from "@/hooks/usePermissions"; import Modal from "../Modal"; +import Button from "../ui/Button"; type Props = { onClose: Function; @@ -96,20 +97,15 @@ export default function DeleteCollectionModal({

Click the button below to leave the current collection.

)} - +
); diff --git a/components/ui/Button.tsx b/components/ui/Button.tsx index 728511a..65a3817 100644 --- a/components/ui/Button.tsx +++ b/components/ui/Button.tsx @@ -22,6 +22,7 @@ const buttonVariants = cva( size: { small: "h-7 px-2", medium: "h-10 px-4 py-2", + large: "h-12 px-7 py-2", full: "px-4 py-2 w-full", icon: "h-10 w-10", }, diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx index dd1ea52..2c606e5 100644 --- a/layouts/MainLayout.tsx +++ b/layouts/MainLayout.tsx @@ -1,5 +1,5 @@ import Navbar from "@/components/Navbar"; -import Announcement from "@/components/AnnouncementBar"; +import Announcement from "@/components/Announcement"; import Sidebar from "@/components/Sidebar"; import { ReactNode, useEffect, useState } from "react"; import getLatestVersion from "@/lib/client/getLatestVersion"; diff --git a/lib/api/controllers/dashboard/getDashboardData.ts b/lib/api/controllers/dashboard/getDashboardData.ts index b4dfbb0..3b0f751 100644 --- a/lib/api/controllers/dashboard/getDashboardData.ts +++ b/lib/api/controllers/dashboard/getDashboardData.ts @@ -14,7 +14,7 @@ export default async function getDashboardData( else if (query.sort === Sort.DescriptionZA) order = { description: "desc" }; const pinnedLinks = await prisma.link.findMany({ - take: 8, + take: 10, where: { AND: [ { @@ -46,7 +46,7 @@ export default async function getDashboardData( }); const recentlyAddedLinks = await prisma.link.findMany({ - take: 8, + take: 10, where: { collection: { OR: [ diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsx index 046c855..10a7d2d 100644 --- a/pages/collections/[id].tsx +++ b/pages/collections/[id].tsx @@ -380,7 +380,7 @@ export default function Index() { ? bulkDeleteLinks() : setBulkDeleteLinksModal(true); }} - className="btn btn-sm bg-red-400 border-red-400 hover:border-red-500 hover:bg-red-500 text-white w-fit ml-auto" + className="btn btn-sm bg-red-500 hover:bg-red-400 text-white w-fit ml-auto" disabled={ selectedLinks.length === 0 || !(permissions === true || permissions?.canDelete) diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index 318cebf..1131ba1 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -41,12 +41,14 @@ export default function Dashboard() { const handleNumberOfLinksToShow = () => { if (window.innerWidth > 1900) { + setShowLinks(10); + } else if (window.innerWidth > 1500) { setShowLinks(8); - } else if (window.innerWidth > 1280) { + } else if (window.innerWidth > 880) { setShowLinks(6); - } else if (window.innerWidth > 650) { + } else if (window.innerWidth > 550) { setShowLinks(4); - } else setShowLinks(3); + } else setShowLinks(2); }; const { width } = useWindowDimensions(); @@ -120,28 +122,30 @@ export default function Dashboard() {
-
- +
+
+ -
+
- + -
+
- + +
@@ -162,7 +166,7 @@ export default function Dashboard() {
{links[0] ? ( @@ -170,10 +174,7 @@ export default function Dashboard() {
) : ( -
+

View Your Recently Added Links Here!

@@ -189,8 +190,8 @@ export default function Dashboard() { }} className="inline-flex items-center gap-2 text-sm btn btn-accent dark:border-violet-400 text-white" > - - + + Add New Link
@@ -200,7 +201,7 @@ export default function Dashboard() { tabIndex={0} role="button" onMouseDown={dropdownTriggerer} - className="inline-flex items-center gap-2 text-sm btn btn-outline btn-neutral" + className="inline-flex items-center gap-2 text-sm btn bg-neutral-content text-secondary-foreground hover:bg-neutral-content/80 border border-neutral/30 hover:border hover:border-neutral/30" id="import-dropdown" > @@ -286,12 +287,13 @@ export default function Dashboard() { ) : (
+

Pin Your Favorite Links Here!

-

+

You can Pin your favorite Links by clicking on the three dots on each Link and clicking{" "} Pin to Dashboard. diff --git a/pages/links/index.tsx b/pages/links/index.tsx index d617d15..e64ccb4 100644 --- a/pages/links/index.tsx +++ b/pages/links/index.tsx @@ -154,7 +154,7 @@ export default function Links() { ? bulkDeleteLinks() : setBulkDeleteLinksModal(true); }} - className="btn btn-sm bg-red-400 border-red-400 hover:border-red-500 hover:bg-red-500 text-white w-fit ml-auto" + className="btn btn-sm bg-red-500 hover:bg-red-400 text-white w-fit ml-auto" disabled={ selectedLinks.length === 0 || !( diff --git a/pages/links/pinned.tsx b/pages/links/pinned.tsx index a56af06..a631573 100644 --- a/pages/links/pinned.tsx +++ b/pages/links/pinned.tsx @@ -151,7 +151,7 @@ export default function PinnedLinks() { ? bulkDeleteLinks() : setBulkDeleteLinksModal(true); }} - className="btn btn-sm bg-red-400 border-red-400 hover:border-red-500 hover:bg-red-500 text-white w-fit ml-auto" + className="btn btn-sm bg-red-500 hover:bg-red-400 text-white w-fit ml-auto" disabled={ selectedLinks.length === 0 || !( @@ -171,12 +171,20 @@ export default function PinnedLinks() { ) : (

+ + +

Pin Your Favorite Links Here!

-

+

You can Pin your favorite Links by clicking on the three dots on each Link and clicking{" "} Pin to Dashboard. diff --git a/pages/search.tsx b/pages/search.tsx index 27e2361..67d9893 100644 --- a/pages/search.tsx +++ b/pages/search.tsx @@ -178,7 +178,7 @@ export default function Search() { ? bulkDeleteLinks() : setBulkDeleteLinksModal(true); }} - className="btn btn-sm bg-red-400 border-red-400 hover:border-red-500 hover:bg-red-500 text-white w-fit ml-auto" + className="btn btn-sm bg-red-500 hover:bg-red-400 text-white w-fit ml-auto" disabled={ selectedLinks.length === 0 || !( diff --git a/pages/tags/[id].tsx b/pages/tags/[id].tsx index 1623c8f..fbe6835 100644 --- a/pages/tags/[id].tsx +++ b/pages/tags/[id].tsx @@ -308,7 +308,7 @@ export default function Index() { ? bulkDeleteLinks() : setBulkDeleteLinksModal(true); }} - className="btn btn-sm bg-red-400 border-red-400 hover:border-red-500 hover:bg-red-500 text-white w-fit ml-auto" + className="btn btn-sm bg-red-500 hover:bg-red-400 text-white w-fit ml-auto" disabled={ selectedLinks.length === 0 || !(