From 78ca6da307a22c2324c37887cfe08a90d2f704e6 Mon Sep 17 00:00:00 2001 From: shashified Date: Tue, 19 May 2026 21:30:44 +0530 Subject: [PATCH 01/45] Fix dropdown hover border radius --- src/components/ui/PinnedModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/PinnedModal.tsx b/src/components/ui/PinnedModal.tsx index b9779419..6c358fbe 100644 --- a/src/components/ui/PinnedModal.tsx +++ b/src/components/ui/PinnedModal.tsx @@ -180,7 +180,7 @@ const PinnedModal = ({ }} > {page === "Navbar" ? ( - + {triggerName} From 5f1db7f366b69b0e542e285855c44eaedc0659c1 Mon Sep 17 00:00:00 2001 From: shashified Date: Tue, 19 May 2026 21:32:03 +0530 Subject: [PATCH 02/45] fixed hover issue --- src/components/ui/PinnedModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/PinnedModal.tsx b/src/components/ui/PinnedModal.tsx index 6c358fbe..e710f9da 100644 --- a/src/components/ui/PinnedModal.tsx +++ b/src/components/ui/PinnedModal.tsx @@ -180,7 +180,7 @@ const PinnedModal = ({ }} > {page === "Navbar" ? ( - + {triggerName} From c92a721a1c3b74cfa3e7a17438c49c6f0c10f9a3 Mon Sep 17 00:00:00 2001 From: shashified Date: Thu, 21 May 2026 15:30:52 +0530 Subject: [PATCH 03/45] Fix dropdown hover radius alignment --- src/components/FloatingNavbar.tsx | 28 +++++++++++++++------------- src/components/ui/PinnedModal.tsx | 4 ++-- src/components/ui/dropdown-menu.tsx | 8 ++++---- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/components/FloatingNavbar.tsx b/src/components/FloatingNavbar.tsx index eee4a1f8..53b65fb8 100644 --- a/src/components/FloatingNavbar.tsx +++ b/src/components/FloatingNavbar.tsx @@ -43,7 +43,7 @@ export default function FloatingNavbar({ onNavigate }: Props) { onNavigate()} - className="flex w-full items-center gap-3 rounded-lg px-3 py-1 hover:bg-[#1A1823] transition" + className="flex w-full items-center gap-3 rounded-md px-3 py-1 hover:bg-[#1A1823] transition" > @@ -62,18 +62,20 @@ export default function FloatingNavbar({ onNavigate }: Props) { - e.preventDefault()}> -
- -
-
+ e.preventDefault()} + className="mx-1 my-1 hover:bg-[#1F2A3D]" +> + + - e.preventDefault()}> -
- -
-
-
+ e.preventDefault()} + className="mx-1 my-1 hover:bg-[#1F2A3D]" +> + + +
diff --git a/src/components/ui/PinnedModal.tsx b/src/components/ui/PinnedModal.tsx index e710f9da..97489a3d 100644 --- a/src/components/ui/PinnedModal.tsx +++ b/src/components/ui/PinnedModal.tsx @@ -55,7 +55,7 @@ const SortableItem = ({ ref={setNodeRef} style={style} {...attributes} - className={`mb-2 flex items-center justify-between rounded-md border border-[#3A3745] px-4 py-2 pl-2 shadow-sm ${ + className={`mb-2 flex items-center justify-between rounded-2xl border border-[#3A3745] px-2 py-1 pl-2 shadow-sm ${ isDragging ? "scale-[1.02] cursor-grabbing opacity-90" : "cursor-grab" }`} > @@ -206,7 +206,7 @@ const PinnedModal = ({
-
+
{displayPapers.length > 0 ? ( svg]:size-4 [&>svg]:shrink-0", - inset && "pl-8", - className, - )} + "relative flex cursor-default select-none items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-none transition-colors hover:bg-[#1F2A3D] focus:bg-[#1F2A3D] text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", + inset && "pl-8", + className, +)} {...props} /> )); From 80fec5502292cddf347de337687014dc3882fbb6 Mon Sep 17 00:00:00 2001 From: Gslmao Date: Thu, 4 Jun 2026 09:27:12 +0530 Subject: [PATCH 04/45] fix: fixed sharebutton's behaviour during fullscreen --- src/components/ShareButton.tsx | 48 +++++++++++-------- src/components/newPdfViewer.tsx | 85 +++++++++++++++++---------------- src/components/ui/dialog.tsx | 6 ++- 3 files changed, 76 insertions(+), 63 deletions(-) diff --git a/src/components/ShareButton.tsx b/src/components/ShareButton.tsx index e06c7a65..0759df15 100644 --- a/src/components/ShareButton.tsx +++ b/src/components/ShareButton.tsx @@ -1,14 +1,15 @@ "use client"; -import React, { useEffect, useState } from "react"; +import React, { useEffect, useRef, useState } from "react"; import { Dialog, - DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, + DialogContent, } from "./ui/dialog"; +import * as DialogPrimitive from "@radix-ui/react-dialog"; import { Copy } from "lucide-react"; import toast from "react-hot-toast"; import { FaShare } from "react-icons/fa"; @@ -16,25 +17,35 @@ import QR from "./qr"; import { Button } from "./ui/button"; import { usePathname } from "next/navigation"; -export default function ShareButton() { +interface ShareButtonProps { + isFullscreen: boolean; + viewerRef: React.RefObject; +} + +export default function ShareButton({ isFullscreen, viewerRef }: ShareButtonProps) { const [origin, setOrigin] = useState(""); + const pathname = usePathname(); useEffect(() => { - if (typeof window !== "undefined") { - setOrigin(window.location.origin); - } + setOrigin(window.location.origin); }, []); - const pathname = usePathname(); const paperPath = origin + pathname; + console.log("isFullscreen:", isFullscreen, "container:", isFullscreen ? viewerRef.current : document.body); return ( - - + Share Papers with your friends! @@ -42,21 +53,18 @@ export default function ShareButton() {
- +
); -} +} \ No newline at end of file diff --git a/src/components/newPdfViewer.tsx b/src/components/newPdfViewer.tsx index a2c47ab8..634765e0 100644 --- a/src/components/newPdfViewer.tsx +++ b/src/components/newPdfViewer.tsx @@ -25,6 +25,7 @@ interface ControlProps { forceMobile?: boolean; isMobile: boolean; isSmall: boolean; + viewerRef: React.RefObject; } interface PdfViewerProps { @@ -57,7 +58,7 @@ function useBreakpoint() { } const Controls = memo(function Controls({documentId, toggleFullscreen, isFullscreen, onDownload, - forceMobile, isMobile, isSmall}: ControlProps) { + forceMobile, isMobile, isSmall, viewerRef}: ControlProps) { const { provides: zoomProv, state: zoomState } = useZoom(documentId); const { provides: scrollProv, state: scrollState } = useScroll(documentId); @@ -127,7 +128,7 @@ const Controls = memo(function Controls({documentId, toggleFullscreen, isFullscr - + - - {/* Preview */} -
- {item.file.type.startsWith("image/") ? ( - {`Page - ) : ( -