diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2eff99b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,68 @@ +# Python +__pycache__ +venv +.mypy_cache + +# VSCode +.VSCode +*.code-workspace + +# DetaSpace +.space + +# NextJS +## dependencies +standalone +node_modules +.pnp +.pnp.js +.yarn/install-state.gz + +## testing +coverage + +## next.js +.next +out + +## production +build + +## misc +.DS_Store +*.pem + +## debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +## local env files +.env*.local + +## vercel +.vercel + +## typescript +*.tsbuildinfo +next-env.d.ts + +# traefik +traefik/traefik + +old/ +#Trigger Vercel Prod Build + +# next-video +videos/* +!videos/*.json +!videos/*.js +!videos/*.ts +public/_next-video + +API-Trace/* +.env + +player-parsers +docs +.git \ No newline at end of file diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..dcb7e8b --- /dev/null +++ b/.env.sample @@ -0,0 +1,5 @@ +# пример заполнения: https://example.com, http://0.0.0.0:80 +NEXT_PUBLIC_KODIK_PARSER_URL= # Домен парсера кодика, требуется для просмотра с данного источника +NEXT_PUBLIC_ANILIBRIA_PARSER_URL= # Домен парсера анилибрии, если не заполнено, используется официальное апи +NEXT_PUBLIC_SIBNET_PARSER_URL= # Домен парсера сибнет, требуется для просмотра с данного источника +# --- \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index ab5cdb0..957cd15 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,3 @@ { - "extends": ["next/core-web-vitals", "prettier"], - "rules": { - "prettier/prettier": "error" - }, - "plugins": ["prettier"] + "extends": ["next/core-web-vitals"] } 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/.github/workflows/DeployPreviewToVercel.yml b/.github/workflows/DeployPreviewToVercel.yml deleted file mode 100644 index d9e97fa..0000000 --- a/.github/workflows/DeployPreviewToVercel.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: V3 Preview Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - push: - # Pattern matched against refs/tags - branches: - - 'V3' - paths-ignore: - - '**/README.md' - - '**/LICENSE' - - '**/TODO.md' - - '**/docs/**' - - '**/extension/**' -jobs: - Deploy-Preview: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Vercel CLI - run: npm install --global vercel@latest - - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - - name: Build Project Artifacts - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/DeployTagToVercel.yml b/.github/workflows/DeployTagToVercel.yml deleted file mode 100644 index fc7ea21..0000000 --- a/.github/workflows/DeployTagToVercel.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Production Tag Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - push: - # Pattern matched against refs/tags - tags: - - '*' # Push events to every tag not containing / - paths-ignore: - - '**/README.md' - - '**/LICENSE' - - '**/TODO.md' - - '**/docs/**' - - '**/extension/**' -jobs: - Deploy-Production: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Vercel CLI - run: npm install --global vercel@latest - - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index f6c46f4..1775543 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ videos/* !videos/*.js !videos/*.ts public/_next-video + +API-Trace/* +.env \ No newline at end of file diff --git a/DEPLOYMENT.RU.md b/DEPLOYMENT.RU.md new file mode 100644 index 0000000..78f43a3 --- /dev/null +++ b/DEPLOYMENT.RU.md @@ -0,0 +1,180 @@ +# Развёртывание приложения AniX + +## Vercel + +Требования: + +- аккаунт GitHub +- аккаунт Vercel + +1. Создайте форк репозитория + + ![fork button](./docs/deploy/fork.png) + +2. Войдите в аккаунт Vercel + +> [!IMPORTANT] +> Аккаунт Vercel должен быть связан с аккаунтом GitHub. +> +> Если у вас нет аккаунта Vercel, то создайте его через вход с помощью GitHub. + +3. Нажмите кнопку создать новый проект + + ![vercel new project button](./docs/deploy/vercel_new_project.png) + +4. Нажмите кнопку импортировать напротив названия репозитория + + ![vercel import button](./docs/deploy/vercel_import.png) + +5. (опционально) добавьте переменные для использования своего плеера: + + - NEXT_PUBLIC_KODIK_PARSER_URL + - NEXT_PUBLIC_ANILIBRIA_PARSER_URL + - NEXT_PUBLIC_SIBNET_PARSER_URL + + на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) + + ![vercel project settings](./docs/deploy/vercel_project.png) + +6. нажмите кнопку "Deploy" и ожидайте пока не появится подтверждение +7. нажмите кнопку "Continue to Dashboard" +8. клиент будет доступен по ссылке такого вида, нажмите на неё чтобы его открыть + ![vercel project url](./docs/deploy/vercel_url.png) + +## Netlify + +Требования: + +- аккаунт GitHub +- аккаунт Netlify + +1. Создайте форк репозитория + + ![fork button](./docs/deploy/fork.png) + +2. Войдите в аккаунт Netlify + +> [!IMPORTANT] +> Аккаунт Netlify должен быть связан с аккаунтом GitHub. +> +> Если у вас нет аккаунта Netlify, то создайте его через вход с помощью GitHub. + +3. Нажмите кнопку создать новый проект + + ![netlify new project button](./docs/deploy/netlify_new_project.png) + +4. Нажмите кнопку GitHub + + ![netlify provider choice](./docs/deploy/netlify_provider.png) + +5. Нажмите на название репозитория + + ![netlify import button](./docs/deploy/netlify_import.png) + +6. (опционально) заполните название проекта + + ![netlify project name](./docs/deploy/netlify_project_name.png) + +7. (опционально) добавьте переменные для использования своего плеера: + + - NEXT_PUBLIC_KODIK_PARSER_URL + - NEXT_PUBLIC_ANILIBRIA_PARSER_URL + - NEXT_PUBLIC_SIBNET_PARSER_URL + + на те которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) + + 1. ![alt text](./docs/deploy/netlify_env_1.png) + + 2. ![alt text](./docs/deploy/netlify_env_2.png) + +8. нажмите кнопку "Deploy" и ожидайте пока не появится подтверждение + +9. клиент будет доступен по ссылке такого вида, нажмите на неё чтобы его открыть + + ![netlify project url](./docs/deploy/netlify_url.png) + +## Docker + +Требования: + +- [docker](https://docs.docker.com/engine/install/) + +### Пре-билд + +1. выполните команду: + +`docker run -d --name anix -p 3000:3000 radiquum/anix:latest` + +### Ручной билд + +Доп. Требования: + +- [git](https://git-scm.com/) + +1. Клонируйте репозиторий `git clone https://github.com/Radiquum/AniX` +2. Переместитесь в директорию репозитория `cd AniX` +3. Выполните команду `docker build -t anix .` +4. После окончания, выполните команду: `docker run -d --restart always --name anix -p 3000:3000 anix` + +### docker/Обозначения + +- -d - запустить контейнер в фоне +- --restart always - всегда запускать после перезагрузки сервера +- --name - название контейнера +- -p - порт контейнера который будет доступен извне. ПОРТ:3000 + +> [!NOTE] +> для переменных которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md), необходимо использовать `-e ПЕРЕМЕННАЯ=ЗНАЧЕНИЕ` до слова anix + +[команда docker run](https://docs.docker.com/reference/cli/docker/container/run/) + +### docker/После развёртывания + +Сервис будет доступен по адресу: `http://<ВАШ IP><:ВАШ ПОРТ>/` + +### docker/Примечание + +Для использования своего домена и поддержки протокола HTTPS, вы можете использовать Traefik или другой reverse-proxy, с сертификатом SSL. + +Полезные ссылки: + +- [Конвертер из команды docker run в синтакс для docker compose](https://it-tools.tech/docker-run-to-docker-compose-converter) +- [Как настроить Traefik + свой домен + SSL](https://letmegooglethat.com/?q=how+to+setup+traefik+with+custom+domain+and+ssl+certificate+from+lets+encrypt%3F) + +## pm2 + +Требования: + +- [git](https://git-scm.com/) +- [nodejs 23+ с npm](http://nodejs.org/) +- [pm2](https://pm2.keymetrics.io/) + +Инструкция: + +1. Клонируйте репозиторий `git clone https://github.com/Radiquum/AniX` +2. Переместитесь в директорию репозитория `cd AniX` +3. Выполните команду `npm install` +4. (опционально) скопируйте .env.sample как .env и заполните его переменными которые вы получили, если развёртывали [anix-player-parsers](./player-parsers/README.RU.md) +5. Выполните команду `npm run build` +6. создайте новую директорию (далее будем использовать `<имя_новой_директории>` как её имя) +7. переместите в созданную директорию (`<имя_новой_директории>`) + - директорию `public` в `<имя_новой_директории>/public` + - директорию `.next/static` в `<имя_новой_директории>/.next/static` + - файлы из `.next/standalone` в `<имя_новой_директории>` +8. Переместитесь в созданную директорию и выполните команду `pm2 start server.js -n anix` + +### pm2/Обозначения + +- -n - название сервиса в pm2 + +### pm2/После развёртывания + +Сервис будет доступен по адресу: `http://<ВАШ IP>:3000/` + +### pm2/Примечание + +Для автоматического запуска приложения, рекомендуется настроить pm2 на автозапуск, с помощью команды: `pm2 startup` + +Полезные ссылки: + +- [PM2: подходим к вопросу процесс-менеджмента с умом @ Habr](https://habr.com/ru/articles/480670/) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md new file mode 100644 index 0000000..f7ae21b --- /dev/null +++ b/DEPLOYMENT.md @@ -0,0 +1,180 @@ +# AniX Application Deployment + +## Vercel + +Requirements: + +- GitHub account +- Vercel account + +1. Fork the repository + + ![fork button](./docs/deploy/fork.png) + +2. Log in to your Vercel account + +> [!IMPORTANT] +> Your Vercel account must be linked with your GitHub account. +> +> If you don't have a Vercel account, create one by signing in with GitHub. + +3. Click the button to create a new project + + ![vercel new project button](./docs/deploy/vercel_new_project.png) + +4. Click the import button next to the repository name + + ![vercel import button](./docs/deploy/vercel_import.png) + +5. (optional) Add variables to use your own player: + + - NEXT_PUBLIC_KODIK_PARSER_URL + - NEXT_PUBLIC_ANILIBRIA_PARSER_URL + - NEXT_PUBLIC_SIBNET_PARSER_URL + + Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md) + + ![vercel project settings](./docs/deploy/vercel_project.png) + +6. Click the "Deploy" button and wait until you see a confirmation +7. Click the "Continue to Dashboard" button +8. The client will be available at a link of this form, click it to open + ![vercel project url](./docs/deploy/vercel_url.png) + +## Netlify + +Requirements: + +- GitHub account +- Netlify account + +1. Fork the repository + + ![fork button](./docs/deploy/fork.png) + +2. Log in to your Netlify account + +> [!IMPORTANT] +> Your Netlify account must be linked with your GitHub account. +> +> If you don't have a Netlify account, create one by signing in with GitHub. + +3. Click the button to create a new project + + ![netlify new project button](./docs/deploy/netlify_new_project.png) + +4. Click the GitHub button + + ![netlify provider choice](./docs/deploy/netlify_provider.png) + +5. Click the repository name + + ![netlify import button](./docs/deploy/netlify_import.png) + +6. (optional) Fill in the project name + + ![netlify project name](./docs/deploy/netlify_project_name.png) + +7. (optional) Add variables to use your own player: + + - NEXT_PUBLIC_KODIK_PARSER_URL + - NEXT_PUBLIC_ANILIBRIA_PARSER_URL + - NEXT_PUBLIC_SIBNET_PARSER_URL + + Use the ones you received if you deployed [anix-player-parsers](./player-parsers/README.md) + + 1. ![alt text](./docs/deploy/netlify_env_1.png) + + 2. ![alt text](./docs/deploy/netlify_env_2.png) + +8. Click the "Deploy" button and wait until you see a confirmation + +9. The client will be available at a link of this form, click it to open + + ![netlify project url](./docs/deploy/netlify_url.png) + +## Docker + +Requirements: + +- [docker](https://docs.docker.com/engine/install/) + +### Pre-built + +1. Run the command: + +`docker run -d --name anix -p 3000:3000 radiquum/anix:latest` + +### Manual build + +Additional Requirements: + +- [git](https://git-scm.com/) + +1. Clone the repository `git clone https://github.com/Radiquum/AniX` +2. Navigate to the repository directory `cd AniX` +3. Run the command `docker build -t anix .` +4. Once finished, run the command: `docker run -d --restart always --name anix -p 3000:3000 anix` + +### docker/Flags + +- -d - run container in the background +- --restart always - always restart after server reboot +- --name - container name +- -p - container port to be exposed externally. PORT:3000 + +> [!NOTE] +> For variables you received if you deployed [anix-player-parsers](./player-parsers/README.md), you need to use `-e VARIABLE=VALUE` before the word anix + +[docker run command](https://docs.docker.com/reference/cli/docker/container/run/) + +### docker/After deployment + +The service will be available at: `http://<:YOUR PORT>/` + +### docker/Note + +To use your own domain and support HTTPS protocol, you can use Traefik or another reverse proxy with SSL certificate. + +Useful links: + +- [Converter from docker run command to docker compose syntax](https://it-tools.tech/docker-run-to-docker-compose-converter) +- [How to setup Traefik + custom domain + SSL](https://letmegooglethat.com/?q=how+to+setup+traefik+with+custom+domain+and+ssl+certificate+from+lets+encrypt%3F) + +## pm2 + +Requirements: + +- [git](https://git-scm.com/) +- [nodejs 23+ with npm](http://nodejs.org/) +- [pm2](https://pm2.keymetrics.io/) + +Instructions: + +1. Clone the repository `git clone https://github.com/Radiquum/AniX` +2. Navigate to the repository directory `cd AniX` +3. Run the command `npm install` +4. (optional) copy `.env.sample` as `.env` and fill it with variables you received if you deployed [anix-player-parsers](./player-parsers/README.md) +5. Run the command `npm run build` +6. Create a new directory (next we will be refer to its name as ``) +7. Move the following files into the new directory (``): + - move `public` directory to `/public` + - move `.next/static` directory to `/.next/static` + - move files from `.next/standalone` to `` +8. Move into the created directory () and run the command `pm2 start server.js -n anix` + +### pm2/Flags + +- -n - service name in pm2 + +### pm2/After deployment + +The service will be available at: `http://:3000/` + +### pm2/Note + +To enable automatic application startup, it is recommended to configure pm2 to start on boot using the command: `pm2 startup` + +Useful links: + +- [PM2: managing processes smartly @ Habr](https://habr.com/ru/articles/480670/) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..87783ac --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM node:23-alpine AS base + + +FROM base AS deps +RUN apk add --no-cache libc6-compat +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci + + +FROM base AS builder +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . +RUN npm run build + + +FROM base AS runner +LABEL org.opencontainers.image.source=https://github.com/radiquum/anix +WORKDIR /app +ENV NODE_ENV=production +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs +COPY --from=builder --chown=nextjs:nodejs /app/public ./public +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static +USER nextjs + +EXPOSE 3000 +ENV PORT=3000 +ENV HOSTNAME="0.0.0.0" +CMD ["node", "server.js"] diff --git a/docs/REAME.RU.md b/README.RU.md similarity index 75% rename from docs/REAME.RU.md rename to README.RU.md index b62c36e..70ca94e 100644 --- a/docs/REAME.RU.md +++ b/README.RU.md @@ -2,21 +2,20 @@ AniX - это неофициальный веб-клиент для Android-приложения Anixart. Он позволяет вам получать доступ к своей учетной записи Anixart и управлять ею из веб-браузера на вашем настольном компьютере или ноутбуке. -[Расширение для браузера](./extension/README.md) - -## Список изменений - -- [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) - -[другие версии](/public/changelog) - ## Отказ от ответственности Пожалуйста, обратите внимание, что Anix является неофициальным проектом и не связан с разработчиками Anixart. Рекомендуется использовать официальное приложение Anixart для получения наиболее актуальных функций. +--- + +[[RU] ПРОЧТИ МЕНЯ](./README.RU.md) | [[EN] README](./README.md) + +[[RU] РАЗВЁРТЫВАНИЕ](./DEPLOYMENT.RU.md) | [[EN] DEPLOY](./DEPLOYMENT.md) + +[[RU] Списки изменений](./public/changelog) + +--- + ## Скриншоты
@@ -54,12 +53,6 @@ AniX - это неофициальный веб-клиент для Android-пр
-## Возможности - -1. Используйте свой существующий аккаунт на Anixart -2. Синхронизируйте списки, историю просмотров, коллекции и многое другое -3. используйте практически все функции приложения для Android - ## Внесение вклада Мы приветствуем вклад в этот проект! Если у вас есть какие-либо исправления ошибок, улучшения или новые функции, пожалуйста, не стесняйтесь отправлять запрос на обновление. diff --git a/README.md b/README.md index b0f2660..0f965ed 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,20 @@ AniX is an unofficial web client for the Android application Anixart. It allows you to access and manage your Anixart account from a web browser on your desktop or laptop computer. -[Readme [RU]](./docs/REAME.RU.md) | [Browser Extension [RU]](./extension/README.md) - -## 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) - -[other versions](./public/changelog) - ## Disclaimer Please note that AniX is an unofficial project and is not affiliated with the developers of Anixart. It is recommended to use the official Anixart app for the most up-to-date features and functionality. +--- + +[[RU] ПРОЧТИ МЕНЯ](./README.RU.md) | [[EN] README](./README.md) + +[[RU] РАЗВЁРТЫВАНИЕ](./DEPLOYMENT.RU.md) | [[EN] DEPLOY](./DEPLOYMENT.md) + +[[RU] Changelogs](./public/changelog) + +--- + ## Screenshots
@@ -54,12 +53,6 @@ Please note that AniX is an unofficial project and is not affiliated with the de
-## Features - -1. Use your existing Anixart account -2. sync lists, watch history, collections and more -3. use almost all features of an android app - ## Contributing -We welcome contributions to this project! If you have any bug fixes, improvements, or new features, please feel free to create a pull request. \ No newline at end of file +We welcome contributions to this project! If you have any bug fixes, improvements, or new features, please feel free to create a pull request. diff --git a/app/App.tsx b/app/App.tsx index 69d1288..8cccbd0 100644 --- a/app/App.tsx +++ b/app/App.tsx @@ -4,10 +4,15 @@ 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"; import { Bounce, ToastContainer } from "react-toastify"; const inter = Inter({ subsets: ["latin"] }); @@ -80,8 +85,8 @@ export const App = (props) => { show={preferencesStore.params.isFirstLaunch} onClose={() => preferencesStore.setParams({ isFirstLaunch: false })} > - Внимание - + Внимание +

Данный сайт не связан с разработчиками приложения Anixart, это неофициальная имплементация веб клиента для этого приложения. @@ -94,24 +99,16 @@ 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/CollectionLink/CollectionLink.tsx b/app/components/CollectionLink/CollectionLink.tsx index 4b45fe8..61371e1 100644 --- a/app/components/CollectionLink/CollectionLink.tsx +++ b/app/components/CollectionLink/CollectionLink.tsx @@ -49,11 +49,13 @@ export const CollectionLink = (props: any) => { {props.title}

-

- {`${props.description.slice(0, 125)}${ - props.description.length > 125 ? "..." : "" - }`} -

+ {props.description && ( +

+ {`${props.description.slice(0, 125)}${ + props.description.length > 125 ? "..." : "" + }`} +

+ )} 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)}>
-