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 fixes

Isaac Wise2b83522eaa29
diff --cc components/LinkViews/LinkComponents/LinkActions.tsx
index ad7e48b1,837cd6f5..9081e472
--- a/components/LinkViews/LinkComponents/LinkActions.tsx
+++ b/components/LinkViews/LinkComponents/LinkActions.tsx
@@@ -201,10 -218,14 +201,7 @@@ export default function LinkActions(
onClose={() => setPreservedFormatsModal(false)}
link={link}
/>
- ) : undefined}
- {linkDetailModal ? (
- <LinkDetailModal
- onClose={() => setLinkDetailModal(false)}
- onEdit={() => setEditLinkModal(true)}
- link={link}
- />
- ) : undefined}
+ )}
- {/* {expandedLink ? (
- <ExpandedLink onClose={() => setExpandedLink(false)} link={link} />
- ) : undefined} */}
</>
);
}
diff --cc components/LinkViews/LinkComponents/LinkCard.tsx
index 0e0796bb,c6b60c5d..f1e32dfe
--- a/components/LinkViews/LinkComponents/LinkCard.tsx
+++ b/components/LinkViews/LinkComponents/LinkCard.tsx
@@@ -90,8 -91,12 +91,12 @@@ export default function LinkCard({ link
const isVisible = useOnScreen(ref);
const permissions = usePermissions(collection?.id as number);
+ const router = useRouter();
+
+ let isPublic = router.pathname.startsWith("/public") ? true : undefined;
+
useEffect(() => {
- let interval: any;
+ let interval: NodeJS.Timeout | null = null;
if (
isVisible &&
diff --cc components/ModalContent/EditCollectionSharingModal.tsx
index 5763b5d4,321e6727..9f84cb16
--- a/components/ModalContent/EditCollectionSharingModal.tsx
+++ b/components/ModalContent/EditCollectionSharingModal.tsx
@@@ -130,25 -133,15 +131,15 @@@ export default function EditCollectionS
</div>
)}
- {collection.isPublic ? (
- <div>
+ {collection.isPublic && (
+ <div className={permissions === true ? "pl-5" : ""}>
<p className="mb-2">{t("sharable_link_guide")}</p>
- <div
- onClick={() => {
- try {
- navigator.clipboard
- .writeText(publicCollectionURL)
- .then(() => toast.success(t("copied")));
- } catch (err) {
- console.log(err);
- }
- }}
- className="w-full hide-scrollbar overflow-x-auto whitespace-nowrap rounded-md p-2 bg-base-200 border-neutral-content border-solid border outline-none hover:border-primary dark:hover:border-primary duration-100 cursor-text"
- >
+ <div className="w-full hide-scrollbar overflow-x-auto whitespace-nowrap rounded-md p-2 bg-base-200 border-neutral-content border-solid border flex items-center gap-2 justify-between">
{publicCollectionURL}
+ <CopyButton text={publicCollectionURL} />
</div>
</div>
- ) : null}
+ )}
{permissions === true && <div className="divider my-3"></div>}
diff --cc components/ModalContent/PreservedFormatsModal.tsx
index 5a0983c0,309170ac..d883a217
--- a/components/ModalContent/PreservedFormatsModal.tsx
+++ b/components/ModalContent/PreservedFormatsModal.tsx
@@@ -91,10 -96,10 +91,10 @@@ export default function PreservedFormat
useEffect(() => {
(async () => {
- await getLink.mutateAsync(link.id as number);
+ await getLink.mutateAsync({ id: link.id as number });
})();
- let interval: any;
+ let interval: NodeJS.Timeout | null = null;
if (!isReady()) {
interval = setInterval(async () => {
diff --cc components/ReadableView.tsx
index 073e8797,def3185c..18477a0a
--- a/components/ReadableView.tsx
+++ b/components/ReadableView.tsx
@@@ -73,9 -66,9 +66,9 @@@ export default function ReadableView({
}, [link]);
useEffect(() => {
- if (link) getLink.mutateAsync(link?.id as number);
+ if (link) getLink.mutateAsync({ id: link.id as number });
- let interval: any;
+ let interval: NodeJS.Timeout | null = null;
if (
link &&
(link?.image === "pending" ||
diff --cc pages/public/collections/[id].tsx
index 98153cb6,53efbb3e..4c5f7779
--- a/pages/public/collections/[id].tsx
+++ b/pages/public/collections/[id].tsx
@@@ -29,13 -27,17 +28,11 @@@ export default function PublicCollectio
const { settings } = useLocalSettingsStore();
- const { data: collections = [] } = useCollections();
-
const router = useRouter();
- const [collectionOwner, setCollectionOwner] = useState({
- id: null as unknown as number,
- name: "",
- username: "",
- image: "",
- archiveAsScreenshot: undefined as unknown as boolean,
- archiveAsMonolith: undefined as unknown as boolean,
- archiveAsPDF: undefined as unknown as boolean,
- });
+ const [collectionOwner, setCollectionOwner] = useState<
+ Partial<AccountSettings>
+ >({});
const [searchFilter, setSearchFilter] = useState({
name: true,