diff --git a/extractedTranslations/en/profile.json b/extractedTranslations/en/profile.json index 60ad9a2..9383768 100644 --- a/extractedTranslations/en/profile.json +++ b/extractedTranslations/en/profile.json @@ -1,30 +1,30 @@ { - "": "", - "Age": "", - "Avatar": "", - "City": "", - "Edit": "", - "Error": "", - "Error with getting profile data": "", - "Error with profile ": "", - "Incorrect age": "", - "Incorrect country": "", - "Incorrect user data": "", - "Lastname": "", - "Name": "", - "No data": "", - "Profile": "", - "Server error": "", - "Try to reload page": "", - "Username": "", - "Username>": "", - "Your age": "", - "Your avatar": "", - "Your city": "", - "Your lastname": "", - "Your name": "", - "Your surname": "", - "Your username": "", - "Попробуйте обновить страницу": "", - "Произошла ошибка при загрузке профиля": "" + "": "", + "Age": "", + "Avatar": "", + "City": "", + "Edit": "", + "Error": "", + "Error with getting profile data": "", + "Error with profile ": "", + "Incorrect age": "", + "Incorrect country": "", + "Incorrect user data": "", + "Lastname": "", + "Name": "", + "No data": "", + "Profile": "", + "Server error": "", + "Try to reload page": "", + "Username": "", + "Username>": "", + "Your age": "", + "Your avatar": "", + "Your city": "", + "Your lastname": "", + "Your name": "", + "Your surname": "", + "Your username": "", + "Попробуйте обновить страницу": "", + "Произошла ошибка при загрузке профиля": "" } diff --git a/extractedTranslations/en/translation.json b/extractedTranslations/en/translation.json index 1d5b748..8ba05d5 100644 --- a/extractedTranslations/en/translation.json +++ b/extractedTranslations/en/translation.json @@ -1,124 +1,124 @@ { - "": "", - "123": "123", - "About site": "", - "Admin panel": "", - "All": "", - "Article ratings coming soon!": "", - "Articles": "", - "Articles app": "", - "Articles not found": "", - "Ascending": "", - "Back to list": "", - "Cancel": "", - "Choose ": "", - "Choose country": "", - "Choose currency": "", - "Close": "", - "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": "", - "Main page": "", - "Main_page": "", - "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": "", - "{{count}} views": "", - "{{count}} views_plural": "", - "{{count}} просмотров": "", - "{{count}} просмотров_plural": "", - "Айти": "", - "Ваш отзыв": "", - "Все статьи": "", - "Главная страница": "", - "Закрыть": "", - "Наука": "", - "Обновить страницу": "", - "Отправить": "", - "Оценка статей скоро появится!": "", - "Поиск": "", - "Попробуйте обновить страницу": "", - "Произошла непредвиденная ошибка": "", - "Произошла ошибка при загрузке профиля": "", - "Редактировать": "", - "Сортировать ПО": "", - "Статьи не найдены": "", - "Экономика": "", - "возрастанию": "", - "дате создания": "", - "названию": "", - "по": "", - "просмотрам": "", - "убыванию": "" + "": "", + "123": "123", + "About site": "", + "Admin panel": "", + "All": "", + "Article ratings coming soon!": "", + "Articles": "", + "Articles app": "", + "Articles not found": "", + "Ascending": "", + "Back to list": "", + "Cancel": "", + "Choose ": "", + "Choose country": "", + "Choose currency": "", + "Close": "", + "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": "", + "Main page": "", + "Main_page": "", + "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": "", + "{{count}} views": "", + "{{count}} views_plural": "", + "{{count}} просмотров": "", + "{{count}} просмотров_plural": "", + "Айти": "", + "Ваш отзыв": "", + "Все статьи": "", + "Главная страница": "", + "Закрыть": "", + "Наука": "", + "Обновить страницу": "", + "Отправить": "", + "Оценка статей скоро появится!": "", + "Поиск": "", + "Попробуйте обновить страницу": "", + "Произошла непредвиденная ошибка": "", + "Произошла ошибка при загрузке профиля": "", + "Редактировать": "", + "Сортировать ПО": "", + "Статьи не найдены": "", + "Экономика": "", + "возрастанию": "", + "дате создания": "", + "названию": "", + "по": "", + "просмотрам": "", + "убыванию": "" } diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index cefe0a7..682c0b7 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -20,7 +20,7 @@ "login_error": "An incorrect username or password", "exit": "Exit", "main_page": "Main page", - "{{count}} views_zero": "{{count}} views", - "{{count}} views_one": "{{count}} view", - "{{count}} views_other": "{{count}} views" + "{{count}} views_zero": "{{count}} views", + "{{count}} views_one": "{{count}} view", + "{{count}} views_other": "{{count}} views" } diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 90dd907..1e951a3 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -24,8 +24,8 @@ "About site": "О сайте", "Profile": "Профиль", "Articles": "Статьи", - "{{count}} views_zero": "{{count}} просмотров", - "{{count}} views_one": "{{count}} просмотр", - "{{count}} views_few": "{{count}} просмотров", - "{{count}} views_many": "{{count}} просмотров" + "{{count}} views_zero": "{{count}} просмотров", + "{{count}} views_one": "{{count}} просмотр", + "{{count}} views_few": "{{count}} просмотров", + "{{count}} views_many": "{{count}} просмотров" } diff --git a/src/app/providers/ThemeProvider/ui/ThemeProvider.tsx b/src/app/providers/ThemeProvider/ui/ThemeProvider.tsx index 792b7b3..aa07375 100644 --- a/src/app/providers/ThemeProvider/ui/ThemeProvider.tsx +++ b/src/app/providers/ThemeProvider/ui/ThemeProvider.tsx @@ -25,6 +25,11 @@ const ThemeProvider = (props: ThemeProviderProps) => { } }, [defaultTheme, isThemeInited]); + // for scroll theme changes + useEffect(() => { + document.body.className = theme; + }, [theme]); + const defaultProps = useMemo( () => ({ theme, diff --git a/src/entities/Article/ui/ArticleListItem/ArticleListItem.module.scss b/src/entities/Article/ui/ArticleListItem/ArticleListItem.module.scss index b91aa68..dc9ef8a 100644 --- a/src/entities/Article/ui/ArticleListItem/ArticleListItem.module.scss +++ b/src/entities/Article/ui/ArticleListItem/ArticleListItem.module.scss @@ -47,4 +47,11 @@ &.BIG { width: 100%; } + + &.SMALL { + .card { + height: 350px; + width: 240px; + } + } } diff --git a/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.module.scss b/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.module.scss index 2539bd2..51dd1c6 100644 --- a/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.module.scss +++ b/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.module.scss @@ -92,9 +92,6 @@ .title { margin-top: 8px; - height: 26px; - overflow: hidden; - text-overflow: ellipsis; } .title p { @@ -109,4 +106,11 @@ &.BIG { width: 100%; } + + &.SMALL { + .card { + height: 350px; + width: 240px; + } + } } diff --git a/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.tsx b/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.tsx index efe4913..b005fb4 100644 --- a/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.tsx +++ b/src/entities/Article/ui/ArticleListItem/ArticleListItemSkeleton/ArticleListItemSkeleton.tsx @@ -1,9 +1,9 @@ import { memo } from 'react'; +import { classNames } from '@/shared/lib/classNames/classNames'; import { Card } from '@/shared/ui/redesigned/Card'; import { Skeleton } from '@/shared/ui/redesigned/Skeleton'; -import { classNames } from '@/shared/lib/classNames/classNames'; -import { ArticleView } from '../../../model/consts/consts'; import cls from './ArticleListItemSkeleton.module.scss'; +import { ArticleView } from '../../../model/consts/consts'; interface ArticleListItemSkeletonProps { className?: string; @@ -15,6 +15,28 @@ export const ArticleListItemSkeleton = memo( const { className, view } = props; if (view === ArticleView.BIG) { + const cardContent = ( + <> +
+ + + +
+ + +
+ +
+ + ); return (
- -
- - - -
- - -
- -
+ + {cardContent}
); } + const cardContent = ( + <> + +
+ +
+ + + ); + return (
- -
- -
-
- -
- + + {cardContent}
); diff --git a/src/shared/lib/features/services/updateFeatureFlags.ts b/src/shared/lib/features/services/updateFeatureFlags.ts index 250852b..40c5d36 100644 --- a/src/shared/lib/features/services/updateFeatureFlags.ts +++ b/src/shared/lib/features/services/updateFeatureFlags.ts @@ -13,7 +13,7 @@ export const updateFeatureFlag = createAsyncThunk< void, UpdateFeatureFlagOptions, ThunkConfig ->('user/saveJsonSettings', async ({ userId, newFeatures }, thunkApi) => { +>('features/updateFeatureFlag', async ({ userId, newFeatures }, thunkApi) => { const { rejectWithValue, dispatch } = thunkApi; try {