From c05dcf45f2c9cd5fcbff39daa76f1b94b002952f Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Wed, 21 May 2025 13:03:25 +0200 Subject: [PATCH] feat: Enhance notifications popup appearance --- client/src/api/notifications.js | 3 +++ .../activities/Activities/Item.module.scss | 2 -- .../notifications/NotificationsStep/Item.jsx | 14 ++++++++++---- .../NotificationsStep/Item.module.scss | 13 ++++++++++++- client/src/locales/ar-YE/core.js | 5 +++-- client/src/locales/bg-BG/core.js | 5 +++-- client/src/locales/cs-CZ/core.js | 11 +++++++---- client/src/locales/da-DK/core.js | 5 +++-- client/src/locales/de-DE/core.js | 4 ++-- client/src/locales/en-GB/core.js | 8 +++++--- client/src/locales/en-US/core.js | 8 +++++--- client/src/locales/es-ES/core.js | 5 +++-- client/src/locales/fa-IR/core.js | 5 +++-- client/src/locales/fr-FR/core.js | 8 ++++---- client/src/locales/hu-HU/core.js | 4 ++-- client/src/locales/id-ID/core.js | 4 ++-- client/src/locales/it-IT/core.js | 4 ++-- client/src/locales/ja-JP/core.js | 6 +++--- client/src/locales/ko-KR/core.js | 5 +++-- client/src/locales/nl-NL/core.js | 4 ++-- client/src/locales/pl-PL/core.js | 5 +++-- client/src/locales/pt-BR/core.js | 5 +++-- client/src/locales/ro-RO/core.js | 4 ++-- client/src/locales/ru-RU/core.js | 5 +++-- client/src/locales/sk-SK/core.js | 6 ++++-- client/src/locales/sr-Cyrl-CS/core.js | 5 +++-- client/src/locales/sr-Latn-CS/core.js | 5 +++-- client/src/locales/sv-SE/core.js | 5 +++-- client/src/locales/tr-TR/core.js | 4 ++-- client/src/locales/uk-UA/core.js | 4 ++-- client/src/locales/uz-UZ/core.js | 5 +++-- client/src/locales/zh-CN/core.js | 4 ++-- client/src/locales/zh-TW/core.js | 4 ++-- 33 files changed, 112 insertions(+), 72 deletions(-) diff --git a/client/src/api/notifications.js b/client/src/api/notifications.js index b0456229..6d36332a 100755 --- a/client/src/api/notifications.js +++ b/client/src/api/notifications.js @@ -16,6 +16,9 @@ export const transformNotification = (notification) => ({ activityId: notification.actionId, } : notification), + ...(notification.createdAt && { + createdAt: new Date(notification.createdAt), + }), }); /* Actions */ diff --git a/client/src/components/activities/Activities/Item.module.scss b/client/src/components/activities/Activities/Item.module.scss index 37c92a31..7245597b 100644 --- a/client/src/components/activities/Activities/Item.module.scss +++ b/client/src/components/activities/Activities/Item.module.scss @@ -6,7 +6,6 @@ :global(#app) { .author { color: #17394d; - display: inline-block; font-weight: bold; line-height: 20px; } @@ -21,7 +20,6 @@ .date { color: #6b808c; - display: inline-block; font-size: 12px; line-height: 20px; } diff --git a/client/src/components/notifications/NotificationsStep/Item.jsx b/client/src/components/notifications/NotificationsStep/Item.jsx index 69c65b5b..ac424ab2 100644 --- a/client/src/components/notifications/NotificationsStep/Item.jsx +++ b/client/src/components/notifications/NotificationsStep/Item.jsx @@ -16,6 +16,7 @@ import entryActions from '../../../entry-actions'; import Paths from '../../../constants/Paths'; import { StaticUserIds } from '../../../constants/StaticUsers'; import { NotificationTypes } from '../../../constants/Enums'; +import TimeAgo from '../../common/TimeAgo'; import UserAvatar from '../../users/UserAvatar'; import styles from './Item.module.scss'; @@ -67,7 +68,7 @@ const Item = React.memo(({ id, onClose }) => { toList: toListName, }} > - {creatorUserName} + {creatorUserName} {' moved '} {cardName} @@ -93,7 +94,7 @@ const Item = React.memo(({ id, onClose }) => { card: cardName, }} > - {creatorUserName} + {creatorUserName} {` left a new comment «${commentText}» to `} {cardName} @@ -112,7 +113,7 @@ const Item = React.memo(({ id, onClose }) => { card: cardName, }} > - {creatorUserName} + {creatorUserName} {` added you to `} {cardName} @@ -128,7 +129,12 @@ const Item = React.memo(({ id, onClose }) => { return (
- {contentNode} + +
{contentNode}
+ + + +