diff options
author | Edgars <eandersons@users.noreply.github.com> | 2020-09-19 20:19:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-19 18:19:18 +0100 |
commit | 81e3cb06e7e6a40adecc14d7a2a96bcb8a2528fd (patch) | |
tree | 7f3e96b9dc81cd24b4997053373754453dae86aa /uncompressed/nextcloud-carnet | |
parent | Add Campuswire recipe (#268) (diff) | |
download | ferdium-recipes-81e3cb06e7e6a40adecc14d7a2a96bcb8a2528fd.tar.gz ferdium-recipes-81e3cb06e7e6a40adecc14d7a2a96bcb8a2528fd.tar.zst ferdium-recipes-81e3cb06e7e6a40adecc14d7a2a96bcb8a2528fd.zip |
Add Nextcloud Carnet recipe (#263)
Co-authored-by: Edgars <Edgars@gaitenis.id.lv>
Co-authored-by: Bennett <hello@vantezzen.io>
Diffstat (limited to 'uncompressed/nextcloud-carnet')
-rw-r--r-- | uncompressed/nextcloud-carnet/README.md | 24 | ||||
-rw-r--r-- | uncompressed/nextcloud-carnet/icon.png | bin | 0 -> 134962 bytes | |||
-rw-r--r-- | uncompressed/nextcloud-carnet/icon.svg | 42 | ||||
-rw-r--r-- | uncompressed/nextcloud-carnet/index.js | 7 | ||||
-rw-r--r-- | uncompressed/nextcloud-carnet/package.json | 16 | ||||
-rw-r--r-- | uncompressed/nextcloud-carnet/service.css | 11 | ||||
-rw-r--r-- | uncompressed/nextcloud-carnet/webview.js | 23 |
7 files changed, 123 insertions, 0 deletions
diff --git a/uncompressed/nextcloud-carnet/README.md b/uncompressed/nextcloud-carnet/README.md new file mode 100644 index 0000000..0240fc7 --- /dev/null +++ b/uncompressed/nextcloud-carnet/README.md | |||
@@ -0,0 +1,24 @@ | |||
1 | # Ferdi recipe for Carnet (hosted on Nextcloud) | ||
2 | |||
3 | Carnet is a complete and rich note taking app. | ||
4 | |||
5 | To add Carnet (hosted on Nextcloud server) 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/CarnetApp/CarnetNextcloud/tree/master/img> (`app.svg`). | ||
12 | |||
13 | ## Links | ||
14 | |||
15 | Ferdi: | ||
16 | |||
17 | - [Ferdi](https://getferdi.com/) | ||
18 | - [Ferdi recipes](https://github.com/getferdi/recipes) | ||
19 | |||
20 | Nextcloud and Carnet: | ||
21 | |||
22 | - [Nextcloud](https://nextcloud.com/) | ||
23 | - [Carnet](https://getcarnet.app) | ||
24 | - [Carnet (Nextcloud app)](https://apps.nextcloud.com/apps/carnet) | ||
diff --git a/uncompressed/nextcloud-carnet/icon.png b/uncompressed/nextcloud-carnet/icon.png new file mode 100644 index 0000000..5e82195 --- /dev/null +++ b/uncompressed/nextcloud-carnet/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/nextcloud-carnet/icon.svg b/uncompressed/nextcloud-carnet/icon.svg new file mode 100644 index 0000000..c6c3d90 --- /dev/null +++ b/uncompressed/nextcloud-carnet/icon.svg | |||
@@ -0,0 +1,42 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
3 | <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="50px" height="50px" viewBox="0 0 50 50" version="1.1" id="SVGRoot" inkscape:version="0.92.3 (d244b95, 2018-08-02)" sodipodi:docname="app_nextcloud.svg"> | ||
4 | <defs id="defs10"> | ||
5 | <filter style="color-interpolation-filters:sRGB;" inkscape:label="Drop Shadow" id="filter1209"> | ||
6 | <feFlood flood-opacity="1" flood-color="rgb(0,0,0)" result="flood" id="feFlood1199"/> | ||
7 | <feComposite in="flood" in2="SourceGraphic" operator="in" result="composite1" id="feComposite1201"/> | ||
8 | <feGaussianBlur in="composite1" stdDeviation="0.9" result="blur" id="feGaussianBlur1203"/> | ||
9 | <feOffset dx="-0.1" dy="-1.38778e-16" result="offset" id="feOffset1205"/> | ||
10 | <feComposite in="SourceGraphic" in2="offset" operator="over" result="composite2" id="feComposite1207"/> | ||
11 | </filter> | ||
12 | <filter style="color-interpolation-filters:sRGB" inkscape:label="Drop Shadow" id="filter1209-7"> | ||
13 | <feFlood flood-opacity="1" flood-color="rgb(0,0,0)" result="flood" id="feFlood1199-5"/> | ||
14 | <feComposite in="flood" in2="SourceGraphic" operator="in" result="composite1" id="feComposite1201-3"/> | ||
15 | <feGaussianBlur in="composite1" stdDeviation="0.9" result="blur" id="feGaussianBlur1203-5"/> | ||
16 | <feOffset dx="-0.1" dy="-1.38778e-16" result="offset" id="feOffset1205-6"/> | ||
17 | <feComposite in="SourceGraphic" in2="offset" operator="over" result="composite2" id="feComposite1207-2"/> | ||
18 | </filter> | ||
19 | <filter style="color-interpolation-filters:sRGB" inkscape:label="Drop Shadow" id="filter1209-1"> | ||
20 | <feFlood flood-opacity="1" flood-color="rgb(0,0,0)" result="flood" id="feFlood1199-2"/> | ||
21 | <feComposite in="flood" in2="SourceGraphic" operator="in" result="composite1" id="feComposite1201-7"/> | ||
22 | <feGaussianBlur in="composite1" stdDeviation="0.9" result="blur" id="feGaussianBlur1203-0"/> | ||
23 | <feOffset dx="-0.1" dy="-1.38778e-16" result="offset" id="feOffset1205-9"/> | ||
24 | <feComposite in="SourceGraphic" in2="offset" operator="over" result="composite2" id="feComposite1207-3"/> | ||
25 | </filter> | ||
26 | </defs> | ||
27 | <sodipodi:namedview id="base" pagecolor="#858385" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:zoom="14.481547" inkscape:cx="18.748545" inkscape:cy="24.455993" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1853" inkscape:window-height="1025" inkscape:window-x="67" inkscape:window-y="27" inkscape:window-maximized="1" inkscape:grid-bbox="true"/> | ||
28 | <metadata id="metadata13"> | ||
29 | <rdf:RDF> | ||
30 | <cc:Work rdf:about=""> | ||
31 | <dc:format>image/svg+xml</dc:format> | ||
32 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> | ||
33 | <dc:title/> | ||
34 | </cc:Work> | ||
35 | </rdf:RDF> | ||
36 | </metadata> | ||
37 | <g inkscape:label="Calque 1" inkscape:groupmode="layer" id="layer1" style="opacity:1"> | ||
38 | <rect style="opacity:1;fill:#ffffff;fill-opacity:0.96666715;stroke-width:1.24288583;filter:url(#filter1209)" id="rect23-3" width="24.513956" height="37.841259" x="6.5255461" y="6.0820403" transform="rotate(-47.4,21.718532,18.609315)"/> | ||
39 | <rect style="opacity:1;fill:#ffffff;fill-opacity:0.96666715;stroke-width:1.24288583;filter:url(#filter1209-7)" id="rect23-3-9" width="24.513956" height="37.841259" x="3.9015174" y="9.120389" transform="rotate(-25.3,13.457498,3.3590607)"/> | ||
40 | <rect style="opacity:1;fill:#ffffff;fill-opacity:0.96666715;stroke-width:1.24288583;filter:url(#filter1209-1)" id="rect23-3-6" width="24.513956" height="37.841259" x="14.12142" y="6.0820403"/> | ||
41 | </g> | ||
42 | </svg> \ No newline at end of file | ||
diff --git a/uncompressed/nextcloud-carnet/index.js b/uncompressed/nextcloud-carnet/index.js new file mode 100644 index 0000000..1ae8bbe --- /dev/null +++ b/uncompressed/nextcloud-carnet/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/carnet/`; | ||
6 | } | ||
7 | }; | ||
diff --git a/uncompressed/nextcloud-carnet/package.json b/uncompressed/nextcloud-carnet/package.json new file mode 100644 index 0000000..2513cc7 --- /dev/null +++ b/uncompressed/nextcloud-carnet/package.json | |||
@@ -0,0 +1,16 @@ | |||
1 | { | ||
2 | "id": "nextcloud-carnet", | ||
3 | "name": "Carnet (Nextcloud)", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Ferdi recipe for Carnet (hosted on Nextcloud). Carnet is a complete and rich note taking app.", | ||
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-carnet", | ||
10 | "config": { | ||
11 | "hasNotificationSound": true, | ||
12 | "hasIndirectMessages": true, | ||
13 | "hasCustomUrl": true, | ||
14 | "serviceURL": "https://{nextcloud}/apps/carnet/" | ||
15 | } | ||
16 | } | ||
diff --git a/uncompressed/nextcloud-carnet/service.css b/uncompressed/nextcloud-carnet/service.css new file mode 100644 index 0000000..8e767c2 --- /dev/null +++ b/uncompressed/nextcloud-carnet/service.css | |||
@@ -0,0 +1,11 @@ | |||
1 | /* Hide all app links and contacts link in the top menu except for Carnet */ | ||
2 | #appmenu li:not([data-id="carnet"]), #contactsmenu {display: none;} | ||
3 | |||
4 | /* Change cursor to the default pointer for Nextcloud home, Carnet and settings | ||
5 | link and disable them in the top menu */ | ||
6 | #nextcloud, #appmenu li[data-id="carnet"] a, #settings { | ||
7 | cursor:default; pointer-events: none; | ||
8 | } | ||
9 | |||
10 | /* Hide "More" link in the top menu */ | ||
11 | #more-apps {display: none !important;} | ||
diff --git a/uncompressed/nextcloud-carnet/webview.js b/uncompressed/nextcloud-carnet/webview.js new file mode 100644 index 0000000..53496fe --- /dev/null +++ b/uncompressed/nextcloud-carnet/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 | }; | ||