From ec1a4c62028b93ec2b538fe61509206748ce6d8c Mon Sep 17 00:00:00 2001 From: lisicheng Date: Sat, 25 Jan 2025 18:57:06 +0800 Subject: [PATCH] feat(ui): add acknowledgment section --- src/components/About/AboutModal.jsx | 149 ++++++- src/components/About/FancyLogo.jsx | 10 +- .../ArticleList/components/EditFeedModal.jsx | 419 +++++++++--------- .../ArticleList/components/RenameModal.jsx | 73 ++- .../FeedList/components/AddCategoryModal.jsx | 83 ++-- .../FeedList/components/AddFeedModal.jsx | 347 +++++++-------- src/components/ui/CustomModal.jsx | 6 +- src/i18n/locales/en-US.js | 1 + src/i18n/locales/zh-CN.js | 2 +- 9 files changed, 606 insertions(+), 484 deletions(-) diff --git a/src/components/About/AboutModal.jsx b/src/components/About/AboutModal.jsx index 9868c78..458e824 100644 --- a/src/components/About/AboutModal.jsx +++ b/src/components/About/AboutModal.jsx @@ -2,22 +2,149 @@ import { useTranslation } from "react-i18next"; import { useStore } from "@nanostores/react"; import { aboutModalOpen } from "@/stores/modalStore"; import { FancyLogo } from "@/components/About/FancyLogo.jsx"; -import CustomModal from "@/components/ui/CustomModal.jsx"; +import { + Button, + Modal, + ModalBody, + ModalContent, + ModalHeader, +} from "@heroui/react"; +import { Heart, Info, X } from "lucide-react"; export default function AboutModal() { const { t } = useTranslation(); const $aboutModalOpen = useStore(aboutModalOpen); return ( - aboutModalOpen.set(false)} - title={t("about.title")} - content={ -
- -
- } - /> + <> + { + aboutModalOpen.set(value); + }} + classNames={{ + base: "mb-safe-offset-2 mt-2 mx-2 max-h-[80vh] h-[612px] overflow-hidden dark:border", + header: "border-b flex flex-col gap-3 p-3 bg-content1", + footer: "hidden", + body: "modal-body p-0 !block", + closeButton: "hidden", + }} + > + + {() => ( + <> + +
+
+ + + {t("about.title")} + +
+ +
+
+ +
+ + + {/* Made with love section */} +
+ Made with{" "} + + + {" "} + by{" "} + + electh + +
+ + {/* Acknowledgments section */} + +
+
+ + )} +
+
+ ); } diff --git a/src/components/About/FancyLogo.jsx b/src/components/About/FancyLogo.jsx index 7b34726..83e7f4c 100644 --- a/src/components/About/FancyLogo.jsx +++ b/src/components/About/FancyLogo.jsx @@ -6,7 +6,7 @@ export const FancyLogo = ({ since }) => { const boundingRef = useRef(null); return ( -
+
{ boundingRef.current = null; @@ -28,9 +28,13 @@ export const FancyLogo = ({ since }) => { ev.currentTarget.style.setProperty("--x", `${xPercentage * 100}%`); ev.currentTarget.style.setProperty("--y", `${yPercentage * 100}%`); }} - className="group relative w-full flex flex-col gap-6 py-6 items-center overflow-hidden rounded-md bg-gradient-to-b from-[#EAFFED] to-[#C6F7C9] p-4 text-[#01A977] transition-transform ease-out hover:[transform:rotateX(var(--x-rotation))_rotateY(var(--y-rotation))_scale(1.05)]" + className="group relative w-full flex flex-col gap-6 py-6 items-center overflow-hidden rounded-lg bg-gradient-to-b from-[#EAFFED] to-[#C6F7C9] p-4 text-[#01A977] transition-transform ease-out hover:[transform:rotateX(var(--x-rotation))_rotateY(var(--y-rotation))_scale(1.05)]" > - logo + logo