diff options
author | 2020-08-18 16:16:00 +0300 | |
---|---|---|
committer | 2020-08-18 16:16:00 +0300 | |
commit | a8d2ea779b02904aeb18c9cb6891a0ee01617344 (patch) | |
tree | 25a92d5d9c7defa5f17a621faff67eeb66171b6d /uncompressed | |
parent | Merge pull request #237 from mvdgun/patch-1 (diff) | |
download | ferdium-recipes-a8d2ea779b02904aeb18c9cb6891a0ee01617344.tar.gz ferdium-recipes-a8d2ea779b02904aeb18c9cb6891a0ee01617344.tar.zst ferdium-recipes-a8d2ea779b02904aeb18c9cb6891a0ee01617344.zip |
Recipe for Nextcloud Tasks
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/nextcloud-tasks/README.md | 24 | ||||
-rw-r--r-- | uncompressed/nextcloud-tasks/icon.png | bin | 0 -> 45324 bytes | |||
-rw-r--r-- | uncompressed/nextcloud-tasks/icon.svg | 5 | ||||
-rw-r--r-- | uncompressed/nextcloud-tasks/index.js | 7 | ||||
-rw-r--r-- | uncompressed/nextcloud-tasks/package.json | 16 | ||||
-rw-r--r-- | uncompressed/nextcloud-tasks/service.css | 12 | ||||
-rw-r--r-- | uncompressed/nextcloud-tasks/webview.js | 23 |
7 files changed, 87 insertions, 0 deletions
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 @@ | |||
1 | # Ferdi recipe for Nextcloud Tasks | ||
2 | |||
3 | Nextcloud Tasks is a tasks app for Nextcloud. | ||
4 | Easily sync tasks from various devices with your Nextcloud and edit them online. | ||
5 | |||
6 | To add Nextcloud Tasks service to Ferdi, Nextcloud server address should be provided in the field "Custom server". | ||
7 | |||
8 | ## Credits | ||
9 | |||
10 | This recipe is based on [`recipe-nextcloud-talk`](https://github.com/meetfranz/recipe-nextcloud-talk). | ||
11 | |||
12 | Icons were sourced from <https://github.com/nextcloud/tasks/tree/master/img> (`favicon.svg`). | ||
13 | |||
14 | ## Links | ||
15 | |||
16 | Ferdi: | ||
17 | |||
18 | - [Ferdi](https://getferdi.com/) | ||
19 | - [Ferdi recipes](https://github.com/getferdi/recipes) | ||
20 | |||
21 | Nextcloud: | ||
22 | |||
23 | - [Nextcloud](https://nextcloud.com/) | ||
24 | - [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 --- /dev/null +++ b/uncompressed/nextcloud-tasks/icon.png | |||
Binary files 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 @@ | |||
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/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 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => class NextcloudCarnet extends Franz { | ||
4 | buildUrl(url) { | ||
5 | return `${url}/apps/tasks/`; | ||
6 | } | ||
7 | }; | ||
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 @@ | |||
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/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 @@ | |||
1 | /* Hide all app links and contacts menu link in the top menu except for | ||
2 | Tasks */ | ||
3 | #appmenu li:not([data-id="tasks"]), #contactsmenu {display: none;} | ||
4 | |||
5 | /* Change the cursor to the default for Nextcloud home, Tasks and settings | ||
6 | links 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/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 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | var _path = _interopRequireDefault(require("path")); | ||
4 | |||
5 | function _interopRequireDefault(obj) { | ||
6 | return obj && obj.__esModule ? obj : {default: obj}; | ||
7 | } | ||
8 | |||
9 | module.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 | }; | ||