From 329448c9fca8e5c10bdb4e9ecf11e123dd456a14 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Fri, 4 Apr 2025 00:29:19 +0500 Subject: [PATCH] chore: migrate to new flowbite-react --- .flowbite-react/.gitignore | 2 + .flowbite-react/config.json | 9 + app/App.tsx | 12 +- .../ChangelogModal/ChangelogModal.tsx | 28 +- app/components/Comments/Comments.Add.tsx | 12 +- app/components/Comments/Comments.Comment.tsx | 10 +- app/components/Comments/Comments.Edit.tsx | 12 +- app/components/Comments/Comments.Main.tsx | 6 +- app/components/CropModal/CropModal.tsx | 12 +- .../Profile/Profile.BlockedUsersModal.tsx | 4 +- .../Profile/Profile.EditLoginModal.tsx | 12 +- app/components/Profile/Profile.EditModal.tsx | 8 +- .../Profile/Profile.EditPrivacyModal.tsx | 8 +- .../Profile/Profile.EditSocialModal.tsx | 31 +- .../Profile/Profile.EditStatusModal.tsx | 12 +- .../Profile/Profile.ReleaseRatings.tsx | 10 +- .../ReleaseInfo/ReleaseInfo.Info.tsx | 78 ++-- .../ReleaseInfo/ReleaseInfo.Rating.tsx | 132 ++++--- .../ReleaseInfo/ReleaseInfo.UserList.tsx | 8 +- .../ReleasePlayer/ReleasePlayer.tsx | 10 +- .../ReleasePlayer/SourceSelector.tsx | 6 +- .../ReleasePlayer/VoiceoverSelector.tsx | 10 +- .../SettingsModal/SettingsModal.tsx | 42 ++- app/pages/BookmarksCategory.tsx | 10 +- app/pages/CreateCollection.tsx | 25 +- app/pages/Favorites.tsx | 6 +- app/pages/IndexCategory.tsx | 6 +- app/pages/Search.tsx | 24 +- next.config.js | 71 ++-- package-lock.json | 357 +++++++++++++++--- package.json | 7 +- tailwind.config.js | 14 +- 32 files changed, 650 insertions(+), 344 deletions(-) create mode 100644 .flowbite-react/.gitignore create mode 100644 .flowbite-react/config.json diff --git a/.flowbite-react/.gitignore b/.flowbite-react/.gitignore new file mode 100644 index 0000000..da26dfd --- /dev/null +++ b/.flowbite-react/.gitignore @@ -0,0 +1,2 @@ +class-list.json +pid \ No newline at end of file diff --git a/.flowbite-react/config.json b/.flowbite-react/config.json new file mode 100644 index 0000000..d04ad92 --- /dev/null +++ b/.flowbite-react/config.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://unpkg.com/flowbite-react/schema.json", + "components": [], + "dark": true, + "prefix": "", + "path": "src/components", + "tsx": true, + "rsc": true +} \ No newline at end of file diff --git a/app/App.tsx b/app/App.tsx index 69d1288..3733cd1 100644 --- a/app/App.tsx +++ b/app/App.tsx @@ -4,7 +4,7 @@ import { usePreferencesStore } from "./store/preferences"; import { Navbar } from "./components/Navbar/NavbarUpdate"; import { Inter } from "next/font/google"; import { useEffect, useState } from "react"; -import { Button, Modal } from "flowbite-react"; +import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from "flowbite-react"; import { Spinner } from "./components/Spinner/Spinner"; import { ChangelogModal } from "#/components/ChangelogModal/ChangelogModal"; import PlausibleProvider from "next-plausible"; @@ -80,8 +80,8 @@ export const App = (props) => { show={preferencesStore.params.isFirstLaunch} onClose={() => preferencesStore.setParams({ isFirstLaunch: false })} > - Внимание - + Внимание +

Данный сайт не связан с разработчиками приложения Anixart, это неофициальная имплементация веб клиента для этого приложения. @@ -94,15 +94,15 @@ export const App = (props) => { На сайте могут присутствовать ошибки и не доработки, а так-же отсутствующий функционал.

-
- + + - + {preferencesStore.flags.enableAnalytics && ( props.setIsOpen(false)}> - Список изменений v{props.version} - + Список изменений v{props.version} + {currentVersionChangelog} @@ -46,8 +54,8 @@ export const ChangelogModal = (props: { {props.previousVersions.length > 0 && props.previousVersions.map((version) => { return ( - - + { if (!previousVersionsChangelog.hasOwnProperty(version)) { _fetchVersionChangelog(version).then((data) => { @@ -62,19 +70,19 @@ export const ChangelogModal = (props: { }} > Список изменений v{version} - - + + {previousVersionsChangelog.hasOwnProperty(version) ? {previousVersionsChangelog[version]} :
Загрузка ...
} -
-
+ + ); })} -
+ ); }; diff --git a/app/components/Comments/Comments.Add.tsx b/app/components/Comments/Comments.Add.tsx index 66ffee8..edec270 100644 --- a/app/components/Comments/Comments.Add.tsx +++ b/app/components/Comments/Comments.Add.tsx @@ -1,4 +1,4 @@ -import { Button, Modal, ToggleSwitch, Label, Textarea } from "flowbite-react"; +import { Button, Label, Modal, ModalBody, ModalHeader, Textarea, ToggleSwitch } from "flowbite-react"; import { CommentsComment } from "./Comments.Comment"; import { useState } from "react"; import { ENDPOINTS } from "#/api/config"; @@ -68,12 +68,12 @@ export const CommentsAddModal = (props: { show={props.isOpen} onClose={() => props.setIsOpen(false)} > - +

{props.isReply ? "Ответ на комментарий" : "Оставить комментарий"}

-
- + + {props.isReply && (
_sendComment(e)}>
-