From 04b580d239c5746fba510634d21a665a86211d7a Mon Sep 17 00:00:00 2001 From: Radiquum Date: Wed, 26 Mar 2025 15:53:27 +0500 Subject: [PATCH 1/9] fix: reset player error on episode change --- app/components/ReleasePlayer/ReleasePlayerCustom.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/ReleasePlayer/ReleasePlayerCustom.tsx b/app/components/ReleasePlayer/ReleasePlayerCustom.tsx index feec08c..75f62ca 100644 --- a/app/components/ReleasePlayer/ReleasePlayerCustom.tsx +++ b/app/components/ReleasePlayer/ReleasePlayerCustom.tsx @@ -342,6 +342,8 @@ export const ReleasePlayerCustom = (props: { setIsLoading(false); }; if (episode.selected) { + setIsLoading(true); + setPlayerError(null); __getInfo(); } }, [episode.selected]); From 956d35579b91db3f31bf6b3ca846d0c07b6711cb Mon Sep 17 00:00:00 2001 From: Radiquum Date: Wed, 26 Mar 2025 16:53:54 +0500 Subject: [PATCH 2/9] feat: add about page --- app/about/page.tsx | 16 ++++++ app/pages/About.tsx | 119 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 app/about/page.tsx create mode 100644 app/pages/About.tsx diff --git a/app/about/page.tsx b/app/about/page.tsx new file mode 100644 index 0000000..a44f27e --- /dev/null +++ b/app/about/page.tsx @@ -0,0 +1,16 @@ +export const metadata = { + title: "О приложении", + openGraph: { + title: "AniX - Неофициальный веб клиент для Anixart", + description: + "AniX - это неофициальный веб-клиент для Android-приложения Anixart. Он позволяет вам получать доступ к своей учетной записи Anixart и управлять ею из веб-браузера. Так-же можно синхронизировать и управлять списками и избранным. И самое главное смотреть все доступные аниме из базы Anixart.", + }, +}; + +export const dynamic = "force-static"; + +import { AboutPage } from "#/pages/About"; + +export default function Index() { + return ; +} diff --git a/app/pages/About.tsx b/app/pages/About.tsx new file mode 100644 index 0000000..0d423be --- /dev/null +++ b/app/pages/About.tsx @@ -0,0 +1,119 @@ +// "use client"; + +import { Card } from "flowbite-react"; +import Image from "next/image"; + +import * as fs from "node:fs"; +import * as path from "node:path"; +import { CURRENT_APP_VERSION } from "#/api/config"; +import Styles from "../components/ChangelogModal/ChangelogModal.module.css"; +import Markdown from "markdown-to-jsx"; + +export const AboutPage = () => { + const directoryPath = path.join(process.cwd(), "public/changelog"); + const files = fs.readdirSync(directoryPath); + const changelogs = []; + + files.forEach((file) => { + if (file != `${CURRENT_APP_VERSION}.md`) { + const changelog = fs.readFileSync(path.join(directoryPath, file), "utf8"); + changelogs.push({ + version: file.replace(".md", ""), + changelog: changelog, + }); + } + }); + + if (!files.includes(`${CURRENT_APP_VERSION}.md`)) { + changelogs.push({ + version: CURRENT_APP_VERSION, + changelog: "Нет списка изменений", + }); + } else { + const changelog = fs.readFileSync( + path.join(directoryPath, `${CURRENT_APP_VERSION}.md`), + "utf8" + ); + changelogs.push({ + version: CURRENT_APP_VERSION, + changelog: changelog, + }); + } + + return ( +
+ +
+ about image +
+

+ AniX - Неофициальный веб клиент для Anixart +

+

+ AniX - это неофициальный веб-клиент для Android-приложения + Anixart. Он позволяет вам получать доступ к своей учетной записи + Anixart и управлять ею из веб-браузера. Так-же можно + синхронизировать и управлять списками и избранным. И самое главное + смотреть все доступные аниме из базы Anixart. +

+
+
+
+ +
+ developer image +
+

Radiquum

