From 1f20180a51e3c4da19c953523266782551a42212 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Mon, 4 Dec 2023 10:24:45 -0500 Subject: [PATCH] fixes and improvements --- components/LinkCard.tsx | 2 +- components/Modal/Link/PreservedFormats.tsx | 14 +++++---- .../ModalContent/EditCollectionModal.tsx | 5 +++- .../EditCollectionSharingModal.tsx | 4 +-- components/ModalContent/EditLinkModal.tsx | 2 +- .../ModalContent/NewCollectionModal.tsx | 5 +++- components/ModalContent/NewLinkModal.tsx | 2 +- components/ModalContent/UploadFileModal.tsx | 3 +- components/SubmitButton.tsx | 2 +- lib/api/controllers/links/postLink.ts | 27 +++++++++++++++-- pages/_app.tsx | 2 +- pages/api/v1/archives/[linkId].ts | 30 +++++++++++++------ pages/collections/[id].tsx | 2 +- pages/public/collections/[id].tsx | 2 +- tailwind.config.js | 8 ++--- 15 files changed, 75 insertions(+), 35 deletions(-) diff --git a/components/LinkCard.tsx b/components/LinkCard.tsx index 555358a..7a23d87 100644 --- a/components/LinkCard.tsx +++ b/components/LinkCard.tsx @@ -218,7 +218,7 @@ export default function LinkCard({ link, count, className }: Props) { width={64} height={64} alt="" - className={`absolute w-12 duration-100 bg-white rounded-md p-1 bottom-5 right-5 select-none z-10`} + className={`absolute w-12 duration-100 bg-white shadow rounded-md p-1 bottom-5 right-5 select-none z-10`} draggable="false" onError={(e) => { const target = e.target as HTMLElement; diff --git a/components/Modal/Link/PreservedFormats.tsx b/components/Modal/Link/PreservedFormats.tsx index d1bc5bf..4017c32 100644 --- a/components/Modal/Link/PreservedFormats.tsx +++ b/components/Modal/Link/PreservedFormats.tsx @@ -92,7 +92,7 @@ export default function PreservedFormats() { {link?.screenshotPath && link?.screenshotPath !== "pending" ? (
-
+
@@ -131,7 +131,7 @@ export default function PreservedFormats() { {link?.pdfPath && link.pdfPath !== "pending" ? (
-
+
@@ -166,7 +166,7 @@ export default function PreservedFormats() {
{link?.collection.ownerId === session.data?.user.id ? (
updateArchive()} > -

Update Preserved Formats

-

(Refresh Link)

+
+

Update Preserved Formats

+

(Refresh Link)

+
) : undefined}
-
diff --git a/components/ModalContent/EditCollectionSharingModal.tsx b/components/ModalContent/EditCollectionSharingModal.tsx index e6771ce..e456d75 100644 --- a/components/ModalContent/EditCollectionSharingModal.tsx +++ b/components/ModalContent/EditCollectionSharingModal.tsx @@ -180,7 +180,7 @@ export default function EditCollectionSharingModal({ setMemberState ) } - className="btn btn-primary btn-square btn-sm h-10 w-10" + className="btn btn-accent text-white btn-square btn-sm h-10 w-10" >
@@ -436,7 +436,7 @@ export default function EditCollectionSharingModal({ {permissions === true && (
-
diff --git a/components/ModalContent/NewCollectionModal.tsx b/components/ModalContent/NewCollectionModal.tsx index 2c3a806..8d43fc7 100644 --- a/components/ModalContent/NewCollectionModal.tsx +++ b/components/ModalContent/NewCollectionModal.tsx @@ -115,7 +115,10 @@ export default function NewCollectionModal({ onClose }: Props) {
-
diff --git a/components/ModalContent/NewLinkModal.tsx b/components/ModalContent/NewLinkModal.tsx index 3eaa6aa..307339d 100644 --- a/components/ModalContent/NewLinkModal.tsx +++ b/components/ModalContent/NewLinkModal.tsx @@ -193,7 +193,7 @@ export default function NewLinkModal({ onClose }: Props) {

{optionsExpanded ? "Hide" : "More"} Options

- diff --git a/components/ModalContent/UploadFileModal.tsx b/components/ModalContent/UploadFileModal.tsx index 8939bd1..42faf6d 100644 --- a/components/ModalContent/UploadFileModal.tsx +++ b/components/ModalContent/UploadFileModal.tsx @@ -110,7 +110,6 @@ export default function UploadFileModal({ onClose }: Props) { else if (file.type === "image/png") fileType = ArchivedFormat.png; else if (file.type === "application/pdf") fileType = ArchivedFormat.pdf; - console.log(fileType); if (fileType !== null) { setSubmitLoader(true); @@ -227,7 +226,7 @@ export default function UploadFileModal({ onClose }: Props) {

{optionsExpanded ? "Hide" : "More"} Options

- diff --git a/components/SubmitButton.tsx b/components/SubmitButton.tsx index d33ce1f..1ee208b 100644 --- a/components/SubmitButton.tsx +++ b/components/SubmitButton.tsx @@ -21,7 +21,7 @@ export default function SubmitButton({ return (