diff --git a/package.json b/package.json index aa74812..0dfd464 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "no-copy-frontend", - "version": "0.98.0", + "version": "0.99.0", "private": true, "scripts": { "dev": "next dev -p 2999", diff --git a/src/app/styles/pages-styles.scss b/src/app/styles/pages-styles.scss index 8a04255..d712274 100644 --- a/src/app/styles/pages-styles.scss +++ b/src/app/styles/pages-styles.scss @@ -906,6 +906,10 @@ width: 40px; height: 40px; position: relative; + border-radius: 6px; + overflow: hidden; + background: #f5f5f5; + box-shadow: 1px 1px 2px #00000030; img { object-fit: contain; diff --git a/src/app/ui/notifications/notifications-list.tsx b/src/app/ui/notifications/notifications-list.tsx index 5a0e5e5..6ff756a 100644 --- a/src/app/ui/notifications/notifications-list.tsx +++ b/src/app/ui/notifications/notifications-list.tsx @@ -47,44 +47,62 @@ export function NotificationsList() { header: ({ table }) => { const currentPageRows = table.getCoreRowModel().rows; const unreadRowsOnPage = currentPageRows.filter(row => row.original.status !== 'READIED'); - const allUnreadSelectedOnPage = unreadRowsOnPage.every(row => rowSelection[row.original.id]); + const allNotificationSelectedOnPage = currentPageRows.every(row => rowSelection[row.original.id]); + + const unreadIdsSet = new Set(unreadRowsOnPage.map(row => row.original.id)); + const selectedUnreadIds = Object.keys(rowSelection) + .map(Number) + .filter(id => unreadIdsSet.has(id)); return (
+ {selectedUnreadIds.length > 0 && ( + + )} + {Object.keys(rowSelection).length > 0 && ( + <> + + + )} + - - {Object.keys(rowSelection).length > 0 && ( - - )}
); }, @@ -94,20 +112,23 @@ export function NotificationsList() { return (
- {!isReadied ? ( - - ) : ( -
- )} +
); }, @@ -182,11 +203,9 @@ export function NotificationsList() { } if (response?.success) { + setRowSelection({}); await queryClient.invalidateQueries({ queryKey: ['activeNotifications'] }); await queryClient.invalidateQueries({ queryKey: ['allNotifications'] }); - - // Clear selection after successful action - setRowSelection({}); } } catch (error) { const errorMessage = action === 'mark-as-read' ? 'Failed to mark as read' : 'Failed to remove'; @@ -313,13 +332,19 @@ export function NotificationsList() {