+

+ Разработчик +

+
+
+
+ +
+ +
+

Телеграм канал

+

+ @anix_web +

+
+
+
+ +
+ +
+

Код на GitHub

+

+ github.com/Radiquum/AniX +

+
+
+
+ +

Список изменений

+ {changelogs.reverse().map((changelog) => ( +
+ + {changelog.changelog} + +
+ ))} +
+
+ ); +}; From 2241a8a2267b581be2749e9da25d50d4c04008ea Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 20:27:15 +0500 Subject: [PATCH 3/9] feat: add link to about page in settings --- .../SettingsModal/SettingsModal.tsx | 22 +-- app/pages/About.tsx | 141 ++++++++++-------- 2 files changed, 85 insertions(+), 78 deletions(-) diff --git a/app/components/SettingsModal/SettingsModal.tsx b/app/components/SettingsModal/SettingsModal.tsx index 39ae318..5c10bc1 100644 --- a/app/components/SettingsModal/SettingsModal.tsx +++ b/app/components/SettingsModal/SettingsModal.tsx @@ -1,5 +1,6 @@ "use client"; +import { CURRENT_APP_VERSION } from "#/api/config"; import { usePreferencesStore } from "#/store/preferences"; import { Modal, @@ -278,26 +279,15 @@ export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => {
props.setIsOpen(false)} > - +
-

Телеграм канал

+

О приложении

- @anix_web -

-
- - - -
-

Разработчик

-

- Radiquum + v{CURRENT_APP_VERSION}

diff --git a/app/pages/About.tsx b/app/pages/About.tsx index 0d423be..851641e 100644 --- a/app/pages/About.tsx +++ b/app/pages/About.tsx @@ -1,4 +1,4 @@ -// "use client"; +"use server"; import { Card } from "flowbite-react"; import Image from "next/image"; @@ -9,37 +9,42 @@ import { CURRENT_APP_VERSION } from "#/api/config"; import Styles from "../components/ChangelogModal/ChangelogModal.module.css"; import Markdown from "markdown-to-jsx"; +import { + Accordion, + AccordionContent, + AccordionPanel, + AccordionTitle, +} from "flowbite-react"; +import { version } from "node:os"; +import Link from "next/link"; + export const AboutPage = () => { const directoryPath = path.join(process.cwd(), "public/changelog"); const files = fs.readdirSync(directoryPath); - const changelogs = []; + const current = { + version: CURRENT_APP_VERSION, + changelog: `#${CURRENT_APP_VERSION}\r\nНет списка изменений`, + }; + const previous = []; + + if (files.includes(`${CURRENT_APP_VERSION}.md`)) { + const changelog = fs.readFileSync( + path.join(directoryPath, `${CURRENT_APP_VERSION}.md`), + "utf8" + ); + current.changelog = changelog; + } files.forEach((file) => { if (file != `${CURRENT_APP_VERSION}.md`) { const changelog = fs.readFileSync(path.join(directoryPath, file), "utf8"); - changelogs.push({ + previous.push({ version: file.replace(".md", ""), changelog: changelog, }); } }); - if (!files.includes(`${CURRENT_APP_VERSION}.md`)) { - changelogs.push({ - version: CURRENT_APP_VERSION, - changelog: "Нет списка изменений", - }); - } else { - const changelog = fs.readFileSync( - path.join(directoryPath, `${CURRENT_APP_VERSION}.md`), - "utf8" - ); - changelogs.push({ - version: CURRENT_APP_VERSION, - changelog: changelog, - }); - } - return (
@@ -65,54 +70,66 @@ export const AboutPage = () => {
- -
- developer image -
-

Radiquum

-

- Разработчик -

+ + +
+ developer image +
+

Radiquum

+

+ Разработчик +

+
-
- - -
- -
-

Телеграм канал

-

- @anix_web -

+ + + + +
+ +
+

Телеграм канал

+

+ @anix_web +

+
-
- - -
- -
-

Код на GitHub

-

- github.com/Radiquum/AniX -

+ + + + +
+ +
+

Код на GitHub

+

+ github.com/Radiquum/AniX +

+
-
- + +

Список изменений

- {changelogs.reverse().map((changelog) => ( -
- - {changelog.changelog} - -
- ))} + {current.changelog} + + {previous.reverse().map((changelog) => ( + + v{changelog.version} + + + {changelog.changelog} + + + + ))} +
); From bf67b5d9288129c311db0e07d32a78fe5125d215 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 20:41:53 +0500 Subject: [PATCH 4/9] refactor: move mobile menu to the bottom on mobile --- app/pages/MobileMenuPage.tsx | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/app/pages/MobileMenuPage.tsx b/app/pages/MobileMenuPage.tsx index a075e2a..72fa408 100644 --- a/app/pages/MobileMenuPage.tsx +++ b/app/pages/MobileMenuPage.tsx @@ -22,7 +22,7 @@ export const MenuPage = () => { return ( <> {userStore.user && ( -
+
{
- - -
- -
-

Телеграм канал

-

- @anix_web -

-
-
-
- - - -
- -
-

Разработчик

-

- Radiquum -

-
-
-
- Date: Thu, 27 Mar 2025 20:54:43 +0500 Subject: [PATCH 5/9] refactor: remove 'show only link names in navbar' in settings on mobile --- app/components/Navbar/NavbarUpdate.tsx | 2 +- .../SettingsModal/SettingsModal.tsx | 37 ++++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/app/components/Navbar/NavbarUpdate.tsx b/app/components/Navbar/NavbarUpdate.tsx index 71b74d0..4d0927d 100644 --- a/app/components/Navbar/NavbarUpdate.tsx +++ b/app/components/Navbar/NavbarUpdate.tsx @@ -87,7 +87,7 @@ export const Navbar = () => { return ( <>
-
+
{menuItems.map((item) => { return ( diff --git a/app/components/SettingsModal/SettingsModal.tsx b/app/components/SettingsModal/SettingsModal.tsx index 5c10bc1..d9d4378 100644 --- a/app/components/SettingsModal/SettingsModal.tsx +++ b/app/components/SettingsModal/SettingsModal.tsx @@ -33,7 +33,7 @@ const NavbarTitles = { links: "Только ссылки", selected: "Только выбранные", never: "Никогда", -} +}; export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => { const preferenceStore = usePreferencesStore(); @@ -169,24 +169,25 @@ export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => {

- {Object.keys(NavbarTitles).map((key: "always" | "links" | "selected" | "never") => { - return ( - - preferenceStore.setFlags({ - showNavbarTitles: key, - }) - } - > - {NavbarTitles[key]} - - ); - })} + {Object.keys(NavbarTitles).map( + (key: "always" | "links" | "selected" | "never") => { + return ( + + preferenceStore.setFlags({ + showNavbarTitles: key, + }) + } + > + {NavbarTitles[key]} + + ); + } + )}

From 7b97b33951e04feb180e2d56c6ab5f5b5062112d Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 21:55:53 +0500 Subject: [PATCH 6/9] feat: add fifth navbar button settings for mobile --- app/components/Navbar/NavbarUpdate.tsx | 47 ++++++++++--- .../SettingsModal/SettingsModal.tsx | 47 +++++++++++++ app/pages/MobileMenuPage.tsx | 68 +++++++++++-------- app/store/preferences.ts | 17 +++-- 4 files changed, 132 insertions(+), 47 deletions(-) diff --git a/app/components/Navbar/NavbarUpdate.tsx b/app/components/Navbar/NavbarUpdate.tsx index 4d0927d..a6219c0 100644 --- a/app/components/Navbar/NavbarUpdate.tsx +++ b/app/components/Navbar/NavbarUpdate.tsx @@ -87,8 +87,8 @@ export const Navbar = () => { return ( <>
-
-
+
+
{menuItems.map((item) => { return ( { item.isAuthRequired && !userStore.isAuth ? "hidden" : item.isShownOnMobile ? "flex" : "hidden sm:flex" - } ${[item.href, item.hrefInCategory].includes("/" + pathname.split("/")[1]) ? "font-bold" : "font-medium"}`} + } ${[item.href, item.hrefInCategory].includes("/" + pathname.split("/")[1]) ? "font-bold" : "font-medium"} transition-all`} > { ); })}
-
+
{!userStore.isAuth ? { : <> { width={24} height={24} /> - + {userStore.user.login} + {preferenceStore.flags.showFifthButton ? + + + + {menuItems[preferenceStore.flags.showFifthButton].title} + + + : ""} { width={24} height={24} /> - + {userStore.user.login} @@ -165,7 +184,11 @@ export const Navbar = () => { onClick={() => setIsSettingModalOpen(true)} > - Настройки + + Настройки + {userStore.isAuth && ( diff --git a/app/components/SettingsModal/SettingsModal.tsx b/app/components/SettingsModal/SettingsModal.tsx index d9d4378..3786e80 100644 --- a/app/components/SettingsModal/SettingsModal.tsx +++ b/app/components/SettingsModal/SettingsModal.tsx @@ -1,6 +1,7 @@ "use client"; import { CURRENT_APP_VERSION } from "#/api/config"; +import { useUserStore } from "#/store/auth"; import { usePreferencesStore } from "#/store/preferences"; import { Modal, @@ -35,8 +36,15 @@ const NavbarTitles = { never: "Никогда", }; +const FifthButton = { + 3: "Избранное", + 4: "Коллекции", + 5: "История", +}; + export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => { const preferenceStore = usePreferencesStore(); + const userStore = useUserStore(); const { computedMode, setMode } = useThemeMode(); @@ -190,6 +198,45 @@ export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => { )}
+ {userStore.isAuth ? +
+

+ Пятый пункт в навигации +

+ + + preferenceStore.setFlags({ + showFifthButton: null, + }) + } + > + Не показывать + + {Object.keys(FifthButton).map((key) => { + return ( + + preferenceStore.setFlags({ + showFifthButton: Number(key) as 3 | 4 | 5, + }) + } + > + {FifthButton[key]} + + ); + })} + +
+ : ""}
diff --git a/app/pages/MobileMenuPage.tsx b/app/pages/MobileMenuPage.tsx index 72fa408..f1f73b8 100644 --- a/app/pages/MobileMenuPage.tsx +++ b/app/pages/MobileMenuPage.tsx @@ -6,9 +6,11 @@ import { useRouter } from "next/navigation"; import { SettingsModal } from "#/components/SettingsModal/SettingsModal"; import { useEffect, useState } from "react"; import Image from "next/image"; +import { usePreferencesStore } from "#/store/preferences"; export const MenuPage = () => { const userStore = useUserStore(); + const preferenceStore = usePreferencesStore(); const router = useRouter(); const [isSettingModalOpen, setIsSettingModalOpen] = useState(false); @@ -81,36 +83,42 @@ export const MenuPage = () => {
- - -
- -

Избранное

-
-
- - - -
- -

Коллекции

-
-
- - - -
- -

История

-
-
- + {preferenceStore.flags.showFifthButton != 3 ? + + +
+ +

Избранное

+
+
+ + : ""} + {preferenceStore.flags.showFifthButton != 4 ? + + +
+ +

Коллекции

+
+
+ + : ""} + {preferenceStore.flags.showFifthButton != 5 ? + + +
+ +

История

+
+
+ + : ""} ()( showChangelog: true, enableAnalytics: true, showNavbarTitles: "always", + showFifthButton: null, }, params: { isFirstLaunch: true, @@ -54,8 +56,8 @@ export const usePreferencesStore = create()( bookmarksCategory: "watching", }, experimental: { - newPlayer: false - } + newPlayer: false, + }, }, setHasHydrated: (state) => { set({ @@ -74,9 +76,12 @@ export const usePreferencesStore = create()( onRehydrateStorage: (state) => { return () => state.setHasHydrated(true); }, - merge: (persistedState , currentState) => { - return deepmerge(currentState as preferencesState, persistedState as preferencesState); - } + merge: (persistedState, currentState) => { + return deepmerge( + currentState as preferencesState, + persistedState as preferencesState + ); + }, } ) ); From 265be8d1e1196aa3c38b4223f585b25c9a9ac928 Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 22:03:03 +0500 Subject: [PATCH 7/9] change line-height to 1 on poster text --- app/components/ReleasePoster/PosterWithStuff.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/ReleasePoster/PosterWithStuff.tsx b/app/components/ReleasePoster/PosterWithStuff.tsx index adffc49..7ffbee2 100644 --- a/app/components/ReleasePoster/PosterWithStuff.tsx +++ b/app/components/ReleasePoster/PosterWithStuff.tsx @@ -83,7 +83,7 @@ export const PosterWithStuff = (props: { return ( {index > 0 && ", "} {genre} @@ -91,18 +91,18 @@ export const PosterWithStuff = (props: { ); })} {props.title_ru && ( -

+

{props.title_ru}

)} {props.title_original && ( -

+

{props.title_original}

)}
{settings.showDescription && props.description && ( -

+

{props.description}

)} From 663633c9797d6a85e2ed8fa76e188c6afc0c343f Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 22:10:49 +0500 Subject: [PATCH 8/9] chore: bump version [3.5.0] --- app/api/config.ts | 2 +- public/changelog/3.5.0.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 public/changelog/3.5.0.md diff --git a/app/api/config.ts b/app/api/config.ts index b0b7b9c..d3a25d0 100644 --- a/app/api/config.ts +++ b/app/api/config.ts @@ -1,4 +1,4 @@ -export const CURRENT_APP_VERSION = "3.4.0"; +export const CURRENT_APP_VERSION = "3.5.0"; export const API_URL = "https://api.anixart.tv"; export const API_PREFIX = "/api/proxy"; diff --git a/public/changelog/3.5.0.md b/public/changelog/3.5.0.md new file mode 100644 index 0000000..af13131 --- /dev/null +++ b/public/changelog/3.5.0.md @@ -0,0 +1,17 @@ +# 3.5.0 + +## Добавлено + +- Добавлена страница о приложении +- Добавлена возможность добавить пятую кнопку в меню навигации на мобильных устройствах + +## Изменено + +- Стиль карточек для релизов был изменён на вертикальный +- На мобильных устройствах постер на странице релиза теперь по середине +- Позиция лицензированных сервисов теперь под постером +- На мобильных устройствах позиция меню была смещена вниз + +## Исправлено + +- Ошибка своего плеера не сбрасывалась, если удалось получить ссылку при переключении серии From 8ab668dcd6757c76845152f5aec083a15cad961b Mon Sep 17 00:00:00 2001 From: Radiquum Date: Thu, 27 Mar 2025 22:17:33 +0500 Subject: [PATCH 9/9] chore: update readme --- README.md | 2 +- docs/REAME.RU.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8d8796..b0f2660 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ AniX is an unofficial web client for the Android application Anixart. It allows ## Changelog [RU] +- [3.5.0](./public/changelog/3.5.0.md) - [3.4.0](./public/changelog/3.4.0.md) - [3.3.0](./public/changelog/3.3.0.md) - [3.2.3](./public/changelog/3.2.3.md) -- [3.2.2](./public/changelog/3.2.2.md) [other versions](./public/changelog) diff --git a/docs/REAME.RU.md b/docs/REAME.RU.md index cfb0f9f..b62c36e 100644 --- a/docs/REAME.RU.md +++ b/docs/REAME.RU.md @@ -6,10 +6,10 @@ AniX - это неофициальный веб-клиент для Android-пр ## Список изменений +- [3.5.0](/public/changelog/3.5.0.md) - [3.4.0](/public/changelog/3.4.0.md) - [3.3.0](/public/changelog/3.3.0.md) - [3.2.3](/public/changelog/3.2.3.md) -- [3.2.2](/public/changelog/3.2.2.md) [другие версии](/public/changelog)