From b72d5c7357e8b203971314f3e3f65b38c1cd4a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 19 Aug 2024 23:36:10 +0200 Subject: [PATCH] Notification timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- package.json | 2 +- .../notifications/components/notification.tsx | 14 ++++++++++++++ yarn.lock | 8 ++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5bda1cbe2..b4fcb1219 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "multiselect-react-dropdown": "^2.0.25", "object-to-formdata": "^4.5.1", "path-browserify": "^1.0.1", - "pl-api": "^0.0.9", + "pl-api": "^0.0.11", "postcss": "^8.4.29", "process": "^0.11.10", "punycode": "^2.1.1", diff --git a/src/features/notifications/components/notification.tsx b/src/features/notifications/components/notification.tsx index 5bcd6157d..0ce8d2f08 100644 --- a/src/features/notifications/components/notification.tsx +++ b/src/features/notifications/components/notification.tsx @@ -8,6 +8,7 @@ import { openModal } from 'soapbox/actions/modals'; import { getSettings } from 'soapbox/actions/settings'; import { toggleStatusHidden } from 'soapbox/actions/statuses'; import Icon from 'soapbox/components/icon'; +import RelativeTimestamp from 'soapbox/components/relative-timestamp'; import { HStack, Text, Emoji } from 'soapbox/components/ui'; import AccountContainer from 'soapbox/containers/account-container'; import StatusContainer from 'soapbox/containers/status-container'; @@ -405,6 +406,19 @@ const Notification: React.FC = (props) => { {message} + + {!['mention', 'status'].includes(notification.type) && ( +
+ + + +
+ )} diff --git a/yarn.lock b/yarn.lock index f7a91c3c6..584ee2c3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8390,10 +8390,10 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" -pl-api@^0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-0.0.9.tgz#8e5c1d205e44f6e7fa332b14cafe49c67c00175e" - integrity sha512-oJwYdkdpvuXwVPWYBWcbWbwIg2zm+vNBxeni5usfH2RI4Co+WiCkuCnhM7pxyB0YnqvgCtAnFJY4O9YUT47xRg== +pl-api@^0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-0.0.11.tgz#3adbfac0c1ba16e2696e00f0ef1f792880e6d0a5" + integrity sha512-tFFETaG4lFkLNXH1hj4JZ4qTiF3Zxy0K/3gV/KHhGwn9V/IuNTVw1y5cZWajGiGKU+hOnj31oX4ZZwwEggHh9Q== dependencies: blurhash "^2.0.5" http-link-header "^1.1.3"