diff options
Diffstat (limited to 'recipes/nextcloud-news')
-rw-r--r-- | recipes/nextcloud-news/package.json | 4 | ||||
-rw-r--r-- | recipes/nextcloud-news/service.css | 27 | ||||
-rw-r--r-- | recipes/nextcloud-news/webview.js | 4 |
3 files changed, 28 insertions, 7 deletions
diff --git a/recipes/nextcloud-news/package.json b/recipes/nextcloud-news/package.json index 8ea85de..83db65b 100644 --- a/recipes/nextcloud-news/package.json +++ b/recipes/nextcloud-news/package.json | |||
@@ -1,9 +1,9 @@ | |||
1 | { | 1 | { |
2 | "id": "nextcloud-news", | 2 | "id": "nextcloud-news", |
3 | "name": "Nextcloud News", | 3 | "name": "Nextcloud News", |
4 | "version": "1.2.0", | 4 | "version": "1.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/csolisr/recipes/tree/master/recipes/nextcloud-news/", | 6 | "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-news/", |
7 | "config": { | 7 | "config": { |
8 | "hasNotificationSound": true, | 8 | "hasNotificationSound": true, |
9 | "hasTeamId": true, | 9 | "hasTeamId": true, |
diff --git a/recipes/nextcloud-news/service.css b/recipes/nextcloud-news/service.css index ea90cc9..1a87a84 100644 --- a/recipes/nextcloud-news/service.css +++ b/recipes/nextcloud-news/service.css | |||
@@ -5,16 +5,37 @@ News */ | |||
5 | display: none; | 5 | display: none; |
6 | } | 6 | } |
7 | 7 | ||
8 | /* Change the cursor to the default for Nextcloud home, News and settings | 8 | /* Change the cursor to the default for Nextcloud home and News |
9 | links in the top menu and disable them */ | 9 | links in the top menu and disable them */ |
10 | #nextcloud, | 10 | #nextcloud, |
11 | #appmenu li[data-id='news'] a, | 11 | #appmenu li[data-id='news'] a { |
12 | #settings { | ||
13 | cursor: default; | 12 | cursor: default; |
14 | pointer-events: none; | 13 | pointer-events: none; |
15 | } | 14 | } |
16 | 15 | ||
16 | /* Hide all settings options, except the option to log out */ | ||
17 | #settings #expanddiv li:not([data-id='logout']) { | ||
18 | display: none; | ||
19 | } | ||
20 | |||
21 | /* Fix the margin of the dropdown */ | ||
22 | #settings #expanddiv, | ||
23 | #settings #expanddiv > ul { | ||
24 | min-height: 0; | ||
25 | } | ||
26 | |||
17 | /* Hide "More" link in the top menu */ | 27 | /* Hide "More" link in the top menu */ |
18 | #more-apps { | 28 | #more-apps { |
19 | display: none !important; | 29 | display: none !important; |
20 | } | 30 | } |
31 | |||
32 | /* Hide notifications that are not related to News */ | ||
33 | .notifications .notification-wrapper .notification:not([object_type="news"]) { | ||
34 | display: none; | ||
35 | } | ||
36 | |||
37 | /* Hide "Dismiss all notifications" as this action will dismiss also hidden | ||
38 | notifications */ | ||
39 | .notification-wrapper .dismiss-all { | ||
40 | display: none; | ||
41 | } | ||
diff --git a/recipes/nextcloud-news/webview.js b/recipes/nextcloud-news/webview.js index c5e295e..33bf0c5 100644 --- a/recipes/nextcloud-news/webview.js +++ b/recipes/nextcloud-news/webview.js | |||
@@ -6,10 +6,10 @@ function _interopRequireDefault(obj) { | |||
6 | 6 | ||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | const selector = document.querySelector( | 9 | const directSelector = document.querySelector( |
10 | '.subscriptions-feed .app-navigation-entry-utils-counter', | 10 | '.subscriptions-feed .app-navigation-entry-utils-counter', |
11 | ); | 11 | ); |
12 | const direct = selector ? Ferdium.safeParseInt(selector.textContent) : 0; | 12 | const direct = directSelector ? Ferdium.safeParseInt(directSelector.textContent) : 0; |
13 | 13 | ||
14 | Ferdium.setBadge(direct); | 14 | Ferdium.setBadge(direct); |
15 | }; | 15 | }; |