From a8d2ea779b02904aeb18c9cb6891a0ee01617344 Mon Sep 17 00:00:00 2001 From: Edgars Date: Tue, 18 Aug 2020 16:16:00 +0300 Subject: Recipe for Nextcloud Tasks --- all.json | 11 +++++++++++ archives/nextcloud-tasks.tar.gz | Bin 0 -> 44778 bytes uncompressed/nextcloud-tasks/README.md | 24 ++++++++++++++++++++++++ uncompressed/nextcloud-tasks/icon.png | Bin 0 -> 45324 bytes uncompressed/nextcloud-tasks/icon.svg | 5 +++++ uncompressed/nextcloud-tasks/index.js | 7 +++++++ uncompressed/nextcloud-tasks/package.json | 16 ++++++++++++++++ uncompressed/nextcloud-tasks/service.css | 12 ++++++++++++ uncompressed/nextcloud-tasks/webview.js | 23 +++++++++++++++++++++++ 9 files changed, 98 insertions(+) create mode 100644 archives/nextcloud-tasks.tar.gz create mode 100644 uncompressed/nextcloud-tasks/README.md create mode 100644 uncompressed/nextcloud-tasks/icon.png create mode 100644 uncompressed/nextcloud-tasks/icon.svg create mode 100644 uncompressed/nextcloud-tasks/index.js create mode 100644 uncompressed/nextcloud-tasks/package.json create mode 100644 uncompressed/nextcloud-tasks/service.css create mode 100644 uncompressed/nextcloud-tasks/webview.js diff --git a/all.json b/all.json index 7953af4..14e2d1c 100644 --- a/all.json +++ b/all.json @@ -659,6 +659,17 @@ "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/nextcloud-talk/icon.svg" } }, + { + "author": "Edgars Andersons ", + "featured": false, + "id": "nextcloud-tasks", + "name": "Nextcloud Tasks", + "version": "1.0.0", + "icons": { + "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/nextcloud-tasks/icon.png", + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/nextcloud-tasks/icon.svg" + } + }, { "author": "Jake Lee ", "featured": false, diff --git a/archives/nextcloud-tasks.tar.gz b/archives/nextcloud-tasks.tar.gz new file mode 100644 index 0000000..9cbb391 Binary files /dev/null and b/archives/nextcloud-tasks.tar.gz differ diff --git a/uncompressed/nextcloud-tasks/README.md b/uncompressed/nextcloud-tasks/README.md new file mode 100644 index 0000000..34f05fd --- /dev/null +++ b/uncompressed/nextcloud-tasks/README.md @@ -0,0 +1,24 @@ +# Ferdi recipe for Nextcloud Tasks + +Nextcloud Tasks is a tasks app for Nextcloud. +Easily sync tasks from various devices with your Nextcloud and edit them online. + +To add Nextcloud Tasks service to Ferdi, Nextcloud server address should be provided in the field "Custom server". + +## Credits + +This recipe is based on [`recipe-nextcloud-talk`](https://github.com/meetfranz/recipe-nextcloud-talk). + +Icons were sourced from (`favicon.svg`). + +## Links + +Ferdi: + +- [Ferdi](https://getferdi.com/) +- [Ferdi recipes](https://github.com/getferdi/recipes) + +Nextcloud: + +- [Nextcloud](https://nextcloud.com/) +- [Nextcloud Tasks](https://apps.nextcloud.com/apps/tasks) diff --git a/uncompressed/nextcloud-tasks/icon.png b/uncompressed/nextcloud-tasks/icon.png new file mode 100644 index 0000000..a09dd5d Binary files /dev/null and b/uncompressed/nextcloud-tasks/icon.png differ diff --git a/uncompressed/nextcloud-tasks/icon.svg b/uncompressed/nextcloud-tasks/icon.svg new file mode 100644 index 0000000..cc1524d --- /dev/null +++ b/uncompressed/nextcloud-tasks/icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/uncompressed/nextcloud-tasks/index.js b/uncompressed/nextcloud-tasks/index.js new file mode 100644 index 0000000..9e4a4e7 --- /dev/null +++ b/uncompressed/nextcloud-tasks/index.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = Franz => class NextcloudCarnet extends Franz { + buildUrl(url) { + return `${url}/apps/tasks/`; + } +}; diff --git a/uncompressed/nextcloud-tasks/package.json b/uncompressed/nextcloud-tasks/package.json new file mode 100644 index 0000000..cabc86a --- /dev/null +++ b/uncompressed/nextcloud-tasks/package.json @@ -0,0 +1,16 @@ +{ + "id": "nextcloud-tasks", + "name": "Nextcloud Tasks", + "version": "1.0.0", + "description": "Ferdi recipe for Nextcloud Tasks. Easily sync tasks from various devices with your Nextcloud and edit them online.", + "main": "index.js", + "author": "Edgars Andersons ", + "license": "MIT", + "repository": "https://github.com/eandersons/ferdi-recipe-nextcloud-tasks", + "config": { + "hasNotificationSound": true, + "hasIndirectMessages": true, + "hasCustomUrl": true, + "serviceURL": "https://{nextcloud}/apps/tasks/" + } +} diff --git a/uncompressed/nextcloud-tasks/service.css b/uncompressed/nextcloud-tasks/service.css new file mode 100644 index 0000000..805b44b --- /dev/null +++ b/uncompressed/nextcloud-tasks/service.css @@ -0,0 +1,12 @@ +/* Hide all app links and contacts menu link in the top menu except for +Tasks */ +#appmenu li:not([data-id="tasks"]), #contactsmenu {display: none;} + +/* Change the cursor to the default for Nextcloud home, Tasks and settings +links in the top menu and disable them */ +#nextcloud, #appmenu li[data-id="tasks"] a, #settings { + cursor: default; pointer-events: none; +} + +/* Hide "More" link in the top menu */ +#more-apps {display: none !important;} diff --git a/uncompressed/nextcloud-tasks/webview.js b/uncompressed/nextcloud-tasks/webview.js new file mode 100644 index 0000000..53496fe --- /dev/null +++ b/uncompressed/nextcloud-tasks/webview.js @@ -0,0 +1,23 @@ +"use strict"; + +var _path = _interopRequireDefault(require("path")); + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : {default: obj}; +} + +module.exports = Franz => { + const getMessages = function getMessages() { + const direct = document.querySelectorAll( + '.app-navigation-entry-utils-counter.highlighted' + ).length; + const indirect = document.querySelectorAll( + '.app-navigation-entry-utils-counter:not(.highlighted)' + ).length; + + Franz.setBadge(direct, indirect); + }; + + Franz.loop(getMessages); + Franz.injectCSS(_path.default.join(__dirname, 'service.css')); +}; -- cgit v1.2.3-70-g09d2