diff options
-rw-r--r-- | recipes/nextcloud-calendar/package.json | 2 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/service.css | 9 | ||||
-rw-r--r-- | recipes/nextcloud-calendar/webview.js | 13 |
3 files changed, 15 insertions, 9 deletions
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 @@ | |||
1 | { | 1 | { |
2 | "id": "nextcloud-calendar", | 2 | "id": "nextcloud-calendar", |
3 | "name": "Nextcloud Calendar", | 3 | "name": "Nextcloud Calendar", |
4 | "version": "1.0.0", | 4 | "version": "1.0.1", |
5 | "description": "Ferdi recipe for Nextcloud Calendar.", | 5 | "description": "Ferdi recipe for Nextcloud Calendar.", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Edgars Andersons <Edgars+github@gaitenis.id.lv>", | 7 | "author": "Edgars Andersons <Edgars+github@gaitenis.id.lv>", |
diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css index 833d5a8..a0016ae 100644 --- a/recipes/nextcloud-calendar/service.css +++ b/recipes/nextcloud-calendar/service.css | |||
@@ -10,3 +10,12 @@ settings links and disable them */ | |||
10 | 10 | ||
11 | /* Hide "More" link in the top menu */ | 11 | /* Hide "More" link in the top menu */ |
12 | #more-apps {display: none !important;} | 12 | #more-apps {display: none !important;} |
13 | |||
14 | /* Hide notifications that are not related to calendar */ | ||
15 | .notifications .notification-wrapper .notification:not([object_type="dav"]) { | ||
16 | display: none; | ||
17 | } | ||
18 | |||
19 | /* Hide "Dismiss all notifications" as this action will dismiss also hidden | ||
20 | notifications */ | ||
21 | .notification-wrapper .dismiss-all {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) { | |||
6 | return obj && obj.__esModule ? obj : {default: obj}; | 6 | return obj && obj.__esModule ? obj : {default: obj}; |
7 | } | 7 | } |
8 | 8 | ||
9 | module.exports = Franz => { | 9 | module.exports = Ferdi => { |
10 | const getMessages = function getMessages() { | 10 | const getMessages = function getMessages() { |
11 | const direct = document.querySelectorAll( | 11 | const direct = document.querySelectorAll( |
12 | '.app-navigation-entry-utils-counter.highlighted' | 12 | '.notifications .notification-wrapper .notification[object_type="dav"]' |
13 | ).length; | ||
14 | const indirect = document.querySelectorAll( | ||
15 | '.app-navigation-entry-utils-counter:not(.highlighted)' | ||
16 | ).length; | 13 | ).length; |
17 | 14 | ||
18 | Franz.setBadge(direct, indirect); | 15 | Ferdi.setBadge(direct); |
19 | }; | 16 | }; |
20 | 17 | ||
21 | Franz.loop(getMessages); | 18 | Ferdi.loop(getMessages); |
22 | Franz.injectCSS(_path.default.join(__dirname, 'service.css')); | 19 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
23 | }; | 20 | }; |