aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud
diff options
context:
space:
mode:
authorLibravatar Edgars <eandersons@users.noreply.github.com>2020-10-29 11:52:18 +0200
committerLibravatar GitHub <noreply@github.com>2020-10-29 10:52:18 +0100
commitb7bfaff13d55e686ea65c89ba57c117703b5d4ca (patch)
tree817e00d6f4bfd14db7d47eab3ca478f8a6ddbd14 /recipes/nextcloud
parentAdd recipe for Wire (#344) (diff)
downloadferdium-recipes-b7bfaff13d55e686ea65c89ba57c117703b5d4ca.tar.gz
ferdium-recipes-b7bfaff13d55e686ea65c89ba57c117703b5d4ca.tar.zst
ferdium-recipes-b7bfaff13d55e686ea65c89ba57c117703b5d4ca.zip
Add recipe for Nextcloud (#343)
Diffstat (limited to 'recipes/nextcloud')
-rw-r--r--recipes/nextcloud/README.md24
-rw-r--r--recipes/nextcloud/icon.pngbin0 -> 38787 bytes
-rw-r--r--recipes/nextcloud/icon.svg1
-rw-r--r--recipes/nextcloud/index.js7
-rw-r--r--recipes/nextcloud/package.json16
-rw-r--r--recipes/nextcloud/webview.js19
6 files changed, 67 insertions, 0 deletions
diff --git a/recipes/nextcloud/README.md b/recipes/nextcloud/README.md
new file mode 100644
index 0000000..6703021
--- /dev/null
+++ b/recipes/nextcloud/README.md
@@ -0,0 +1,24 @@
1# Ferdi recipe for Nextcloud
2
3Nextcloud is a safe home for all your data – community-driven, free & open source.
4The self-hosted productivity platform that keeps you in control.
5Share and collaborate on documents, send and receive email, manage your calendar and have video chats without data leaks.
6
7To add Nextcloud service to Ferdi, Nextcloud server address should be provided in the field "Custom server".
8
9## Credits
10
11This recipe is based on [`recipe-nextcloud-talk`](https://github.com/meetfranz/recipe-nextcloud-talk).
12
13Icons were sourced from <https://github.com/nextcloud/server/tree/master/core/img> (`favicon-touch.svg`).
14
15## Links
16
17Ferdi:
18
19- [Ferdi](https://getferdi.com/)
20- [Ferdi recipes](https://github.com/getferdi/recipes)
21
22Nextcloud:
23
24- [Nextcloud](https://nextcloud.com/)
diff --git a/recipes/nextcloud/icon.png b/recipes/nextcloud/icon.png
new file mode 100644
index 0000000..70ae684
--- /dev/null
+++ b/recipes/nextcloud/icon.png
Binary files differ
diff --git a/recipes/nextcloud/icon.svg b/recipes/nextcloud/icon.svg
new file mode 100644
index 0000000..82dfdc4
--- /dev/null
+++ b/recipes/nextcloud/icon.svg
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="128" width="128" viewBox="0 0 128 128"><rect rx="20" ry="20" height="128" width="128" fill="#0082c9"/><path style="text-decoration-color:#000;isolation:auto;mix-blend-mode:normal;block-progression:tb;text-decoration-line:none;text-indent:0;text-transform:none;text-decoration-style:solid" d="M64.09 37.368c-12.5 0-23 8.56-26.207 20.078-2.8-6.16-8.962-10.525-16.122-10.525C12.016 46.923 4 54.937 4 64.684c-.002 9.75 8.013 17.764 17.76 17.766 7.162-.002 13.32-4.37 16.12-10.53C41.086 83.438 51.588 92 64.092 92c12.434.002 22.88-8.467 26.153-19.886 2.845 6.046 8.913 10.334 15.99 10.335 9.75 0 17.767-8.016 17.766-17.767 0-9.75-8.015-17.764-17.764-17.762-7.078.002-13.15 4.29-15.994 10.336-3.274-11.42-13.717-19.89-26.15-19.888zm0 10.427a16.81 16.81 0 0 1 16.89 16.888c0 9.39-7.5 16.892-16.89 16.89a16.81 16.81 0 0 1-16.886-16.89c0-9.39 7.5-16.887 16.887-16.888zm-42.33 9.552c4.114 0 7.335 3.222 7.336 7.335 0 4.114-3.22 7.34-7.335 7.34-4.113 0-7.335-3.226-7.334-7.34 0-4.113 3.222-7.335 7.335-7.335zm84.475 0c4.114 0 7.338 3.22 7.338 7.335s-3.223 7.34-7.338 7.34c-4.114 0-7.336-3.226-7.335-7.34 0-4.113 3.222-7.335 7.335-7.335z" fill="#fff" color="#000" white-space="normal"/></svg> \ No newline at end of file
diff --git a/recipes/nextcloud/index.js b/recipes/nextcloud/index.js
new file mode 100644
index 0000000..4e772d7
--- /dev/null
+++ b/recipes/nextcloud/index.js
@@ -0,0 +1,7 @@
1"use strict";
2
3module.exports = Franz => class Nextcloud extends Franz {
4 buildUrl(url) {
5 return `${url}/`;
6 }
7};
diff --git a/recipes/nextcloud/package.json b/recipes/nextcloud/package.json
new file mode 100644
index 0000000..92f713e
--- /dev/null
+++ b/recipes/nextcloud/package.json
@@ -0,0 +1,16 @@
1{
2 "id": "nextcloud",
3 "name": "Nextcloud",
4 "version": "1.0.0",
5 "description": "Ferdi recipe for Nextcloud. Nextcloud is a safe home for all your data – community-driven, free & open source.",
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",
10 "config": {
11 "hasNotificationSound": true,
12 "hasIndirectMessages": true,
13 "hasCustomUrl": true,
14 "serviceURL": "https://{nextcloud}/"
15 }
16}
diff --git a/recipes/nextcloud/webview.js b/recipes/nextcloud/webview.js
new file mode 100644
index 0000000..b7589de
--- /dev/null
+++ b/recipes/nextcloud/webview.js
@@ -0,0 +1,19 @@
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 '.notifications .notification-container .notification-wrapper li .notification'
13 ).length;
14
15 Franz.setBadge(direct);
16 };
17
18 Franz.loop(getMessages);
19};