diff --git a/docs/releases.md b/docs/releases.md index a1e1c0e..b133762 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -35,6 +35,7 @@ to [@Joeharrison94](https://github.com/Joeharrison94) for the input. * Better parsing of the user actions, allowing quotes (no ticket) * Make web app more accessible ([#217](https://github.com/binwiederhier/ntfy/issues/217)) +* Add "mark as read" icon button to notification ([#243](https://github.com/binwiederhier/ntfy/pull/243), thanks to [@wunter8](https://github.com/wunter8)) **Bugs:** diff --git a/web/public/static/langs/en.json b/web/public/static/langs/en.json index 0f7c975..63e9a3a 100644 --- a/web/public/static/langs/en.json +++ b/web/public/static/langs/en.json @@ -27,7 +27,7 @@ "notifications_list": "Notifications list", "notifications_list_item": "Notification", "notifications_mark_read": "Mark as read", - "notifications_delete": "Delete notification", + "notifications_delete": "Delete", "notifications_copied_to_clipboard": "Copied to clipboard", "notifications_tags": "Tags", "notifications_priority_x": "Priority {{priority}}", diff --git a/web/src/app/SubscriptionManager.js b/web/src/app/SubscriptionManager.js index 6384aa8..01418ee 100644 --- a/web/src/app/SubscriptionManager.js +++ b/web/src/app/SubscriptionManager.js @@ -117,7 +117,7 @@ class SubscriptionManager { async markNotificationRead(notificationId) { await db.notifications - .where({id: notificationId, new: 1}) + .where({id: notificationId}) .modify({new: 0}); } diff --git a/web/src/app/db.js b/web/src/app/db.js index 7c98309..7c82be3 100644 --- a/web/src/app/db.js +++ b/web/src/app/db.js @@ -8,9 +8,9 @@ import Dexie from 'dexie'; const db = new Dexie('ntfy'); -db.version(2).stores({ +db.version(1).stores({ subscriptions: '&id,baseUrl', - notifications: '&id,subscriptionId,time,new,[subscriptionId+new],[id+new]', // compound keys for query performance + notifications: '&id,subscriptionId,time,new,[subscriptionId+new]', // compound key for query performance users: '&baseUrl,username', prefs: '&key' }); diff --git a/web/src/components/Notifications.js b/web/src/components/Notifications.js index 4d9043e..87756b9 100644 --- a/web/src/components/Notifications.js +++ b/web/src/components/Notifications.js @@ -99,7 +99,7 @@ const NotificationList = (props) => { > { return ( - - - + + + + + {notification.new === 1 && - - + + }