aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Carlos SolĂ­s <csolisr@gmail.com>2022-06-21 09:39:54 -0600
committerLibravatar GitHub <noreply@github.com>2022-06-21 15:39:54 +0000
commit08a7af9ef2bb0030fd1876674d53b719e91f13e2 (patch)
treeda71d5f5d17e90faaf0af07fd0e97936b8820aff
parentdocs: add dqos as a contributor for code (#72) [skip ci] (diff)
downloadferdium-recipes-08a7af9ef2bb0030fd1876674d53b719e91f13e2.tar.gz
ferdium-recipes-08a7af9ef2bb0030fd1876674d53b719e91f13e2.tar.zst
ferdium-recipes-08a7af9ef2bb0030fd1876674d53b719e91f13e2.zip
Add fixes for Nextcloud-related webapps (#66)
-rw-r--r--recipes/nextcloud-calendar/index.js6
-rw-r--r--recipes/nextcloud-calendar/package.json11
-rw-r--r--recipes/nextcloud-calendar/service.css34
-rw-r--r--recipes/nextcloud-calendar/webview.js9
-rw-r--r--recipes/nextcloud-carnet/index.js6
-rw-r--r--recipes/nextcloud-carnet/package.json10
-rw-r--r--recipes/nextcloud-carnet/service.css44
-rw-r--r--recipes/nextcloud-carnet/webview.js11
-rw-r--r--recipes/nextcloud-cospend/index.js6
-rw-r--r--recipes/nextcloud-cospend/package.json10
-rw-r--r--recipes/nextcloud-cospend/service.css39
-rw-r--r--recipes/nextcloud-cospend/webview.js11
-rw-r--r--recipes/nextcloud-news/package.json4
-rw-r--r--recipes/nextcloud-news/service.css27
-rw-r--r--recipes/nextcloud-news/webview.js4
-rw-r--r--recipes/nextcloud-talk/index.js6
-rw-r--r--recipes/nextcloud-talk/package.json9
-rw-r--r--recipes/nextcloud-talk/service.css28
-rw-r--r--recipes/nextcloud-talk/webview.js11
-rw-r--r--recipes/nextcloud-tasks/index.js6
-rw-r--r--recipes/nextcloud-tasks/package.json10
-rw-r--r--recipes/nextcloud-tasks/service.css40
-rw-r--r--recipes/nextcloud-tasks/webview.js15
23 files changed, 255 insertions, 102 deletions
diff --git a/recipes/nextcloud-calendar/index.js b/recipes/nextcloud-calendar/index.js
index 8d77048..dd41f72 100644
--- a/recipes/nextcloud-calendar/index.js
+++ b/recipes/nextcloud-calendar/index.js
@@ -1,5 +1 @@
1module.exports = Ferdium => class NextcloudCarnet extends Ferdium { module.exports = Ferdium => Ferdium;
2 buildUrl(url) {
3 return `${url}/apps/calendar/`;
4 }
5};
diff --git a/recipes/nextcloud-calendar/package.json b/recipes/nextcloud-calendar/package.json
index fa8b3d9..027ea9b 100644
--- a/recipes/nextcloud-calendar/package.json
+++ b/recipes/nextcloud-calendar/package.json
@@ -1,13 +1,14 @@
1{ 1{
2 "id": "nextcloud-calendar", 2 "id": "nextcloud-calendar",
3 "name": "Nextcloud Calendar", 3 "name": "Nextcloud Calendar",
4 "version": "1.2.0", 4 "version": "1.2.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-calendar", 6 "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-calendar/",
7 "config": { 7 "config": {
8 "hasNotificationSound": true, 8 "hasNotificationSound": true,
9 "hasIndirectMessages": true, 9 "hasTeamId": true,
10 "hasCustomUrl": true, 10 "urlInputPrefix": "https://",
11 "serviceURL": "https://{nextcloud}/apps/calendar/" 11 "urlInputSuffix": "/apps/calendar/",
12 "serviceURL": "https://{teamId}/apps/calendar/"
12 } 13 }
13} 14}
diff --git a/recipes/nextcloud-calendar/service.css b/recipes/nextcloud-calendar/service.css
index a0016ae..6e04c63 100644
--- a/recipes/nextcloud-calendar/service.css
+++ b/recipes/nextcloud-calendar/service.css
@@ -1,15 +1,33 @@
1/* Hide all app links and contacts menu link in the top menu except for 1/* Hide all app links and contacts menu link in the top menu except for
2Calendar */ 2Calendar */
3#appmenu li:not([data-id="calendar"]), #contactsmenu {display: none;} 3#appmenu li:not([data-id="calendar"]),
4#contactsmenu {
5 display: none;
6}
7
8/* Change the cursor to default for top menu Nextcloud home and Calendar
9links and disable them */
10#nextcloud,
11#appmenu li[data-id="calendar"] a {
12 cursor:default;
13 pointer-events: none;
14}
4 15
5/* Change the cursor to default for top menu Nextcloud home, Calendar and 16/* Hide all settings options, except the option to log out */
6settings links and disable them */ 17#settings #expanddiv li:not([data-id='logout']) {
7#nextcloud, #appmenu li[data-id="calendar"] a, #settings { 18 display: none;
8 cursor:default; pointer-events: none; 19}
20
21/* Fix the margin of the dropdown */
22#settings #expanddiv,
23#settings #expanddiv > ul {
24 min-height: 0;
9} 25}
10 26
11/* Hide "More" link in the top menu */ 27/* Hide "More" link in the top menu */
12#more-apps {display: none !important;} 28#more-apps {
29 display: none !important;
30}
13 31
14/* Hide notifications that are not related to calendar */ 32/* Hide notifications that are not related to calendar */
15.notifications .notification-wrapper .notification:not([object_type="dav"]) { 33.notifications .notification-wrapper .notification:not([object_type="dav"]) {
@@ -18,4 +36,6 @@ settings links and disable them */
18 36
19/* Hide "Dismiss all notifications" as this action will dismiss also hidden 37/* Hide "Dismiss all notifications" as this action will dismiss also hidden
20notifications */ 38notifications */
21.notification-wrapper .dismiss-all {display: none;} 39.notification-wrapper .dismiss-all {
40 display: none;
41}
diff --git a/recipes/nextcloud-calendar/webview.js b/recipes/nextcloud-calendar/webview.js
index 84c55f2..49ed705 100644
--- a/recipes/nextcloud-calendar/webview.js
+++ b/recipes/nextcloud-calendar/webview.js
@@ -1,12 +1,15 @@
1const _path = _interopRequireDefault(require('path')); 1const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
4 6
5module.exports = Ferdium => { 7module.exports = Ferdium => {
6 const getMessages = () => { 8 const getMessages = () => {
7 const direct = document.querySelectorAll( 9 const directSelector = document.querySelectorAll(
8 '.notifications .notification-wrapper .notification[object_type="dav"]', 10 '.notifications .notification-wrapper .notification[object_type="dav"]',
9 ).length; 11 );
12 const direct = directSelector ? Ferdium.safeParseInt(selector.length) : 0;
10 13
11 Ferdium.setBadge(direct); 14 Ferdium.setBadge(direct);
12 }; 15 };
diff --git a/recipes/nextcloud-carnet/index.js b/recipes/nextcloud-carnet/index.js
index f684bbd..dd41f72 100644
--- a/recipes/nextcloud-carnet/index.js
+++ b/recipes/nextcloud-carnet/index.js
@@ -1,5 +1 @@
1module.exports = Ferdium => class NextcloudCarnet extends Ferdium { module.exports = Ferdium => Ferdium;
2 buildUrl(url) {
3 return `${url}/apps/carnet/`;
4 }
5};
diff --git a/recipes/nextcloud-carnet/package.json b/recipes/nextcloud-carnet/package.json
index 82c1eb7..67c7515 100644
--- a/recipes/nextcloud-carnet/package.json
+++ b/recipes/nextcloud-carnet/package.json
@@ -1,13 +1,15 @@
1{ 1{
2 "id": "nextcloud-carnet", 2 "id": "nextcloud-carnet",
3 "name": "Carnet (Nextcloud)", 3 "name": "Carnet (Nextcloud)",
4 "version": "1.2.0", 4 "version": "1.2.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-carnet", 6 "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-carnet/",
7 "config": { 7 "config": {
8 "hasNotificationSound": true, 8 "hasNotificationSound": true,
9 "hasIndirectMessages": true, 9 "hasIndirectMessages": true,
10 "hasCustomUrl": true, 10 "hasTeamId": true,
11 "serviceURL": "https://{nextcloud}/apps/carnet/" 11 "urlInputPrefix": "https://",
12 "urlInputSuffix": "/apps/carnet/",
13 "serviceURL": "https://{teamId}/apps/carnet/"
12 } 14 }
13} 15}
diff --git a/recipes/nextcloud-carnet/service.css b/recipes/nextcloud-carnet/service.css
index 8e767c2..9b2948e 100644
--- a/recipes/nextcloud-carnet/service.css
+++ b/recipes/nextcloud-carnet/service.css
@@ -1,11 +1,41 @@
1/* Hide all app links and contacts link in the top menu except for Carnet */ 1/* Hide all app links and contacts menu link in the top menu except for
2#appmenu li:not([data-id="carnet"]), #contactsmenu {display: none;} 2Carnet */
3#appmenu li:not([data-id='carnet']),
4#contactsmenu {
5 display: none;
6}
7
8/* Change the cursor to the default for Nextcloud home and Carnet
9links in the top menu and disable them */
10#nextcloud,
11#appmenu li[data-id='carnet'] a {
12 cursor: default;
13 pointer-events: none;
14}
15
16/* Hide all settings options, except the option to log out */
17#settings #expanddiv li:not([data-id='logout']) {
18 display: none;
19}
3 20
4/* Change cursor to the default pointer for Nextcloud home, Carnet and settings 21/* Fix the margin of the dropdown */
5link and disable them in the top menu */ 22#settings #expanddiv,
6#nextcloud, #appmenu li[data-id="carnet"] a, #settings { 23#settings #expanddiv > ul {
7 cursor:default; pointer-events: none; 24 min-height: 0;
8} 25}
9 26
10/* Hide "More" link in the top menu */ 27/* Hide "More" link in the top menu */
11#more-apps {display: none !important;} 28#more-apps {
29 display: none !important;
30}
31
32/* Hide notifications that are not related to Carnet */
33.notifications .notification-wrapper .notification:not([object_type="carnet"]) {
34 display: none;
35}
36
37/* Hide "Dismiss all notifications" as this action will dismiss also hidden
38notifications */
39.notification-wrapper .dismiss-all {
40 display: none;
41}
diff --git a/recipes/nextcloud-carnet/webview.js b/recipes/nextcloud-carnet/webview.js
index e9e6433..b3836a7 100644
--- a/recipes/nextcloud-carnet/webview.js
+++ b/recipes/nextcloud-carnet/webview.js
@@ -4,12 +4,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
4 4
5module.exports = Ferdium => { 5module.exports = Ferdium => {
6 const getMessages = () => { 6 const getMessages = () => {
7 const direct = document.querySelectorAll( 7 const directSelector = document.querySelectorAll(
8 '.app-navigation-entry-utils-counter.highlighted', 8 '.app-navigation-entry-utils-counter.highlighted',
9 ).length; 9 );
10 const indirect = document.querySelectorAll( 10 const direct = directSelector ? Ferdium.safeParseInt(directSelector.length) : 0;
11
12 const indirectSelector = document.querySelectorAll(
11 '.app-navigation-entry-utils-counter:not(.highlighted)', 13 '.app-navigation-entry-utils-counter:not(.highlighted)',
12 ).length; 14 );
15 const indirect = indirectSelector ? Ferdium.safeParseInt(indirectSelector.length) : 0;
13 16
14 Ferdium.setBadge(direct, indirect); 17 Ferdium.setBadge(direct, indirect);
15 }; 18 };
diff --git a/recipes/nextcloud-cospend/index.js b/recipes/nextcloud-cospend/index.js
index 4ba7df9..dd41f72 100644
--- a/recipes/nextcloud-cospend/index.js
+++ b/recipes/nextcloud-cospend/index.js
@@ -1,5 +1 @@
1module.exports = Ferdium => class NextcloudCarnet extends Ferdium { module.exports = Ferdium => Ferdium;
2 buildUrl(url) {
3 return `${url}/apps/cospend/`;
4 }
5};
diff --git a/recipes/nextcloud-cospend/package.json b/recipes/nextcloud-cospend/package.json
index bddfcfd..7367589 100644
--- a/recipes/nextcloud-cospend/package.json
+++ b/recipes/nextcloud-cospend/package.json
@@ -1,13 +1,15 @@
1{ 1{
2 "id": "nextcloud-cospend", 2 "id": "nextcloud-cospend",
3 "name": "Nextcloud Cospend", 3 "name": "Nextcloud Cospend",
4 "version": "1.2.0", 4 "version": "1.2.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-cospend", 6 "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-cospend/",
7 "config": { 7 "config": {
8 "hasNotificationSound": true, 8 "hasNotificationSound": true,
9 "hasIndirectMessages": true, 9 "hasIndirectMessages": true,
10 "hasCustomUrl": true, 10 "hasTeamId": true,
11 "serviceURL": "https://{nextcloud}/apps/cospend/" 11 "urlInputPrefix": "https://",
12 "urlInputSuffix": "/apps/cospend/",
13 "serviceURL": "https://{teamId}/apps/cospend/"
12 } 14 }
13} 15}
diff --git a/recipes/nextcloud-cospend/service.css b/recipes/nextcloud-cospend/service.css
index 764531b..85171b0 100644
--- a/recipes/nextcloud-cospend/service.css
+++ b/recipes/nextcloud-cospend/service.css
@@ -1,12 +1,41 @@
1/* Hide all app links and contacts menu link in the top menu except for 1/* Hide all app links and contacts menu link in the top menu except for
2Cospend */ 2Cospend */
3#appmenu li:not([data-id="cospend"]), #contactsmenu {display: none;} 3#appmenu li:not([data-id='cospend']),
4#contactsmenu {
5 display: none;
6}
4 7
5/* Change the cursor to the default for Nextcloud home, Cospend and settings 8/* Change the cursor to the default for Nextcloud home and Cospend
6links in the top menu and disable them */ 9links in the top menu and disable them */
7#nextcloud, #appmenu li[data-id="cospend"] a, #settings { 10#nextcloud,
8 cursor:default; pointer-events: none; 11#appmenu li[data-id='cospend'] a {
12 cursor: default;
13 pointer-events: none;
14}
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;
9} 25}
10 26
11/* Hide "More" link in the top menu */ 27/* Hide "More" link in the top menu */
12#more-apps {display: none !important;} 28#more-apps {
29 display: none !important;
30}
31
32/* Hide notifications that are not related to Cospend */
33.notifications .notification-wrapper .notification:not([object_type="cospend"]) {
34 display: none;
35}
36
37/* Hide "Dismiss all notifications" as this action will dismiss also hidden
38notifications */
39.notification-wrapper .dismiss-all {
40 display: none;
41}
diff --git a/recipes/nextcloud-cospend/webview.js b/recipes/nextcloud-cospend/webview.js
index e9e6433..b3836a7 100644
--- a/recipes/nextcloud-cospend/webview.js
+++ b/recipes/nextcloud-cospend/webview.js
@@ -4,12 +4,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
4 4
5module.exports = Ferdium => { 5module.exports = Ferdium => {
6 const getMessages = () => { 6 const getMessages = () => {
7 const direct = document.querySelectorAll( 7 const directSelector = document.querySelectorAll(
8 '.app-navigation-entry-utils-counter.highlighted', 8 '.app-navigation-entry-utils-counter.highlighted',
9 ).length; 9 );
10 const indirect = document.querySelectorAll( 10 const direct = directSelector ? Ferdium.safeParseInt(directSelector.length) : 0;
11
12 const indirectSelector = document.querySelectorAll(
11 '.app-navigation-entry-utils-counter:not(.highlighted)', 13 '.app-navigation-entry-utils-counter:not(.highlighted)',
12 ).length; 14 );
15 const indirect = indirectSelector ? Ferdium.safeParseInt(indirectSelector.length) : 0;
13 16
14 Ferdium.setBadge(direct, indirect); 17 Ferdium.setBadge(direct, indirect);
15 }; 18 };
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
9links in the top menu and disable them */ 9links 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
38notifications */
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
7module.exports = Ferdium => { 7module.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 };
diff --git a/recipes/nextcloud-talk/index.js b/recipes/nextcloud-talk/index.js
index 8b520e9..dd41f72 100644
--- a/recipes/nextcloud-talk/index.js
+++ b/recipes/nextcloud-talk/index.js
@@ -1,5 +1 @@
1module.exports = Ferdium => class Nextcloud extends Ferdium { module.exports = Ferdium => Ferdium;
2 buildUrl(url) {
3 return `${url}/apps/spreed/`;
4 }
5};
diff --git a/recipes/nextcloud-talk/package.json b/recipes/nextcloud-talk/package.json
index ac55283..8ce25ac 100644
--- a/recipes/nextcloud-talk/package.json
+++ b/recipes/nextcloud-talk/package.json
@@ -1,12 +1,15 @@
1{ 1{
2 "id": "nextcloud-talk", 2 "id": "nextcloud-talk",
3 "name": "Nextcloud Talk", 3 "name": "Nextcloud Talk",
4 "version": "1.3.1", 4 "version": "1.3.2",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-tasks/",
6 "config": { 7 "config": {
7 "hasNotificationSound": true, 8 "hasNotificationSound": true,
8 "hasIndirectMessages": true, 9 "hasIndirectMessages": true,
9 "hasCustomUrl": true, 10 "hasTeamId": true,
10 "serviceURL": "https://{nextcloud}/apps/spreed/" 11 "urlInputPrefix": "https://",
12 "urlInputSuffix": "/apps/spreed/",
13 "serviceURL": "https://{teamId}/apps/spreed/"
11 } 14 }
12} 15}
diff --git a/recipes/nextcloud-talk/service.css b/recipes/nextcloud-talk/service.css
index f4f08bc..ccdba58 100644
--- a/recipes/nextcloud-talk/service.css
+++ b/recipes/nextcloud-talk/service.css
@@ -3,20 +3,34 @@
3 display: none; 3 display: none;
4} 4}
5 5
6/* Change cursor to the default pointer for top menu Nextcloud home, Talk and 6/* Change cursor to the default pointer for top menu Nextcloud home and Talk
7settings links and disable them */ 7links and disable them */
8#nextcloud, #appmenu li[data-id="spreed"] a, #settings { 8#nextcloud,
9#appmenu li[data-id="spreed"] a {
9 cursor: default; 10 cursor: default;
10 pointer-events: none; 11 pointer-events: none;
11} 12}
12 13
14/* Hide all settings options, except the option to log out */
15#settings #expanddiv li:not([data-id='logout']) {
16 display: none;
17}
18
19/* Fix the margin of the dropdown */
20#settings #expanddiv,
21#settings #expanddiv > ul {
22 min-height: 0;
23}
24
13/* Hide "More" link in the top menu */ 25/* Hide "More" link in the top menu */
14#more-apps { 26#more-apps {
15 display: none !important; 27 display: none !important;
16} 28}
17 29
18/* Hide notifications that are not related to calendar */ 30/* Hide notifications that are not related to Talk */
19.notifications .notification-wrapper .notification {display: none;} 31.notifications .notification-wrapper .notification {
32 display: none;
33}
20.notifications .notification-wrapper .notification[object_type="chat"], 34.notifications .notification-wrapper .notification[object_type="chat"],
21.notifications .notification-wrapper .notification[object_type="room"] { 35.notifications .notification-wrapper .notification[object_type="room"] {
22 display: initial; 36 display: initial;
@@ -24,4 +38,6 @@ settings links and disable them */
24 38
25/* Hide "Dismiss all notifications" as this action will dismiss also hidden 39/* Hide "Dismiss all notifications" as this action will dismiss also hidden
26notifications */ 40notifications */
27.notification-wrapper .dismiss-all {display: none;} 41.notification-wrapper .dismiss-all {
42 display: none;
43}
diff --git a/recipes/nextcloud-talk/webview.js b/recipes/nextcloud-talk/webview.js
index 1ae3783..77b969b 100644
--- a/recipes/nextcloud-talk/webview.js
+++ b/recipes/nextcloud-talk/webview.js
@@ -5,21 +5,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
5module.exports = Ferdium => { 5module.exports = Ferdium => {
6 const getMessages = () => { 6 const getMessages = () => {
7 let direct = 0; 7 let direct = 0;
8
8 const notificationWrapper = document.querySelector( 9 const notificationWrapper = document.querySelector(
9 '.notifications .notification-wrapper', 10 '.notifications .notification-wrapper',
10 ); 11 );
11 12
12 if (notificationWrapper) { 13 if (notificationWrapper) {
13 direct = notificationWrapper.querySelectorAll( 14 const directSelector = notificationWrapper.querySelectorAll(
14 '.notification[object_type="chat"], .notification[object_type="room"]', 15 '.notification[object_type="chat"], .notification[object_type="room"]',
15 ).length; 16 );
17 direct = directSelector ? Ferdium.safeParseInt(directSelector.length) : 0;
16 } 18 }
17 19
18 let indirect = 0; 20 let indirect = 0;
19 21
20 for (const counter of document.querySelectorAll('.app-navigation-entry__counter')) { 22 for (const counter of document.querySelectorAll('.app-navigation-entry__counter')) {
21 indirect += Number(counter.textContent); 23 const entryCounter = Ferdium.safeParseInt(counter.textContent) : 0;
22 } 24 indirect += entryCounter;
25 }
23 26
24 if (document.title.startsWith("*")) { 27 if (document.title.startsWith("*")) {
25 indirect++; 28 indirect++;
diff --git a/recipes/nextcloud-tasks/index.js b/recipes/nextcloud-tasks/index.js
index f5f6746..dd41f72 100644
--- a/recipes/nextcloud-tasks/index.js
+++ b/recipes/nextcloud-tasks/index.js
@@ -1,5 +1 @@
1module.exports = Ferdium => class NextcloudCarnet extends Ferdium { module.exports = Ferdium => Ferdium;
2 buildUrl(url) {
3 return `${url}/apps/tasks/`;
4 }
5};
diff --git a/recipes/nextcloud-tasks/package.json b/recipes/nextcloud-tasks/package.json
index c1b0558..91942e4 100644
--- a/recipes/nextcloud-tasks/package.json
+++ b/recipes/nextcloud-tasks/package.json
@@ -1,13 +1,15 @@
1{ 1{
2 "id": "nextcloud-tasks", 2 "id": "nextcloud-tasks",
3 "name": "Nextcloud Tasks", 3 "name": "Nextcloud Tasks",
4 "version": "1.2.0", 4 "version": "1.2.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-tasks", 6 "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-tasks/",
7 "config": { 7 "config": {
8 "hasNotificationSound": true, 8 "hasNotificationSound": true,
9 "hasIndirectMessages": true, 9 "hasIndirectMessages": true,
10 "hasCustomUrl": true, 10 "hasTeamId": true,
11 "serviceURL": "https://{nextcloud}/apps/tasks/" 11 "urlInputPrefix": "https://",
12 "urlInputSuffix": "/apps/tasks/",
13 "serviceURL": "https://{teamId}/apps/tasks/"
12 } 14 }
13} 15}
diff --git a/recipes/nextcloud-tasks/service.css b/recipes/nextcloud-tasks/service.css
index 805b44b..7f8495f 100644
--- a/recipes/nextcloud-tasks/service.css
+++ b/recipes/nextcloud-tasks/service.css
@@ -1,12 +1,42 @@
1/* Hide all app links and contacts menu link in the top menu except for 1/* Hide all app links and contacts menu link in the top menu except for
2Tasks */ 2Tasks */
3#appmenu li:not([data-id="tasks"]), #contactsmenu {display: none;} 3#appmenu li:not([data-id="tasks"]),
4#contactsmenu {
5 display: none;
6}
4 7
5/* Change the cursor to the default for Nextcloud home, Tasks and settings 8/* Change the cursor to the default for Nextcloud home and Tasks
6links in the top menu and disable them */ 9links in the top menu and disable them */
7#nextcloud, #appmenu li[data-id="tasks"] a, #settings { 10#nextcloud,
8 cursor: default; pointer-events: none; 11#appmenu li[data-id="tasks"] a {
12 cursor: default;
13 pointer-events: none;
14}
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;
9} 25}
10 26
11/* Hide "More" link in the top menu */ 27/* Hide "More" link in the top menu */
12#more-apps {display: none !important;} 28#more-apps {
29 display: none !important;
30}
31
32/* Hide notifications that are not related to Tasks */
33.notifications .notification-wrapper .notification:not([object_type="tasks"]) {
34 display: none;
35}
36
37/* Hide "Dismiss all notifications" as this action will dismiss also hidden
38notifications */
39.notification-wrapper .dismiss-all {
40 display: none;
41}
42
diff --git a/recipes/nextcloud-tasks/webview.js b/recipes/nextcloud-tasks/webview.js
index e9e6433..717fed7 100644
--- a/recipes/nextcloud-tasks/webview.js
+++ b/recipes/nextcloud-tasks/webview.js
@@ -1,15 +1,20 @@
1const _path = _interopRequireDefault(require('path')); 1const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
4 6
5module.exports = Ferdium => { 7module.exports = Ferdium => {
6 const getMessages = () => { 8 const getMessages = () => {
7 const direct = document.querySelectorAll( 9 const directSelector = document.querySelectorAll(
8 '.app-navigation-entry-utils-counter.highlighted', 10 '.app-navigation-entry-utils-counter.highlighted',
9 ).length; 11 );
10 const indirect = document.querySelectorAll( 12 const direct = directSelector ? Ferdium.safeParseInt(directSelector.length) : 0;
13
14 const indirectSelector = document.querySelectorAll(
11 '.app-navigation-entry-utils-counter:not(.highlighted)', 15 '.app-navigation-entry-utils-counter:not(.highlighted)',
12 ).length; 16 );
17 const indirect = indirectSelector ? Ferdium.safeParseInt(indirectSelector.length) : 0;
13 18
14 Ferdium.setBadge(direct, indirect); 19 Ferdium.setBadge(direct, indirect);
15 }; 20 };