From f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Nov 2023 15:57:55 +0900 Subject: feat: notification grouping Resolve #12211 --- .../frontend/src/components/MkNotification.vue | 82 ++++++++++++++++++++-- 1 file changed, 78 insertions(+), 4 deletions(-) (limited to 'packages/frontend/src/components/MkNotification.vue') diff --git a/packages/frontend/src/components/MkNotification.vue b/packages/frontend/src/components/MkNotification.vue index c507236216..ff20bc591f 100644 --- a/packages/frontend/src/components/MkNotification.vue +++ b/packages/frontend/src/components/MkNotification.vue @@ -9,9 +9,11 @@ SPDX-License-Identifier: AGPL-3.0-only +
+
- +
@@ -52,16 +53,18 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts._notification.achievementEarned }} {{ i18n.ts._notification.testNotification }} + {{ i18n.t('_notification.reactedBySomeUsers', { n: notification.reactions.length }) }} + {{ i18n.t('_notification.renotedBySomeUsers', { n: notification.users.length }) }} {{ notification.header }}
- + - + @@ -102,6 +105,24 @@ SPDX-License-Identifier: AGPL-3.0-only + +
+
+ +
+ +
+
+
+
+
+ +
+
@@ -181,6 +202,29 @@ useTooltip(reactionRef, (showing) => { display: block; width: 100%; height: 100%; +} + +.icon_reactionGroup, +.icon_renoteGroup { + display: grid; + align-items: center; + justify-items: center; + width: 80%; + height: 80%; + font-size: 15px; + border-radius: 100%; + color: #fff; +} + +.icon_reactionGroup { + background: #e99a0b; +} + +.icon_renoteGroup { + background: #36d298; +} + +.icon_app { border-radius: 6px; } @@ -305,6 +349,36 @@ useTooltip(reactionRef, (showing) => { flex: 1; } +.reactionsItem { + display: inline-block; + position: relative; + width: 38px; + height: 38px; + margin-top: 8px; + margin-right: 8px; +} + +.reactionsItemAvatar { + width: 100%; + height: 100%; +} + +.reactionsItemReaction { + position: absolute; + z-index: 1; + bottom: -2px; + right: -2px; + width: 20px; + height: 20px; + box-sizing: border-box; + border-radius: 100%; + background: var(--panel); + box-shadow: 0 0 0 3px var(--panel); + font-size: 11px; + text-align: center; + color: #fff; +} + @container (max-width: 600px) { .root { padding: 16px; -- cgit v1.2.3-freya