diff --git a/components/Drawer.tsx b/components/Drawer.tsx index 07673fb..49cd9eb 100644 --- a/components/Drawer.tsx +++ b/components/Drawer.tsx @@ -46,7 +46,7 @@ export default function Drawer({ data-testid="mobile-modal-container" >
{children} diff --git a/components/LinkDetails.tsx b/components/LinkDetails.tsx index c9b1e59..5c940de 100644 --- a/components/LinkDetails.tsx +++ b/components/LinkDetails.tsx @@ -10,6 +10,7 @@ import { readabilityAvailable, monolithAvailable, screenshotAvailable, + previewAvailable, } from "@/lib/shared/getArchiveValidity"; import PreservedFormatRow from "@/components/PreserverdFormatRow"; import getPublicUserData from "@/lib/client/getPublicUserData"; @@ -22,13 +23,22 @@ import CopyButton from "./CopyButton"; import { useRouter } from "next/router"; import Icon from "./Icon"; import { IconWeight } from "@phosphor-icons/react"; +import Image from "next/image"; +import clsx from "clsx"; type Props = { className?: string; link: LinkIncludingShortenedCollectionAndTags; + standalone?: boolean; + editMode?: boolean; }; -export default function LinkDetails({ className, link }: Props) { +export default function LinkDetails({ + className, + link, + standalone, + editMode, +}: Props) { const { t } = useTranslation(); const session = useSession(); const getLink = useGetLink(); @@ -126,192 +136,241 @@ export default function LinkDetails({ className, link }: Props) { const isPublicRoute = router.pathname.startsWith("/public") ? true : false; return ( -{link.name}
} +{link.name}
} + + {link.url && ( + <> +{t("link")}
+ +{t("link")}
+{t("collection")}
{link.collection.name}
{t("collection")}
- -{link.collection.name}
-{t("tags")}
+{t("tags")}
+{t("notes")}
+ +{link.description}
{t("notes")}
- -{link.description}
-- {link.url ? t("preserved_formats") : t("file")} -
- -{t("preservation_in_queue")}
-{t("check_back_later")}
-{t("there_are_more_formats")}
-{t("check_back_later")}
-{t("view_latest_snapshot")}
- - - )} + {link.url ? t("preserved_formats") : t("file")} + + ++ {t("preservation_in_queue")} +
+{t("check_back_later")}
+{t("there_are_more_formats")}
+{t("check_back_later")}
+{t("view_latest_snapshot")}
+ + + )} +