🎉️{" "}
diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx
index 177f590..58e1029 100644
--- a/components/CollectionCard.tsx
+++ b/components/CollectionCard.tsx
@@ -47,19 +47,22 @@ export default function CollectionCard({ collection, className }: Props) {
settings.theme === "dark" ? "#262626" : "#f3f4f6"
} 50%, ${settings.theme === "dark" ? "#262626" : "#f9fafb"} 100%)`,
}}
- className={`border border-solid border-neutral self-stretch min-h-[12rem] rounded-2xl shadow duration-100 hover:shadow-none hover:opacity-80 group relative ${
+ className={`border border-solid border-neutral-content self-stretch min-h-[12rem] rounded-2xl shadow duration-100 hover:shadow-none hover:opacity-80 group relative ${
className || ""
}`}
>
setExpandDropdown({ x: e.clientX, y: e.clientY })}
+ onClick={(e) => {
+ setExpandDropdown({ x: e.clientX, y: e.clientY });
+ }}
id={"expand-dropdown" + collection.id}
- className="inline-flex absolute top-5 right-5 rounded-md cursor-pointer hover:bg-slate-200 hover:dark:bg-neutral-700 duration-100 p-1"
+ className="btn btn-ghost btn-sm btn-square absolute right-4 top-4 z-10"
>
-
diff --git a/components/FilterSearchDropdown.tsx b/components/FilterSearchDropdown.tsx
index 3552ea6..a137017 100644
--- a/components/FilterSearchDropdown.tsx
+++ b/components/FilterSearchDropdown.tsx
@@ -25,7 +25,7 @@ export default function FilterSearchDropdown({
const target = e.target as HTMLInputElement;
if (target.id !== "filter-dropdown") setFilterDropdown(false);
}}
- className="absolute top-8 right-0 border border-neutral shadow-md bg-base-200 rounded-md p-2 z-20 w-40"
+ className="absolute top-8 right-0 border border-neutral-content shadow-md bg-base-200 rounded-md p-2 z-20 w-40"
>
Filter by
diff --git a/components/LinkCard.tsx b/components/LinkCard.tsx
index 2b7b546..9d49342 100644
--- a/components/LinkCard.tsx
+++ b/components/LinkCard.tsx
@@ -138,7 +138,7 @@ export default function LinkCard({ link, count, className }: Props) {
return (
<>
@@ -150,7 +150,7 @@ export default function LinkCard({ link, count, className }: Props) {
setExpandDropdown({ x: e.clientX, y: e.clientY });
}}
id={"expand-dropdown" + link.id}
- className="text-neutral-content dark:text-gray-300 inline-flex rounded-md cursor-pointer btn btn-ghost btn-sm btn-square dark:hover:bg-neutral-700 absolute right-4 top-4 z-10 duration-100"
+ className="btn btn-ghost btn-sm btn-square absolute right-4 top-4 z-10"
>
))}
-
+
) : undefined} */}
diff --git a/components/LinkPreview.tsx b/components/LinkPreview.tsx
index 3525521..390a914 100644
--- a/components/LinkPreview.tsx
+++ b/components/LinkPreview.tsx
@@ -49,7 +49,7 @@ export default function LinkPreview({ link, className, settings }: Props) {
return (
<>
diff --git a/components/LinkSidebar.tsx b/components/LinkSidebar.tsx
index 19c4986..f3136f4 100644
--- a/components/LinkSidebar.tsx
+++ b/components/LinkSidebar.tsx
@@ -47,7 +47,7 @@ export default function LinkSidebar({ className, onClick }: Props) {
return (
diff --git a/components/Modal/Collection/CollectionInfo.tsx b/components/Modal/Collection/CollectionInfo.tsx
index 01c6b38..635bdd4 100644
--- a/components/Modal/Collection/CollectionInfo.tsx
+++ b/components/Modal/Collection/CollectionInfo.tsx
@@ -79,7 +79,7 @@ export default function CollectionInfo({
/>
setCollection({ ...collection, color: "#0ea5e9" })
}
@@ -98,7 +98,7 @@ export default function CollectionInfo({
@@ -253,7 +253,7 @@ export default function AddOrEditLink({
onClick={() => setOptionsExpanded(!optionsExpanded)}
className={`${
method === "UPDATE" ? "hidden" : ""
- } rounded-md cursor-pointer hover:bg-slate-200 hover:dark:bg-neutral-700 duration-100 flex items-center px-2 w-fit text-sm`}
+ } rounded-md cursor-pointer btn btn-ghost duration-100 flex items-center px-2 w-fit text-sm`}
>
{optionsExpanded ? "Hide" : "More"} Options
diff --git a/components/Modal/index.tsx b/components/Modal/index.tsx
index 38dbbe4..d7bd5bf 100644
--- a/components/Modal/index.tsx
+++ b/components/Modal/index.tsx
@@ -16,7 +16,7 @@ export default function Modal({ toggleModal, className, children }: Props) {
onClickOutside={toggleModal}
className={`m-auto ${className || ""}`}
>
-
+
}
className="absolute top-5 left-5 inline-flex rounded-md cursor-pointer hover:bg-slate-200 hover:dark:bg-neutral-700 duration-100 z-20 p-2"
diff --git a/components/Navbar.tsx b/components/Navbar.tsx
index 60bcafd..d2d719a 100644
--- a/components/Navbar.tsx
+++ b/components/Navbar.tsx
@@ -50,10 +50,10 @@ export default function Navbar() {
};
return (
-
+
@@ -82,7 +82,7 @@ export default function Navbar() {
setProfileDropdown(!profileDropdown)}
id="profile-dropdown"
>
diff --git a/components/PublicPage/PublicLinkCard.tsx b/components/PublicPage/PublicLinkCard.tsx
index 18e3b30..0e04f3e 100644
--- a/components/PublicPage/PublicLinkCard.tsx
+++ b/components/PublicPage/PublicLinkCard.tsx
@@ -28,7 +28,7 @@ export default function LinkCard({ link, count }: Props) {
});
return (
-
+
diff --git a/components/PublicPage/PublicSearchBar.tsx b/components/PublicPage/PublicSearchBar.tsx
index 4dab16e..0506f68 100644
--- a/components/PublicPage/PublicSearchBar.tsx
+++ b/components/PublicPage/PublicSearchBar.tsx
@@ -52,7 +52,7 @@ export default function PublicSearchBar({ placeHolder }: Props) {
);
}
}}
- className="border text-sm border-neutral-content bg-gray-50 focus:border-sky-300 dark:focus:border-sky-600 rounded-md pl-8 py-2 pr-2 w-44 sm:w-60 dark:hover:border-neutral-600 md:focus:w-80 hover:border-sky-300 duration-100 outline-none dark:bg-neutral-800"
+ className="border text-sm border-neutral-content bg-base-200 focus:border-sky-300 dark:focus:border-sky-600 rounded-md pl-8 py-2 pr-2 w-44 sm:w-60 md:focus:w-80 duration-100 outline-none"
/>
);
diff --git a/components/SearchBar.tsx b/components/SearchBar.tsx
index 670b82b..1ff9e80 100644
--- a/components/SearchBar.tsx
+++ b/components/SearchBar.tsx
@@ -36,7 +36,7 @@ export default function SearchBar() {
e.key === "Enter" &&
router.push("/search?q=" + encodeURIComponent(searchQuery))
}
- className="border border-neutral-content bg-gray-50 focus:border-sky-300 dark:focus:border-sky-600 rounded-md pl-10 py-2 pr-2 w-44 sm:w-60 dark:hover:border-neutral-600 md:focus:w-80 hover:border-sky-300 duration-100 outline-none dark:bg-neutral-800"
+ className="border border-neutral-content bg-base-200 focus:border-primary rounded-md pl-10 py-2 pr-2 w-44 sm:w-60 md:focus:w-80 duration-100 outline-none"
/>
);
diff --git a/components/SettingsSidebar.tsx b/components/SettingsSidebar.tsx
index c6dfa64..6172f81 100644
--- a/components/SettingsSidebar.tsx
+++ b/components/SettingsSidebar.tsx
@@ -35,7 +35,7 @@ export default function SettingsSidebar({ className }: { className?: string }) {
return (
@@ -138,7 +138,7 @@ export default function SettingsSidebar({ className }: { className?: string }) {
Linkwarden {LINKWARDEN_VERSION}
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
index 232724f..4e98169 100644
--- a/components/Sidebar.tsx
+++ b/components/Sidebar.tsx
@@ -52,7 +52,7 @@ export default function Sidebar({ className }: { className?: string }) {
return (
diff --git a/components/TextInput.tsx b/components/TextInput.tsx
index 66932a5..146a15c 100644
--- a/components/TextInput.tsx
+++ b/components/TextInput.tsx
@@ -27,7 +27,7 @@ export default function TextInput({
value={value}
onChange={onChange}
onKeyDown={onKeyDown}
- className={`w-full rounded-md p-2 border-neutral-content bg-gray-100 dark:bg-neutral-950 border-solid border outline-none focus:border-sky-300 focus:dark:border-sky-600 duration-100 ${
+ className={`w-full rounded-md p-2 border-neutral-content border-solid border outline-none focus:border-primary duration-100 ${
className || ""
}`}
/>
diff --git a/hooks/useInitialData.tsx b/hooks/useInitialData.tsx
index b3d61a7..775f8c5 100644
--- a/hooks/useInitialData.tsx
+++ b/hooks/useInitialData.tsx
@@ -3,6 +3,7 @@ import { useEffect } from "react";
import { useSession } from "next-auth/react";
import useTagStore from "@/store/tags";
import useAccountStore from "@/store/account";
+import useLocalSettingsStore from "@/store/localSettings";
export default function useInitialData() {
const { status, data } = useSession();
@@ -10,10 +11,12 @@ export default function useInitialData() {
const { setTags } = useTagStore();
// const { setLinks } = useLinkStore();
const { account, setAccount } = useAccountStore();
+ const { setSettings } = useLocalSettingsStore();
- // Get account info
useEffect(() => {
+ setSettings();
if (status === "authenticated") {
+ // Get account info
setAccount(data?.user.id as number);
}
}, [status, data]);
diff --git a/layouts/CenteredForm.tsx b/layouts/CenteredForm.tsx
index 4eb3c3e..2ea8a8f 100644
--- a/layouts/CenteredForm.tsx
+++ b/layouts/CenteredForm.tsx
@@ -1,7 +1,7 @@
import useLocalSettingsStore from "@/store/localSettings";
import Image from "next/image";
import Link from "next/link";
-import React, { ReactNode } from "react";
+import React, { ReactNode, useEffect } from "react";
interface Props {
text?: string;
@@ -10,10 +10,11 @@ interface Props {
export default function CenteredForm({ text, children }: Props) {
const { settings } = useLocalSettingsStore();
+
return (
- {true ? (
+ {settings.theme ? (
) : undefined}
- {/* {settings.theme === "dark" ? (
-
- ) : (
-
- )} */}
{text ? (
{text}
) : undefined}
{children}
-
+
© {new Date().getFullYear()}{" "}
Linkwarden
diff --git a/layouts/LinkLayout.tsx b/layouts/LinkLayout.tsx
index 33065d7..0dc5027 100644
--- a/layouts/LinkLayout.tsx
+++ b/layouts/LinkLayout.tsx
@@ -86,7 +86,7 @@ export default function LinkLayout({ children }: Props) {
{/*
*/}
diff --git a/layouts/SettingsLayout.tsx b/layouts/SettingsLayout.tsx
index 457c168..b126a86 100644
--- a/layouts/SettingsLayout.tsx
+++ b/layouts/SettingsLayout.tsx
@@ -53,14 +53,14 @@ export default function SettingsLayout({ children }: Props) {
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 7ed966e..3f52d9b 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from "react";
+import React from "react";
import "@/styles/globals.css";
import { SessionProvider } from "next-auth/react";
import type { AppProps } from "next/app";
@@ -6,7 +6,6 @@ import Head from "next/head";
import AuthRedirect from "@/layouts/AuthRedirect";
import { Toaster } from "react-hot-toast";
import { Session } from "next-auth";
-import useLocalSettingsStore from "@/store/localSettings";
export default function App({
Component,
@@ -14,12 +13,6 @@ export default function App({
}: AppProps<{
session: Session;
}>) {
- const { setSettings } = useLocalSettingsStore();
-
- useEffect(() => {
- setSettings();
- }, []);
-
return (
diff --git a/pages/choose-username.tsx b/pages/choose-username.tsx
index 0c7c0fd..22f6192 100644
--- a/pages/choose-username.tsx
+++ b/pages/choose-username.tsx
@@ -41,7 +41,7 @@ export default function ChooseUsername() {
return (