⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
improved UX
daniel31x13d822db440b7a
diff --git a/components/Preservation/Preservation.tsx b/components/Preservation/Preservation.tsxindex 00423bde..a5171f8a 100644--- a/components/Preservation/Preservation.tsx+++ b/components/Preservation/Preservation.tsx@@ -7,11 +7,15 @@ import {import { useTranslation } from "next-i18next";import { useRouter } from "next/router";import clsx from "clsx";-import { formatAvailable } from "@/lib/shared/formatStats";+import {+ atLeastOneFormatAvailable,+ formatAvailable,+} from "@/lib/shared/formatStats";import { PreservationSkeleton } from "../Skeletons";import remToPixels from "@/lib/client/remToPixels";import { useReducedMotion } from "framer-motion";import { PreservationContent } from "./PreservationContent";+import { BeatLoader } from "react-spinners";export default function Preservation({link,@@ -123,9 +127,17 @@ export default function Preservation({pointerEvents: "auto",}}>- {!isExpanded && link?.id && (- <div className="text-sm text-neutral mb-3 flex justify-between items-center w-full gap-2">- <div className="flex gap-1 h-8 rounded-xl bg-neutral-content bg-opacity-50 text-base-content p-1 text-xs duration-100 select-none z-10">+ {atLeastOneFormatAvailable(link) && !isExpanded && link?.id && (+ <div+ className={clsx(+ "text-sm text-neutral mb-3 flex justify-between items-center w-full gap-2"+ )}+ >+ <div+ className={clsx(+ "flex gap-1 h-8 rounded-xl bg-neutral-content bg-opacity-50 text-base-content p-1 text-xs duration-100 select-none z-10"+ )}+ >{formatAvailable(link, "readable") && (<divclassName={clsx(@@ -210,7 +222,12 @@ export default function Preservation({</div>)}- <div className={clsx("w-full", isExpanded ? "h-full" : "h-auto")}>+ <div+ className={clsx(+ "w-full",+ isExpanded ? "h-full" : "h-[calc(80vh-3.75rem)]"+ )}+ >{format !== undefined && link.id && delayPassed ? (<RenderFormatlink={link}@@ -220,6 +237,19 @@ export default function Preservation({containerRef={containerRef}setIsExpanded={setIsExpanded}/>+ ) : delayPassed ? (+ <div+ className={`w-full h-full flex flex-col justify-center items-center p-10`}+ >+ <BeatLoader+ color="oklch(var(--p))"+ className="mx-auto mb-3"+ size={30}+ />++ <p className="text-center text-2xl">{t("preservation_in_queue")}</p>+ <p className="text-center text-lg">{t("check_back_later")}</p>+ </div>) : (<PreservationSkeleton />)}diff --git a/lib/api/autoTagLink.ts b/lib/api/autoTagLink.tsindex 0e358dd0..3fc30d42 100644--- a/lib/api/autoTagLink.ts+++ b/lib/api/autoTagLink.ts@@ -122,8 +122,7 @@ export default async function autoTagLink(tags = tags.filter((tag: string) => user.aiPredefinedTags.includes(tag));} else if (user.aiTaggingMethod === AiTaggingMethod.GENERATE) {tags = tags.map((tag: string) =>- // I was thinking of doing something like this instead: tag.length > 3 ? titleCase(tag.toLowerCase()) : tag- titleCase(tag.toLowerCase())+ tag.length > 3 ? titleCase(tag.toLowerCase()) : tag);}