From a62cb87a75dbe5065ef14f26463bb7b69bfc4972 Mon Sep 17 00:00:00 2001 From: Edgars Date: Tue, 10 Nov 2020 10:32:33 +0200 Subject: Nextcloud Calendar: Display only calendar related notifications and their count `service.css` was updated to hide notifications that are not related to Nextcloud Calendar. `webview.js` was updated to fix notifications count selector. --- recipes/nextcloud-calendar/service.css | 5 +++++ recipes/nextcloud-calendar/webview.js | 13 +++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css index 833d5a8..634a959 100644 --- a/recipes/nextcloud-calendar/service.css +++ b/recipes/nextcloud-calendar/service.css @@ -10,3 +10,8 @@ settings links and disable them */ /* Hide "More" link in the top menu */ #more-apps {display: none !important;} + +/* Hide notifications that are not related to calendar */ +.notifications .notification-wrapper .notification:not([object_type="dav"]) { + display: none; +} diff --git a/recipes/nextcloud-calendar/webview.js b/recipes/nextcloud-calendar/webview.js index 53496fe..e36a9d4 100644 --- a/recipes/nextcloud-calendar/webview.js +++ b/recipes/nextcloud-calendar/webview.js @@ -6,18 +6,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {default: obj}; } -module.exports = Franz => { +module.exports = Ferdi => { const getMessages = function getMessages() { const direct = document.querySelectorAll( - '.app-navigation-entry-utils-counter.highlighted' - ).length; - const indirect = document.querySelectorAll( - '.app-navigation-entry-utils-counter:not(.highlighted)' + '.notifications .notification-wrapper .notification[object_type="dav"]' ).length; - Franz.setBadge(direct, indirect); + Ferdi.setBadge(direct); }; - Franz.loop(getMessages); - Franz.injectCSS(_path.default.join(__dirname, 'service.css')); + Ferdi.loop(getMessages); + Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); }; -- cgit v1.2.3-70-g09d2 From ca3c47b037047a74e94443a2f728fc2848168816 Mon Sep 17 00:00:00 2001 From: Edgars Date: Tue, 10 Nov 2020 10:53:26 +0200 Subject: Hide "Dismiss all notifications" in notifications block Hide "Dismiss all notifications" in notifications block as this action would dismiss hidden notifications as well. --- recipes/nextcloud-calendar/service.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css index 634a959..a0016ae 100644 --- a/recipes/nextcloud-calendar/service.css +++ b/recipes/nextcloud-calendar/service.css @@ -15,3 +15,7 @@ settings links and disable them */ .notifications .notification-wrapper .notification:not([object_type="dav"]) { display: none; } + +/* Hide "Dismiss all notifications" as this action will dismiss also hidden +notifications */ +.notification-wrapper .dismiss-all {display: none;} -- cgit v1.2.3-70-g09d2 From ba71133a2a54c749d2fcc19aa07cbb96d1877504 Mon Sep 17 00:00:00 2001 From: Edgars Date: Wed, 11 Nov 2020 09:54:08 +0200 Subject: Nextcloud Calendar: `package.json` was updated to increase version --- recipes/nextcloud-calendar/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/nextcloud-calendar/package.json b/recipes/nextcloud-calendar/package.json index ee23655..7b44cb1 100644 --- a/recipes/nextcloud-calendar/package.json +++ b/recipes/nextcloud-calendar/package.json @@ -1,7 +1,7 @@ { "id": "nextcloud-calendar", "name": "Nextcloud Calendar", - "version": "1.0.0", + "version": "1.0.1", "description": "Ferdi recipe for Nextcloud Calendar.", "main": "index.js", "author": "Edgars Andersons ", -- cgit v1.2.3-70-g09d2