From f5548f39da188a94236772e66b61bf6b650fe97c Mon Sep 17 00:00:00 2001 From: smanylov Date: Mon, 20 Apr 2026 18:34:27 +0700 Subject: [PATCH] add user status translate + fix notification count-icon size while long numbers --- package.json | 2 +- src/app/hooks/react-query/useUserDataInfo.ts | 2 +- src/app/styles/header.scss | 1 + src/app/ui/header/notificationsButton.tsx | 16 ++++++++++ .../ui/settings/setting-user-verification.tsx | 29 +++++++++++++++---- src/i18n/messages/en.json | 10 ++++++- src/i18n/messages/ru.json | 10 ++++++- 7 files changed, 60 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e21d3c5..ffcbaa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "no-copy-frontend", - "version": "0.93.0", + "version": "0.94.0", "private": true, "scripts": { "dev": "next dev -p 2999", diff --git a/src/app/hooks/react-query/useUserDataInfo.ts b/src/app/hooks/react-query/useUserDataInfo.ts index 8743288..e7fd120 100644 --- a/src/app/hooks/react-query/useUserDataInfo.ts +++ b/src/app/hooks/react-query/useUserDataInfo.ts @@ -39,7 +39,7 @@ export interface UserData { tariffs: Tariff[]; tariffInfo: TariffInfo; permission: number; - verifiedStatus?: string; + verifiedStatus?: 'unknow' | 'NOT_VERIFIED' | 'VERIFICATION_IN_PROGRESS' | 'VERIFIED' | 'VERIFICATION_FAILED'; } export const useUserProfile = () => { diff --git a/src/app/styles/header.scss b/src/app/styles/header.scss index fdb0a5f..5de3dc4 100644 --- a/src/app/styles/header.scss +++ b/src/app/styles/header.scss @@ -279,6 +279,7 @@ justify-content: center; align-items: center; font-size: 12px; + padding-top: 1px; } } diff --git a/src/app/ui/header/notificationsButton.tsx b/src/app/ui/header/notificationsButton.tsx index 159c980..e1a5000 100644 --- a/src/app/ui/header/notificationsButton.tsx +++ b/src/app/ui/header/notificationsButton.tsx @@ -121,6 +121,21 @@ export default function NotificationsButton() { } }; + const getFontSizeByCount = (count: number | undefined) => { + if (!count) return '12px'; + + const countStr = String(count); + + switch (countStr.length) { + case 3: + return '10px'; + case 4: + return '8px'; + default: + return '12px'; + } + }; + return (
*/}
) diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 1760bbe..6f20f19 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -422,7 +422,6 @@ "protected-files": "Protected files", "storage": "Storage", "Status": "Status", - "under-moderation": "Under moderation", "full-link": "Full link", "follow-the-link": "Follow the link", "date-of-discovery": "Date of discovery", @@ -570,5 +569,14 @@ "notification-file-moderation": "File moderation event", "notification-file-added": "File added to system", "notification-search-operation-filed": "Search operation failed" + }, + "User-status": { + "under-moderation": "Under moderation", + "NOT_VERIFIED": "Not verified", + "VERIFIED": "Verified", + "VERIFICATION_FAILED": "Verification failed", + "unknow": "Unknown", + "user-verification": "User verification", + "Status": "Status" } } \ No newline at end of file diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index 3fe3d22..f08b493 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -422,7 +422,6 @@ "protected-files": "Защищено файлов", "storage": "Хранилище", "Status": "Статус", - "under-moderation": "На модерации", "full-link": "Полная ссылка", "follow-the-link": "Перейти", "date-of-discovery": "Дата обнаружения", @@ -570,5 +569,14 @@ "notification-file-moderation": "Модерация файла", "notification-file-added": "Файл добавлен в систему", "notification-search-operation-filed": "Ошибка операции поиска" + }, + "User-status": { + "under-moderation": "На модерации", + "NOT_VERIFIED": "Не верифицирован", + "VERIFIED": "Верифицирован", + "VERIFICATION_FAILED": "Верификация не удалась", + "unknow": "Неизвестно", + "user-verification": "Верификация юзера", + "Status": "Статус" } } \ No newline at end of file