From a36769c5213b5f2a3c9e9b627c278a5589c20706 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Fri, 1 Dec 2023 16:29:17 -0500 Subject: [PATCH] many bug fixes + add links and collections together + more changes --- components/CollectionCard.tsx | 2 - components/DashboardItem.tsx | 2 +- .../InputSelect/CollectionSelection.tsx | 12 ++++-- components/LinkCard.tsx | 18 --------- components/Modal/Link/PreservedFormats.tsx | 4 +- components/Modals/DeleteCollectionModal.tsx | 18 ++++----- components/Modals/EditCollectionModal.tsx | 9 ++--- .../Modals/EditCollectionSharingModal.tsx | 25 ++++++------ components/Modals/EditLinkModal.tsx | 4 +- components/Modals/NewCollectionModal.tsx | 26 ++++++------- components/Modals/NewLinkModal.tsx | 31 +++++++-------- components/Navbar.tsx | 4 +- components/NoLinksFound.tsx | 21 +++++----- components/PublicPage/PublicLinkCard.tsx | 2 +- components/SearchBar.tsx | 12 +++--- components/SettingsSidebar.tsx | 12 +++--- components/Sidebar.tsx | 14 +++---- components/SubmitButton.tsx | 10 ++--- pages/collections/[id].tsx | 21 +++++----- pages/collections/index.tsx | 9 +---- pages/dashboard.tsx | 39 ++++++++++++------- pages/links/[id].tsx | 2 +- pages/public/collections/[id].tsx | 8 ---- pages/public/links/[id].tsx | 8 +++- pages/settings/account.tsx | 36 ++++++++++------- pages/settings/appearance.tsx | 2 +- tailwind.config.js | 8 ++-- 27 files changed, 169 insertions(+), 190 deletions(-) diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx index 8bb0f94..5b73735 100644 --- a/components/CollectionCard.tsx +++ b/components/CollectionCard.tsx @@ -5,7 +5,6 @@ import { CollectionIncludingMembersAndLinkCount } from "@/types/global"; import { useEffect, useState } from "react"; import ProfilePhoto from "./ProfilePhoto"; import { faCalendarDays } from "@fortawesome/free-regular-svg-icons"; -import useModalStore from "@/store/modals"; import usePermissions from "@/hooks/usePermissions"; import useLocalSettingsStore from "@/store/localSettings"; import getPublicUserData from "@/lib/client/getPublicUserData"; @@ -20,7 +19,6 @@ type Props = { }; export default function CollectionCard({ collection, className }: Props) { - const { setModal } = useModalStore(); const { settings } = useLocalSettingsStore(); const { account } = useAccountStore(); diff --git a/components/DashboardItem.tsx b/components/DashboardItem.tsx index acbd1ee..70ffd55 100644 --- a/components/DashboardItem.tsx +++ b/components/DashboardItem.tsx @@ -10,7 +10,7 @@ type Props = { export default function dashboardItem({ name, value, icon }: Props) { return (
-
+
diff --git a/components/InputSelect/CollectionSelection.tsx b/components/InputSelect/CollectionSelection.tsx index 1ef948d..b514f79 100644 --- a/components/InputSelect/CollectionSelection.tsx +++ b/components/InputSelect/CollectionSelection.tsx @@ -1,9 +1,9 @@ import useCollectionStore from "@/store/collections"; import { useRouter } from "next/router"; import { useEffect, useState } from "react"; -import Select from "react-select"; import { styles } from "./styles"; import { Options } from "./types"; +import CreatableSelect from "react-select/creatable"; type Props = { onChange: any; @@ -13,9 +13,14 @@ type Props = { value?: number; } | undefined; + id?: string; }; -export default function CollectionSelection({ onChange, defaultValue }: Props) { +export default function CollectionSelection({ + onChange, + defaultValue, + id, +}: Props) { const { collections } = useCollectionStore(); const router = useRouter(); @@ -43,7 +48,8 @@ export default function CollectionSelection({ onChange, defaultValue }: Props) { }, [collections]); return ( -

Import your data from other platforms.

-
- +
Import From -
+
- +

Download your data instantly.

-
+
Export Data
@@ -365,14 +371,14 @@ export default function Account() { You will be prompted to enter your password before the deletion process.

- - -

Delete Your Account

-
+ + +

Delete Your Account

+
); diff --git a/pages/settings/appearance.tsx b/pages/settings/appearance.tsx index ced82a4..26fb0b2 100644 --- a/pages/settings/appearance.tsx +++ b/pages/settings/appearance.tsx @@ -67,7 +67,7 @@ export default function Appearance() {
-
+

Select Theme

diff --git a/tailwind.config.js b/tailwind.config.js index ca54c02..e3c7cc0 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -6,8 +6,8 @@ module.exports = { themes: [ { light: { - primary: "#0ea5e9", - secondary: "#06b6d4", + primary: "#0284c7", + secondary: "#0891b2", accent: "#6366f1", neutral: "#6b7280", "neutral-content": "#d1d5db", @@ -22,8 +22,8 @@ module.exports = { }, { dark: { - primary: "#0ea5e9", - secondary: "#0e7490", + primary: "#38bdf8", + secondary: "#22d3ee", accent: "#6366f1", neutral: "#9ca3af", "neutral-content": "#404040",