diff options
author | Edgars <Edgars+GitHub@gaitenis.id.lv> | 2020-11-10 10:32:33 +0200 |
---|---|---|
committer | Edgars <Edgars+GitHub@gaitenis.id.lv> | 2020-11-10 10:32:33 +0200 |
commit | a62cb87a75dbe5065ef14f26463bb7b69bfc4972 (patch) | |
tree | 8665044acfab4b5b9756c8aa54d2c0503b9052d8 /recipes | |
parent | Merge pull request #351 from tpapamichail/master (diff) | |
download | ferdium-recipes-a62cb87a75dbe5065ef14f26463bb7b69bfc4972.tar.gz ferdium-recipes-a62cb87a75dbe5065ef14f26463bb7b69bfc4972.tar.zst ferdium-recipes-a62cb87a75dbe5065ef14f26463bb7b69bfc4972.zip |
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.
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/nextcloud-calendar/service.css | 5 | ||||
-rw-r--r-- | 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 */ | |||
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 | } | ||
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 | }; |