diff options
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/nextcloud-calendar/README.md | 23 | ||||
-rw-r--r-- | uncompressed/nextcloud-calendar/icon.png | bin | 0 -> 36124 bytes | |||
-rw-r--r-- | uncompressed/nextcloud-calendar/icon.svg | 2 | ||||
-rw-r--r-- | uncompressed/nextcloud-calendar/index.js | 7 | ||||
-rw-r--r-- | uncompressed/nextcloud-calendar/package.json | 16 | ||||
-rw-r--r-- | uncompressed/nextcloud-calendar/service.css | 12 | ||||
-rw-r--r-- | uncompressed/nextcloud-calendar/webview.js | 23 |
7 files changed, 83 insertions, 0 deletions
diff --git a/uncompressed/nextcloud-calendar/README.md b/uncompressed/nextcloud-calendar/README.md new file mode 100644 index 0000000..5db01c6 --- /dev/null +++ b/uncompressed/nextcloud-calendar/README.md | |||
@@ -0,0 +1,23 @@ | |||
1 | # Ferdi recipe for Nextcloud Calendar | ||
2 | |||
3 | The Calendar app is a user interface for Nextcloud's CalDAV server. Easily sync events from various devices with your Nextcloud and edit them online. | ||
4 | |||
5 | To add Nextcloud Calendar service to Ferdi, Nextcloud server address should be provided in the field "Custom server". | ||
6 | |||
7 | ## Credits | ||
8 | |||
9 | This recipe is based on [`recipe-nextcloud-talk`](https://github.com/meetfranz/recipe-nextcloud-talk). | ||
10 | |||
11 | Icons were sourced from <https://github.com/nextcloud/calendar/tree/master/img> (`favicon-touch.svg`). | ||
12 | |||
13 | ## Links | ||
14 | |||
15 | Ferdi: | ||
16 | |||
17 | - [Ferdi](https://getferdi.com/) | ||
18 | - [Ferdi recipes](https://github.com/getferdi/recipes) | ||
19 | |||
20 | Nextcloud: | ||
21 | |||
22 | - [Nextcloud](https://nextcloud.com/) | ||
23 | - [Nextcloud Calendar](https://apps.nextcloud.com/apps/calendar) | ||
diff --git a/uncompressed/nextcloud-calendar/icon.png b/uncompressed/nextcloud-calendar/icon.png new file mode 100644 index 0000000..bbae639 --- /dev/null +++ b/uncompressed/nextcloud-calendar/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/nextcloud-calendar/icon.svg b/uncompressed/nextcloud-calendar/icon.svg new file mode 100644 index 0000000..cf802d7 --- /dev/null +++ b/uncompressed/nextcloud-calendar/icon.svg | |||
@@ -0,0 +1,2 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" version="1.1" xml:space="preserve" height="128" width="128" enable-background="new 0 0 595.275 311.111" y="0px" x="0px" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 128 128"><rect rx="20" ry="20" height="128" width="128" y="-.0000015" x="0" fill="#0082c9"/><g transform="matrix(3.5714 0 0 3.5714 2080.8 -.77322)"><path fill="#fff" d="m-572.71 3.5765c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2s2-0.892 2-2v-4c0-1.108-0.892-2-2-2zm16 0c-1.108 0-2 0.892-2 2v4c0 1.108 0.892 2 2 2s2-0.892 2-2v-4c0-1.108-0.892-2-2-2zm-13 4v2c0 1.662-1.338 3-3 3s-3-1.338-3-3v-1.875c-1.728 0.44254-3 2.0052-3 3.875v16c0 2.216 1.784 4 4 4h20c2.216 0 4-1.784 4-4v-16c0-1.8698-1.272-3.4325-3-3.875v1.875c0 1.662-1.338 3-3 3s-3-1.338-3-3v-2h-10zm-5.9062 9h21.812c0.0554 0 0.0937 0.03835 0.0937 0.09375v11.812c0 0.0554-0.0384 0.09375-0.0937 0.09375h-21.812c-0.0554 0-0.0937-0.03835-0.0937-0.09375v-11.812c0-0.0554 0.0384-0.09375 0.0937-0.09375z"/></g></svg> \ No newline at end of file | ||
diff --git a/uncompressed/nextcloud-calendar/index.js b/uncompressed/nextcloud-calendar/index.js new file mode 100644 index 0000000..6d140c6 --- /dev/null +++ b/uncompressed/nextcloud-calendar/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/calendar/`; | ||
6 | } | ||
7 | }; | ||
diff --git a/uncompressed/nextcloud-calendar/package.json b/uncompressed/nextcloud-calendar/package.json new file mode 100644 index 0000000..ee23655 --- /dev/null +++ b/uncompressed/nextcloud-calendar/package.json | |||
@@ -0,0 +1,16 @@ | |||
1 | { | ||
2 | "id": "nextcloud-calendar", | ||
3 | "name": "Nextcloud Calendar", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Ferdi recipe for Nextcloud Calendar.", | ||
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-calendar", | ||
10 | "config": { | ||
11 | "hasNotificationSound": true, | ||
12 | "hasIndirectMessages": true, | ||
13 | "hasCustomUrl": true, | ||
14 | "serviceURL": "https://{nextcloud}/apps/calendar/" | ||
15 | } | ||
16 | } | ||
diff --git a/uncompressed/nextcloud-calendar/service.css b/uncompressed/nextcloud-calendar/service.css new file mode 100644 index 0000000..833d5a8 --- /dev/null +++ b/uncompressed/nextcloud-calendar/service.css | |||
@@ -0,0 +1,12 @@ | |||
1 | /* Hide all app links and contacts menu link in the top menu except for | ||
2 | Calendar */ | ||
3 | #appmenu li:not([data-id="calendar"]), #contactsmenu {display: none;} | ||
4 | |||
5 | /* Change the cursor to default for top menu Nextcloud home, Calendar and | ||
6 | settings links and disable them */ | ||
7 | #nextcloud, #appmenu li[data-id="calendar"] 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-calendar/webview.js b/uncompressed/nextcloud-calendar/webview.js new file mode 100644 index 0000000..53496fe --- /dev/null +++ b/uncompressed/nextcloud-calendar/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 | }; | ||