diff options
Diffstat (limited to 'recipes/nextcloud-tasks')
-rw-r--r-- | recipes/nextcloud-tasks/index.js | 6 | ||||
-rw-r--r-- | recipes/nextcloud-tasks/package.json | 10 | ||||
-rw-r--r-- | recipes/nextcloud-tasks/service.css | 40 | ||||
-rw-r--r-- | recipes/nextcloud-tasks/webview.js | 15 |
4 files changed, 52 insertions, 19 deletions
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 @@ | |||
1 | module.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 |
2 | Tasks */ | 2 | Tasks */ |
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 |
6 | links in the top menu and disable them */ | 9 | links 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 | ||
38 | notifications */ | ||
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 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
4 | 6 | ||
5 | module.exports = Ferdium => { | 7 | module.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 | }; |