⚡️⚡️⚡️ 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
changes and improvements
Daniel0912614e41e7
diff --git a/components/Modal/User/ChangePassword.tsx b/components/Modal/User/ChangePassword.tsxindex 0cb21681..55e8c601 100644--- a/components/Modal/User/ChangePassword.tsx+++ b/components/Modal/User/ChangePassword.tsx@@ -80,16 +80,16 @@ export default function ChangePassword({value={newPassword}onChange={(e) => setNewPassword1(e.target.value)}type="password"- placeholder="*****************"+ placeholder="***********"className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"/>- <p className="text-sm text-sky-500">Re-enter New Password</p>+ <p className="text-sm text-sky-500">Confirm New Password</p><inputvalue={newPassword2}onChange={(e) => setNewPassword2(e.target.value)}type="password"- placeholder="*****************"+ placeholder="***********"className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"/>diff --git a/components/Sidebar.tsx b/components/Sidebar.tsxindex 5263eceb..b5763444 100644--- a/components/Sidebar.tsx+++ b/components/Sidebar.tsx@@ -2,7 +2,6 @@ import useCollectionStore from "@/store/collections";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import {faFolder,- faBox,faHashtag,faChartSimple,faChevronDown,@@ -13,6 +12,7 @@ import Link from "next/link";import { useRouter } from "next/router";import { useEffect, useState } from "react";import { Disclosure, Transition } from "@headlessui/react";+import Image from "next/image";export default function Sidebar({ className }: { className?: string }) {const [tagDisclosure, setTagDisclosure] = useState<boolean>(() => {@@ -53,55 +53,50 @@ export default function Sidebar({ className }: { className?: string }) {<divclassName={`bg-gray-100 h-screen w-64 xl:w-80 overflow-y-auto border-solid border-r-sky-100 px-2 border z-20 ${className}`}>- <p className="p-2 text-sky-500 font-bold text-2xl my-2 leading-4">- Linkwarden- </p>-- <div className="flex flex-col gap-1">- <Link href="/dashboard">- <div- className={`${- active === "/dashboard"- ? "bg-sky-200"- : "hover:bg-slate-200 bg-gray-100"- } outline-sky-100 outline-1 duration-100 py-1 px-2 rounded-md cursor-pointer flex items-center gap-2`}- >- <FontAwesomeIcon- icon={faChartSimple}- className={`w-6 h-6 drop-shadow text-sky-500`}- />- <p className="text-sky-600">Dashboard</p>- </div>+ <div className="flex justify-center gap-2 mt-2">+ <Link+ href="/dashboard"+ className={`${+ active === "/dashboard"+ ? "bg-sky-200"+ : "hover:bg-slate-200 bg-gray-100"+ } outline-sky-100 outline-1 duration-100 py-1 px-2 rounded-md cursor-pointer flex justify-center flex-col items-center gap-1`}+ >+ <FontAwesomeIcon+ icon={faChartSimple}+ className={`w-8 h-8 drop-shadow text-sky-500`}+ />+ <p className="text-sky-600 text-xs font-semibold">Dashboard</p></Link>- <Link href="/links">- <div- className={`${- active === "/links"- ? "bg-sky-200"- : "hover:bg-slate-200 bg-gray-100"- } outline-sky-100 outline-1 duration-100 py-1 px-2 rounded-md cursor-pointer flex items-center gap-2`}- >- <FontAwesomeIcon- icon={faLink}- className={`w-6 h-6 drop-shadow text-sky-500`}- />- <p className="text-sky-600">All Links</p>- </div>+ <Link+ href="/links"+ className={`${+ active === "/links"+ ? "bg-sky-200"+ : "hover:bg-slate-200 bg-gray-100"+ } outline-sky-100 outline-1 duration-100 py-1 px-2 rounded-md cursor-pointer flex justify-center flex-col items-center gap-1 w-full`}+ >+ <FontAwesomeIcon+ icon={faLink}+ className={`w-8 h-8 drop-shadow text-sky-500`}+ />+ <p className="text-sky-600 text-xs font-semibold">All Links</p></Link>- <Link href="/collections">- <div- className={`${- active === "/collections" ? "bg-sky-200" : "hover:bg-slate-200"- } outline-sky-100 outline-1 duration-100 py-1 px-2 rounded-md cursor-pointer flex items-center gap-2`}- >- <FontAwesomeIcon- icon={faBox}- className={`w-6 h-6 drop-shadow text-sky-500`}- />- <p className="text-sky-600">All Collections</p>- </div>+ <Link+ href="/collections"+ className={`${+ active === "/collections" ? "bg-sky-200" : "hover:bg-slate-200"+ } outline-sky-100 outline-1 duration-100 py-1 px-2 rounded-md cursor-pointer flex justify-center flex-col items-center gap-1 w-full`}+ >+ <FontAwesomeIcon+ icon={faFolder}+ className={`w-8 h-8 drop-shadow text-sky-500`}+ />+ <p className="text-sky-600 text-xs font-semibold">+ <span className="hidden xl:inline-block">All</span> Collections+ </p></Link></div>diff --git a/lib/client/addMemberToCollection.ts b/lib/client/addMemberToCollection.tsindex bccd2d3f..deb7fa01 100644--- a/lib/client/addMemberToCollection.ts+++ b/lib/client/addMemberToCollection.ts@@ -19,7 +19,7 @@ const addMemberToCollection = async (// member can't be emptymemberUsername.trim() !== "" &&// member can't be the owner- memberUsername.trim() !== ownerUsername+ memberUsername.trim().toLowerCase() !== ownerUsername.toLowerCase()) {// Lookup, get data/err, list ...const user = await getPublicUserDataByUsername(@@ -40,7 +40,7 @@ const addMemberToCollection = async (});}} else if (checkIfMemberAlreadyExists) toast.error("User already exists.");- else if (memberUsername.trim() === ownerUsername)+ else if (memberUsername.trim().toLowerCase() === ownerUsername.toLowerCase())toast.error("You are already the collection owner.");};diff --git a/pages/collections/index.tsx b/pages/collections/index.tsxindex adbe3bc3..6c7c5266 100644--- a/pages/collections/index.tsx+++ b/pages/collections/index.tsx@@ -1,7 +1,7 @@import useCollectionStore from "@/store/collections";import {- faBox,faEllipsis,+ faFolder,faPlus,faSort,} from "@fortawesome/free-solid-svg-icons";@@ -36,7 +36,7 @@ export default function Collections() {<div className="flex gap-3 items-end"><div className="flex gap-2"><FontAwesomeIcon- icon={faBox}+ icon={faFolder}className="sm:w-8 sm:h-8 w-6 h-6 mt-2 text-sky-500 drop-shadow"/><p className="sm:text-4xl text-3xl capitalize bg-gradient-to-tr from-sky-500 to-slate-400 bg-clip-text text-transparent font-bold">diff --git a/pages/login.tsx b/pages/login.tsxindex 89a9b856..9ba2bb2f 100644--- a/pages/login.tsx+++ b/pages/login.tsx@@ -73,11 +73,20 @@ export default function Login() {<inputtype="password"- placeholder="*****************"+ placeholder="***********"value={form.password}onChange={(e) => setForm({ ...form, password: e.target.value })}className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"/>+ {EmailProvider && (+ <Link+ href={"/forgot"}+ className="w-fit ml-auto text-gray-500 font-semibold"+ >+ Forgot Password?+ </Link>+ )}+<SubmitButtononClick={loginUser}label="Login"@@ -91,14 +100,6 @@ export default function Login() {Sign Up</Link></div>- {EmailProvider && (- <div className="flex items-baseline gap-1 justify-center mb-3">- <p className="w-fit text-gray-500">Forgot your password?</p>- <Link href={"/forgot"} className="block text-sky-500 font-bold">- Send login link- </Link>- </div>- )}</>);}diff --git a/pages/public/collections/[id].tsx b/pages/public/collections/[id].tsxindex 2f066125..2f6e32f6 100644--- a/pages/public/collections/[id].tsx+++ b/pages/public/collections/[id].tsx@@ -63,9 +63,9 @@ export default function PublicCollections() {})}</div>- <p className="text-center font-bold text-gray-500">+ {/* <p className="text-center font-bold text-gray-500">List created with <span className="text-sky-500">Linkwarden.</span>- </p>+ </p> */}</div>) : (<></>diff --git a/pages/register.tsx b/pages/register.tsxindex c17db4a2..942e19c5 100644--- a/pages/register.tsx+++ b/pages/register.tsx@@ -139,41 +139,50 @@ export default function Register() {</>) : undefined}- <p className="text-sm text-sky-500 w-fit font-semibold">Password</p>+ <div className="flex item-center gap-5">+ <div>+ <p className="text-sm text-sky-500 w-fit font-semibold mb-3">+ Password+ </p>- <input- type="password"- placeholder="*****************"- value={form.password}- onChange={(e) => setForm({ ...form, password: e.target.value })}- className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"- />+ <input+ type="password"+ placeholder="***********"+ value={form.password}+ onChange={(e) => setForm({ ...form, password: e.target.value })}+ className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"+ />+ </div>- <p className="text-sm text-sky-500 w-fit font-semibold">- Re-enter Password- </p>+ <div>+ <p className="text-sm text-sky-500 w-fit font-semibold mb-3">+ Confirm Password+ </p>- <input- type="password"- placeholder="*****************"- value={form.passwordConfirmation}- onChange={(e) =>- setForm({ ...form, passwordConfirmation: e.target.value })- }- className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"- />+ <input+ type="password"+ placeholder="***********"+ value={form.passwordConfirmation}+ onChange={(e) =>+ setForm({ ...form, passwordConfirmation: e.target.value })+ }+ className="w-full rounded-md p-3 mx-auto border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100"+ />+ </div>+ </div><SubmitButtononClick={registerUser}label="Sign Up"className="mt-2 w-full text-center"loading={submitLoader}/>- </div>- <div className="flex items-baseline gap-1 justify-center my-3">- <p className="w-fit text-gray-500">Already have an account?</p>- <Link href={"/login"} className="block w-min text-sky-500 font-bold">- Login- </Link>++ <div className="flex items-baseline gap-1 justify-center">+ <p className="w-fit text-gray-500">Already have an account?</p>+ <Link href={"/login"} className="block w-min text-sky-500 font-bold">+ Login+ </Link>+ </div></div></>);diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.pngindex e20c59d8..1cb2d493 100644Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differdiff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.pngindex 6e77e384..a2045ff2 100644Binary files a/public/android-chrome-512x512.png and b/public/android-chrome-512x512.png differdiff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.pngindex 962a1400..4bd72caa 100644Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differdiff --git a/public/favicon-16x16.png b/public/favicon-16x16.pngindex 5fae8538..6236e5c8 100644Binary files a/public/favicon-16x16.png and b/public/favicon-16x16.png differdiff --git a/public/favicon-32x32.png b/public/favicon-32x32.pngindex 0fa9a5b4..9509579f 100644Binary files a/public/favicon-32x32.png and b/public/favicon-32x32.png differdiff --git a/public/favicon.ico b/public/favicon.icoindex 65bcb6d7..40c5ef7d 100644Binary files a/public/favicon.ico and b/public/favicon.ico differdiff --git a/public/icon.png b/public/icon.pngindex e61f1112..f55c193a 100644Binary files a/public/icon.png and b/public/icon.png differdiff --git a/public/site.webmanifest b/public/site.webmanifestindex fa99de77..45dc8a20 100644--- a/public/site.webmanifest+++ b/public/site.webmanifest@@ -1,19 +1 @@-{- "name": "",- "short_name": "",- "icons": [- {- "src": "/android-chrome-192x192.png",- "sizes": "192x192",- "type": "image/png"- },- {- "src": "/android-chrome-512x512.png",- "sizes": "512x512",- "type": "image/png"- }- ],- "theme_color": "#ffffff",- "background_color": "#ffffff",- "display": "standalone"-}+{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}\ No newline at end of file