aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud-tasks
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 /recipes/nextcloud-tasks
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)
Diffstat (limited to 'recipes/nextcloud-tasks')
-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
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 @@
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 };