aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud-tasks
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-09-22 20:56:48 +0200
committerLibravatar GitHub <noreply@github.com>2020-09-22 19:56:48 +0100
commit6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch)
tree9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /recipes/nextcloud-tasks
parentUpdated logos for Outlook/OWA (diff)
downloadferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz
ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst
ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'recipes/nextcloud-tasks')
-rw-r--r--recipes/nextcloud-tasks/README.md24
-rw-r--r--recipes/nextcloud-tasks/icon.pngbin0 -> 45324 bytes
-rw-r--r--recipes/nextcloud-tasks/icon.svg5
-rw-r--r--recipes/nextcloud-tasks/index.js7
-rw-r--r--recipes/nextcloud-tasks/package.json16
-rw-r--r--recipes/nextcloud-tasks/service.css12
-rw-r--r--recipes/nextcloud-tasks/webview.js23
7 files changed, 87 insertions, 0 deletions
diff --git a/recipes/nextcloud-tasks/README.md b/recipes/nextcloud-tasks/README.md
new file mode 100644
index 0000000..34f05fd
--- /dev/null
+++ b/recipes/nextcloud-tasks/README.md
@@ -0,0 +1,24 @@
1# Ferdi recipe for Nextcloud Tasks
2
3Nextcloud Tasks is a tasks app for Nextcloud.
4Easily sync tasks from various devices with your Nextcloud and edit them online.
5
6To add Nextcloud Tasks service to Ferdi, Nextcloud server address should be provided in the field "Custom server".
7
8## Credits
9
10This recipe is based on [`recipe-nextcloud-talk`](https://github.com/meetfranz/recipe-nextcloud-talk).
11
12Icons were sourced from <https://github.com/nextcloud/tasks/tree/master/img> (`favicon.svg`).
13
14## Links
15
16Ferdi:
17
18- [Ferdi](https://getferdi.com/)
19- [Ferdi recipes](https://github.com/getferdi/recipes)
20
21Nextcloud:
22
23- [Nextcloud](https://nextcloud.com/)
24- [Nextcloud Tasks](https://apps.nextcloud.com/apps/tasks)
diff --git a/recipes/nextcloud-tasks/icon.png b/recipes/nextcloud-tasks/icon.png
new file mode 100644
index 0000000..a09dd5d
--- /dev/null
+++ b/recipes/nextcloud-tasks/icon.png
Binary files differ
diff --git a/recipes/nextcloud-tasks/icon.svg b/recipes/nextcloud-tasks/icon.svg
new file mode 100644
index 0000000..cc1524d
--- /dev/null
+++ b/recipes/nextcloud-tasks/icon.svg
@@ -0,0 +1,5 @@
1<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
2<svg width="32px" height="32px" enable-background="new 0 0 32 32" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
3<path d="M5,0h22c2.762,0,5,2.239,5,5v22c0,2.762-2.238,5-5,5H5c-2.761,0-5-2.238-5-5V5C0,2.239,2.239,0,5,0z" fill="#0082C9"/>
4<path d="m13.958 27.497s0.248-0.685 0.538-1.308c4.692-10.104 10.719-16.759 13.393-19.78 2.164-2.447 1.317-2.062 0.358-1.438-3.91 2.543-11.228 10.715-14.024 13.546-0.518 0.521-1.691 1.754-1.956 1.754-0.299 0-1.298-0.461-1.869-0.797-2.182-1.279-4.269-2.527-5.578-2.999-2.789-1.003-2-0.05-1.841 0.269 0.498 0.996 7.233 6.396 9.464 8.944 0.691 0.791 1.515 1.809 1.515 1.809z" fill="#fff" stroke="#fff" stroke-miterlimit="10" stroke-width=".75"/>
5</svg>
diff --git a/recipes/nextcloud-tasks/index.js b/recipes/nextcloud-tasks/index.js
new file mode 100644
index 0000000..9e4a4e7
--- /dev/null
+++ b/recipes/nextcloud-tasks/index.js
@@ -0,0 +1,7 @@
1"use strict";
2
3module.exports = Franz => class NextcloudCarnet extends Franz {
4 buildUrl(url) {
5 return `${url}/apps/tasks/`;
6 }
7};
diff --git a/recipes/nextcloud-tasks/package.json b/recipes/nextcloud-tasks/package.json
new file mode 100644
index 0000000..cabc86a
--- /dev/null
+++ b/recipes/nextcloud-tasks/package.json
@@ -0,0 +1,16 @@
1{
2 "id": "nextcloud-tasks",
3 "name": "Nextcloud Tasks",
4 "version": "1.0.0",
5 "description": "Ferdi recipe for Nextcloud Tasks. Easily sync tasks from various devices with your Nextcloud and edit them online.",
6 "main": "index.js",
7 "author": "Edgars Andersons <Edgars+github@gaitenis.id.lv>",
8 "license": "MIT",
9 "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-tasks",
10 "config": {
11 "hasNotificationSound": true,
12 "hasIndirectMessages": true,
13 "hasCustomUrl": true,
14 "serviceURL": "https://{nextcloud}/apps/tasks/"
15 }
16}
diff --git a/recipes/nextcloud-tasks/service.css b/recipes/nextcloud-tasks/service.css
new file mode 100644
index 0000000..805b44b
--- /dev/null
+++ b/recipes/nextcloud-tasks/service.css
@@ -0,0 +1,12 @@
1/* Hide all app links and contacts menu link in the top menu except for
2Tasks */
3#appmenu li:not([data-id="tasks"]), #contactsmenu {display: none;}
4
5/* Change the cursor to the default for Nextcloud home, Tasks and settings
6links in the top menu and disable them */
7#nextcloud, #appmenu li[data-id="tasks"] a, #settings {
8 cursor: default; pointer-events: none;
9}
10
11/* Hide "More" link in the top menu */
12#more-apps {display: none !important;}
diff --git a/recipes/nextcloud-tasks/webview.js b/recipes/nextcloud-tasks/webview.js
new file mode 100644
index 0000000..53496fe
--- /dev/null
+++ b/recipes/nextcloud-tasks/webview.js
@@ -0,0 +1,23 @@
1"use strict";
2
3var _path = _interopRequireDefault(require("path"));
4
5function _interopRequireDefault(obj) {
6 return obj && obj.__esModule ? obj : {default: obj};
7}
8
9module.exports = Franz => {
10 const getMessages = function getMessages() {
11 const direct = document.querySelectorAll(
12 '.app-navigation-entry-utils-counter.highlighted'
13 ).length;
14 const indirect = document.querySelectorAll(
15 '.app-navigation-entry-utils-counter:not(.highlighted)'
16 ).length;
17
18 Franz.setBadge(direct, indirect);
19 };
20
21 Franz.loop(getMessages);
22 Franz.injectCSS(_path.default.join(__dirname, 'service.css'));
23};