diff --git a/extractedTranslations/en/translation.json b/extractedTranslations/en/translation.json index 7f489a1..e9bff5b 100644 --- a/extractedTranslations/en/translation.json +++ b/extractedTranslations/en/translation.json @@ -1,113 +1,114 @@ { - "": "", - "123": "123", - "Admin panel": "", - "All": "", - "Article ratings coming soon!": "", - "Articles app": "", - "Articles not found": "", - "Ascending": "", - "Back to list": "", - "Cancel": "", - "Choose ": "", - "Choose country": "", - "Choose currency": "", - "Comments": "", - "Comments is loading": "", - "Create new article": "", - "Creation date": "", - "Descending": "", - "Design options": "", - "Economics": "", - "Edit": "", - "Enter ": "", - "Enter comment text": "", - "Enter cooment text": "", - "Error while loading articles": "", - "Error with getting article data": "", - "Error with getting profile data": "", - "Exit": "", - "Here you can search and view articles on various topics": "", - "IT": "", - "Incorrect age": "", - "Incorrect country": "", - "Incorrect user data": "", - "Leave your feedback on the article, it will help improve the quality": "", - "Name": "", - "New": "", - "No data": "", - "Old": "", - "PROFILE PAGE": "", - "Profile": "", - "Rate the article": "", - "Read more": { - "": { - "": { - "": "" - } - } - }, - "Recommend": "", - "Save": "", - "Science": "", - "Search": "", - "Send": "", - "Server error": "", - "Sort by": "", - "Sorting by": "", - "Thanks for review!": "", - "Try to reload page": "", - "User settings": "", - "Views": "", - "Welcome to the articles page!": "", - "You don`t have access to this page!": "", - "Your name": "", - "article_not_found": "", - "articles": "", - "articles page": "", - "articles_details": "", - "articles_details page": "", - "articles_detals": "", - "ascending": "", - "auth_form": "", - "auth_password": "", - "auth_username": "", - "by": "", - "comments": "", - "creation date": "", - "decrement": "", - "descending": "", - "exit": "", - "increment": "", - "login": "", - "login_error": "", - "name": "", - "no articles found": "", - "no comments": "", - "no profile found": "", - "read more": "", - "throw error": "throw error", - "views": "", - "Айти": "", - "Ваш отзыв": "", - "Все статьи": "", - "Главная страница": "", - "Закрыть": "", - "Наука": "", - "Обновить страницу": "", - "Отправить": "", - "Оценка статей скоро появится!": "", - "Поиск": "", - "Попробуйте обновить страницу": "", - "Произошла непредвиденная ошибка": "", - "Произошла ошибка при загрузке профиля": "", - "Сортировать ПО": "", - "Статьи не найдены": "", - "Экономика": "", - "возрастанию": "", - "дате создания": "", - "названию": "", - "по": "", - "просмотрам": "", - "убыванию": "" + "": "", + "123": "123", + "Admin panel": "", + "All": "", + "Article ratings coming soon!": "", + "Articles app": "", + "Articles not found": "", + "Ascending": "", + "Back to list": "", + "Cancel": "", + "Choose ": "", + "Choose country": "", + "Choose currency": "", + "Comments": "", + "Comments is loading": "", + "Create new article": "", + "Creation date": "", + "Descending": "", + "Design options": "", + "Economics": "", + "Edit": "", + "Enter ": "", + "Enter comment text": "", + "Enter cooment text": "", + "Error while loading articles": "", + "Error with getting article data": "", + "Error with getting profile data": "", + "Exit": "", + "Here you can search and view articles on various topics": "", + "IT": "", + "Incorrect age": "", + "Incorrect country": "", + "Incorrect user data": "", + "Leave your feedback on the article, it will help improve the quality": "", + "Name": "", + "New": "", + "No data": "", + "Old": "", + "PROFILE PAGE": "", + "Profile": "", + "Rate the article": "", + "Read more": { + "": { + "": { + "": "" + } + } + }, + "Recommend": "", + "Save": "", + "Science": "", + "Search": "", + "Send": "", + "Server error": "", + "Sort by": "", + "Sorting by": "", + "Thanks for review!": "", + "Try to reload page": "", + "User settings": "", + "Views": "", + "Welcome to the articles page!": "", + "You don`t have access to this page!": "", + "Your name": "", + "Your review": "", + "article_not_found": "", + "articles": "", + "articles page": "", + "articles_details": "", + "articles_details page": "", + "articles_detals": "", + "ascending": "", + "auth_form": "", + "auth_password": "", + "auth_username": "", + "by": "", + "comments": "", + "creation date": "", + "decrement": "", + "descending": "", + "exit": "", + "increment": "", + "login": "", + "login_error": "", + "name": "", + "no articles found": "", + "no comments": "", + "no profile found": "", + "read more": "", + "throw error": "throw error", + "views": "", + "Айти": "", + "Ваш отзыв": "", + "Все статьи": "", + "Главная страница": "", + "Закрыть": "", + "Наука": "", + "Обновить страницу": "", + "Отправить": "", + "Оценка статей скоро появится!": "", + "Поиск": "", + "Попробуйте обновить страницу": "", + "Произошла непредвиденная ошибка": "", + "Произошла ошибка при загрузке профиля": "", + "Сортировать ПО": "", + "Статьи не найдены": "", + "Экономика": "", + "возрастанию": "", + "дате создания": "", + "названию": "", + "по": "", + "просмотрам": "", + "убыванию": "" } diff --git a/src/app/App.tsx b/src/app/App.tsx index 432e3d9..33d14ad 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -25,7 +25,7 @@ function App() { } return ( -
+
} diff --git a/src/app/styles/index.scss b/src/app/styles/index.scss index eaae329..81707f1 100644 --- a/src/app/styles/index.scss +++ b/src/app/styles/index.scss @@ -4,21 +4,11 @@ @import "./themes/dark"; @import "./themes/orange"; -body { - font: var(--font-m); - color: var(--primary-color); -} - .app { - background: var(--bg-color); - min-height: 100vh; -} - -.app_redesigned { background: var(--bg-redesigned); - min-height: 100vh; font: var(--font-m-redesigned); color: var(--text-redesigned); + min-height: 100vh; } .content-page { @@ -26,16 +16,16 @@ body { } *::-webkit-scrollbar { - width: 12px; /* ширина scrollbar */ + width: 12px; height: 8px; } *::-webkit-scrollbar-track { - background: var(--card-bg); /* цвет дорожки */ + background: var(--light-bg-redesigned); } *::-webkit-scrollbar-thumb { - background-color: var(--inverted-primary-color); /* цвет плашки */ - border-radius: 20px; /* закругления плашки */ - border: 2px solid var(--primary-color); /* padding вокруг плашки */ + background-color: var(--icon-redesigned); + border-radius: 20px; + border: 1px solid var(--accent-redesigned); } diff --git a/src/entities/Rating/ui/RatingCard.tsx b/src/entities/Rating/ui/RatingCard.tsx index 0603e61..b86dc7d 100644 --- a/src/entities/Rating/ui/RatingCard.tsx +++ b/src/entities/Rating/ui/RatingCard.tsx @@ -5,11 +5,11 @@ import { HStack, VStack } from '@/shared/ui/redesigned/Stack'; import { Card } from '@/shared/ui/deprecated/Card'; import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/deprecated/Button'; import { Text } from '@/shared/ui/deprecated/Text'; -import { StarRating } from '@/shared/ui/deprecated/StarRating'; import { classNames } from '@/shared/lib/classNames/classNames'; import { Input } from '@/shared/ui/deprecated/Input'; -import { Modal } from '@/shared/ui/deprecated/Modal'; -import { Drawer } from '@/shared/ui/deprecated/Drawer'; +import { StarRating } from '@/shared/ui/deprecated/StarRating'; +import { Modal } from '@/shared/ui/redesigned/Modal'; +import { Drawer } from '@/shared/ui/redesigned/Drawer'; interface RatingCardProps { className?: string; @@ -65,7 +65,7 @@ export const RatingCard = memo((props: RatingCardProps) => { data-testid="RatingCard.Input" value={feedback} onChange={setFeedback} - placeholder={t('Ваш отзыв')} + placeholder={t('Your review')} /> ); @@ -115,7 +115,7 @@ export const RatingCard = memo((props: RatingCardProps) => { onClick={acceptHandle} size={ButtonSize.L} > - {t('Отправить')} + {t('Send')} diff --git a/src/features/AuthByUsername/ui/LoginForm/LoginForm.tsx b/src/features/AuthByUsername/ui/LoginForm/LoginForm.tsx index cc3f400..61ae6a5 100644 --- a/src/features/AuthByUsername/ui/LoginForm/LoginForm.tsx +++ b/src/features/AuthByUsername/ui/LoginForm/LoginForm.tsx @@ -1,8 +1,8 @@ import { useTranslation } from 'react-i18next'; import { useSelector } from 'react-redux'; import { memo, useCallback } from 'react'; -import { Button, ButtonTheme } from '@/shared/ui/deprecated/Button'; -import { Text, TextTheme } from '@/shared/ui/deprecated/Text'; +import { Button } from '@/shared/ui/redesigned/Button'; +import { Text } from '@/shared/ui/redesigned/Text'; import { classNames } from '@/shared/lib/classNames/classNames'; import { DynamicModuleLoader, @@ -16,7 +16,8 @@ import { getLoginError } from '../../model/selectors/getLoginError/getLoginError import cls from './LoginForm.module.scss'; import { loginActions, loginReducer } from '../../model/slice/loginSlice'; import { loginByUsername } from '../../model/services/loginByUsername/loginByUsername'; -import { Input } from '@/shared/ui/deprecated/Input'; +import { Input } from '@/shared/ui/redesigned/Input'; +import { VStack } from '@/shared/ui/redesigned/Stack'; export interface LoginFormProps { className?: string; @@ -59,34 +60,33 @@ const LoginForm = memo(({ className, onSuccess }: LoginFormProps) => { return (
- - {error && ( - - )} - - - - + + + {error && } + + + +
); diff --git a/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx b/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx index 3071ee8..c250f4f 100644 --- a/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx +++ b/src/features/AuthByUsername/ui/LoginModal/LoginModal.tsx @@ -1,7 +1,7 @@ import { Suspense } from 'react'; +import { Modal } from '@/shared/ui/redesigned/Modal'; import { LoginFormAsync } from '../LoginForm/LoginForm.async'; import { PageLoader } from '../../../PageLoader'; -import { Modal } from '@/shared/ui/deprecated/Modal'; interface LoginModalProps { className?: string; diff --git a/src/features/articlePageGreeting/ui/ArticlePageGreeting/ArticlePageGreeting.tsx b/src/features/articlePageGreeting/ui/ArticlePageGreeting/ArticlePageGreeting.tsx index 8d81a77..123c858 100644 --- a/src/features/articlePageGreeting/ui/ArticlePageGreeting/ArticlePageGreeting.tsx +++ b/src/features/articlePageGreeting/ui/ArticlePageGreeting/ArticlePageGreeting.tsx @@ -1,11 +1,11 @@ import { useTranslation } from 'react-i18next'; import { memo, useEffect, useState } from 'react'; import { isMobile } from 'react-device-detect'; +import { Drawer } from '@/shared/ui/redesigned/Drawer'; +import { Modal } from '@/shared/ui/redesigned/Modal'; import { Text } from '@/shared/ui/deprecated/Text'; import { saveJsonSettings, useJsonSettings } from '@/entities/User'; import { useAppDispatch } from '@/shared/lib/hook/useAppDispatch/useAppDispatch'; -import { Drawer } from '@/shared/ui/deprecated/Drawer'; -import { Modal } from '@/shared/ui/deprecated/Modal'; export const ArticlePageGreeting = memo(() => { const { t } = useTranslation(); diff --git a/src/features/notificationButton/ui/NotificationButton/NotificationButton.tsx b/src/features/notificationButton/ui/NotificationButton/NotificationButton.tsx index 0b4d7db..b3bd187 100644 --- a/src/features/notificationButton/ui/NotificationButton/NotificationButton.tsx +++ b/src/features/notificationButton/ui/NotificationButton/NotificationButton.tsx @@ -1,10 +1,10 @@ import React, { memo, useCallback, useState } from 'react'; import { BrowserView, MobileView } from 'react-device-detect'; +import { Drawer } from '@/shared/ui/redesigned/Drawer'; import NotificationIcon from '@/shared/assets/icons/notification.svg'; import { NotificationList } from '../../../../entities/Notification'; import cls from './NotificationButton.module.scss'; -import { Drawer as DrawerDeprecated } from '@/shared/ui/deprecated/Drawer'; import { Icon } from '@/shared/ui/redesigned/Icon'; import { Popover } from '@/shared/ui/redesigned/Popups'; @@ -32,9 +32,9 @@ export const NotificationButton = memo(() => { {trigger} - + - +
); diff --git a/src/shared/lib/features/lib/setGetFeatures.ts b/src/shared/lib/features/lib/setGetFeatures.ts index ddc3adf..9d96321 100644 --- a/src/shared/lib/features/lib/setGetFeatures.ts +++ b/src/shared/lib/features/lib/setGetFeatures.ts @@ -10,7 +10,7 @@ export function setFeatureFlags(newFeatureFlags?: FeatureFlags) { } export function getFeatureFlag(flag: keyof FeatureFlags) { - return featureFlags[flag]; + return featureFlags[flag] ?? true; } export function getAllFeatureFlags() { diff --git a/src/shared/ui/deprecated/Drawer/Drawer.module.scss b/src/shared/ui/redesigned/Drawer/Drawer.module.scss similarity index 92% rename from src/shared/ui/deprecated/Drawer/Drawer.module.scss rename to src/shared/ui/redesigned/Drawer/Drawer.module.scss index 330dafb..746a53a 100644 --- a/src/shared/ui/deprecated/Drawer/Drawer.module.scss +++ b/src/shared/ui/redesigned/Drawer/Drawer.module.scss @@ -26,7 +26,7 @@ height: calc(100vh + 100px); width: 96vw; border-radius: 12px 12px 0; - background: var(--bg-color); + background: var(--light-bg-redesigned); touch-action: none; padding: 15px; } diff --git a/src/shared/ui/deprecated/Drawer/Drawer.tsx b/src/shared/ui/redesigned/Drawer/Drawer.tsx similarity index 92% rename from src/shared/ui/deprecated/Drawer/Drawer.tsx rename to src/shared/ui/redesigned/Drawer/Drawer.tsx index 7ea3832..5ea8c0e 100644 --- a/src/shared/ui/deprecated/Drawer/Drawer.tsx +++ b/src/shared/ui/redesigned/Drawer/Drawer.tsx @@ -4,9 +4,9 @@ import { AnimationProvider, useAnimationLibs, } from '@/shared/lib/components/AnimationProvider'; -import { Overlay } from '../../redesigned/Overlay/Overlay'; +import { Overlay } from '../Overlay/Overlay'; import cls from './Drawer.module.scss'; -import { Portal } from '../../redesigned/Portal/Portal'; +import { Portal } from '../Portal/Portal'; import { useTheme } from '@/shared/lib/hook/useTheme/useTheme'; interface DrawerProps { @@ -79,7 +79,7 @@ export const DrawerContent = memo((props: DrawerProps) => { const display = y.to((py) => (py < height ? 'block' : 'none')); return ( - +
{ ); }); -/** - * Устарел, используем новые компоненты из папки redesigned - * @deprecated - */ - const DrawerAsync = (props: DrawerProps) => { const { isLoaded } = useAnimationLibs(); diff --git a/src/shared/ui/deprecated/Drawer/index.ts b/src/shared/ui/redesigned/Drawer/index.ts similarity index 100% rename from src/shared/ui/deprecated/Drawer/index.ts rename to src/shared/ui/redesigned/Drawer/index.ts diff --git a/src/shared/ui/deprecated/Modal/Modal.module.scss b/src/shared/ui/redesigned/Modal/Modal.module.scss similarity index 93% rename from src/shared/ui/deprecated/Modal/Modal.module.scss rename to src/shared/ui/redesigned/Modal/Modal.module.scss index e87fd0c..2829cb2 100644 --- a/src/shared/ui/deprecated/Modal/Modal.module.scss +++ b/src/shared/ui/redesigned/Modal/Modal.module.scss @@ -15,7 +15,7 @@ .content { padding: 20px; border-radius: 12px; - background: var(--bg-color); + background: var(--light-bg-redesigned); transition: 0.3s transform; transform: scale(0.5); max-width: 60%; diff --git a/src/shared/ui/deprecated/Modal/Modal.stories.tsx b/src/shared/ui/redesigned/Modal/Modal.stories.tsx similarity index 97% rename from src/shared/ui/deprecated/Modal/Modal.stories.tsx rename to src/shared/ui/redesigned/Modal/Modal.stories.tsx index 4dbb39e..794bdf9 100644 --- a/src/shared/ui/deprecated/Modal/Modal.stories.tsx +++ b/src/shared/ui/redesigned/Modal/Modal.stories.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { ComponentMeta, ComponentStory } from '@storybook/react'; import { ThemeDecorator } from '@/shared/config/storybook/ThemeDecorator/ThemeDecorator'; -import { Modal } from '../Modal/Modal'; +import { Modal } from './Modal'; import { Theme } from '@/shared/const/theme'; export default { diff --git a/src/shared/ui/deprecated/Modal/Modal.tsx b/src/shared/ui/redesigned/Modal/Modal.tsx similarity index 80% rename from src/shared/ui/deprecated/Modal/Modal.tsx rename to src/shared/ui/redesigned/Modal/Modal.tsx index ab7b991..1ed922e 100644 --- a/src/shared/ui/deprecated/Modal/Modal.tsx +++ b/src/shared/ui/redesigned/Modal/Modal.tsx @@ -1,8 +1,8 @@ import React, { ReactNode } from 'react'; import { classNames, Mods } from '@/shared/lib/classNames/classNames'; import { useModal } from '@/shared/lib/hook/useModal/useModal'; -import { Overlay } from '../../redesigned/Overlay/Overlay'; -import { Portal } from '../../redesigned/Portal/Portal'; +import { Overlay } from '../Overlay/Overlay'; +import { Portal } from '../Portal/Portal'; import cls from './Modal.module.scss'; import { useTheme } from '@/shared/lib/hook/useTheme/useTheme'; @@ -35,12 +35,9 @@ export const Modal = (props: ModalProps) => { if (lazy && !isMounted) { return null; } - /** - * Устарел, используем новые компоненты из папки redesigned - * @deprecated - */ + return ( - +
{children}
diff --git a/src/shared/ui/deprecated/Modal/index.ts b/src/shared/ui/redesigned/Modal/index.ts similarity index 100% rename from src/shared/ui/deprecated/Modal/index.ts rename to src/shared/ui/redesigned/Modal/index.ts