diff options
author | 2020-08-18 16:27:22 +0300 | |
---|---|---|
committer | 2020-08-18 16:27:22 +0300 | |
commit | f34f54f31bbfac9d921ca39767f518ab72f30973 (patch) | |
tree | b991781702d8d57e8c66da35eee46ec5f11a4540 /uncompressed | |
parent | Merge pull request #237 from mvdgun/patch-1 (diff) | |
download | ferdium-recipes-f34f54f31bbfac9d921ca39767f518ab72f30973.tar.gz ferdium-recipes-f34f54f31bbfac9d921ca39767f518ab72f30973.tar.zst ferdium-recipes-f34f54f31bbfac9d921ca39767f518ab72f30973.zip |
Recipe for Nextcloud Cospend
Nextcloud Cospend is a group/shared budget manager.
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/nextcloud-cospend/README.md | 24 | ||||
-rw-r--r-- | uncompressed/nextcloud-cospend/icon.png | bin | 0 -> 41847 bytes | |||
-rw-r--r-- | uncompressed/nextcloud-cospend/icon.svg | 113 | ||||
-rw-r--r-- | uncompressed/nextcloud-cospend/index.js | 7 | ||||
-rw-r--r-- | uncompressed/nextcloud-cospend/package.json | 16 | ||||
-rw-r--r-- | uncompressed/nextcloud-cospend/service.css | 12 | ||||
-rw-r--r-- | uncompressed/nextcloud-cospend/webview.js | 23 |
7 files changed, 195 insertions, 0 deletions
diff --git a/uncompressed/nextcloud-cospend/README.md b/uncompressed/nextcloud-cospend/README.md new file mode 100644 index 0000000..09d23cf --- /dev/null +++ b/uncompressed/nextcloud-cospend/README.md | |||
@@ -0,0 +1,24 @@ | |||
1 | # Ferdi recipe for Nextcloud Cospend | ||
2 | |||
3 | Nextcloud Cospend is a group/shared budget manager. | ||
4 | It was inspired by the great [IHateMoney](https://github.com/spiral-project/ihatemoney/). | ||
5 | |||
6 | To add Nextcloud Cospend 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://gitlab.com/eneiluj/cospend-nc/-/tree/master/img> (`app_black.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 Cospend](https://apps.nextcloud.com/apps/cospend) | ||
diff --git a/uncompressed/nextcloud-cospend/icon.png b/uncompressed/nextcloud-cospend/icon.png new file mode 100644 index 0000000..f41b2bb --- /dev/null +++ b/uncompressed/nextcloud-cospend/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/nextcloud-cospend/icon.svg b/uncompressed/nextcloud-cospend/icon.svg new file mode 100644 index 0000000..4e787bf --- /dev/null +++ b/uncompressed/nextcloud-cospend/icon.svg | |||
@@ -0,0 +1,113 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
3 | |||
4 | <svg | ||
5 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
6 | xmlns:cc="http://creativecommons.org/ns#" | ||
7 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
8 | xmlns:svg="http://www.w3.org/2000/svg" | ||
9 | xmlns="http://www.w3.org/2000/svg" | ||
10 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
11 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
12 | version="1.1" | ||
13 | id="Capa_1" | ||
14 | x="0px" | ||
15 | y="0px" | ||
16 | width="947.383px" | ||
17 | height="947.383px" | ||
18 | viewBox="0 0 947.383 947.383" | ||
19 | xml:space="preserve" | ||
20 | sodipodi:docname="app_black.svg" | ||
21 | style="enable-background:new 0 0 947.383 947.383;" | ||
22 | inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata | ||
23 | id="metadata47"><rdf:RDF><cc:Work | ||
24 | rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type | ||
25 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs | ||
26 | id="defs45" /><sodipodi:namedview | ||
27 | pagecolor="#ffffff" | ||
28 | bordercolor="#666666" | ||
29 | borderopacity="1" | ||
30 | objecttolerance="10" | ||
31 | gridtolerance="10" | ||
32 | guidetolerance="10" | ||
33 | inkscape:pageopacity="0" | ||
34 | inkscape:pageshadow="2" | ||
35 | inkscape:window-width="1920" | ||
36 | inkscape:window-height="1051" | ||
37 | id="namedview43" | ||
38 | showgrid="false" | ||
39 | inkscape:zoom="0.99642911" | ||
40 | inkscape:cx="118.35409" | ||
41 | inkscape:cy="520.85953" | ||
42 | inkscape:window-x="0" | ||
43 | inkscape:window-y="0" | ||
44 | inkscape:window-maximized="1" | ||
45 | inkscape:current-layer="g6" /> | ||
46 | <g | ||
47 | id="g10" | ||
48 | style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-opacity:1"> | ||
49 | <g | ||
50 | id="g8" | ||
51 | style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-opacity:1"> | ||
52 | <g | ||
53 | id="g6" | ||
54 | style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-opacity:1"> | ||
55 | <path | ||
56 | d="M566.828,2.896l-93.137,49.266L380.237,2.728c-17.958-9.499-38.475,7.352-32.646,26.814l50.675,169.197 c24.891-7.776,50.084-11.69,75.425-11.69c24.992,0,49.839,3.814,74.396,11.378l51.356-168.616 C605.379,10.329,584.832-6.627,566.828,2.896z" | ||
57 | id="path2" | ||
58 | style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1" /> | ||
59 | <path | ||
60 | d="m 782.74036,722.65505 c 0,-230.9453 -79.88442,-515.21197 -310.82972,-515.21197 -230.9453,0 -314.29209,292.34551 -314.29209,523.29081 0,230.943 85.65503,208.1059 316.60033,208.1059 230.9453,0.003 308.52148,14.76171 308.52148,-216.18474 z m -275.1036,50.10644 v 41.0297 c 0,13.26065 -10.75135,24.01085 -24.012,24.01085 h -20.69885 c -13.2618,0 -24.012,-10.7502 -24.012,-24.01085 v -37.35085 c -28.5982,-3.51325 -62.9395,-13.9978 -91.28355,-32.79915 -10.3408,-6.85975 -13.3193,-21.0634 -6.64585,-31.5261 l 21.3647,-33.49145 c 6.74475,-10.56965 20.75635,-13.85635 31.4088,-7.23925 24.56055,15.2605 45.2893,21.61195 66.01805,21.61195 30.6797,0 42.9525,-10.4328 42.9525,-34.36085 0,-49.0912 -158.30555,-55.83825 -158.30555,-163.2149 0,-61.9735 34.9738,-104.92485 94.49205,-117.80945 v -40.8135 c 0,-12.70175 10.2971,-23 23,-23 h 22.7217 c 12.7029,0 23,10.2971 23,23 v 39.58645 c 30.0978,4.7771 54.61695,17.73875 75.5826,35.4085 9.85205,8.303 11.0975,23.0184 2.65765,32.75085 l -23.1633,26.70185 c -7.73835,8.924 -21.01165,10.7111 -30.6774,3.9261 -15.73315,-11.0446 -30.6912,-16.5669 -47.7158,-16.5669 -26.3833,0 -39.26905,7.3623 -39.26905,31.9056 0,46.63365 158.30555,49.0889 158.30555,160.75965 -10e-4,59.52055 -31.29495,106.15305 -95.72025,121.49175 z" | ||
61 | id="path4" | ||
62 | style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.14999998;stroke-opacity:1" | ||
63 | inkscape:connector-curvature="0" | ||
64 | sodipodi:nodetypes="ssscscsssscccccssscsssscccccsscc" /> | ||
65 | </g> | ||
66 | </g> | ||
67 | </g> | ||
68 | <g | ||
69 | id="g12"> | ||
70 | </g> | ||
71 | <g | ||
72 | id="g14"> | ||
73 | </g> | ||
74 | <g | ||
75 | id="g16"> | ||
76 | </g> | ||
77 | <g | ||
78 | id="g18"> | ||
79 | </g> | ||
80 | <g | ||
81 | id="g20"> | ||
82 | </g> | ||
83 | <g | ||
84 | id="g22"> | ||
85 | </g> | ||
86 | <g | ||
87 | id="g24"> | ||
88 | </g> | ||
89 | <g | ||
90 | id="g26"> | ||
91 | </g> | ||
92 | <g | ||
93 | id="g28"> | ||
94 | </g> | ||
95 | <g | ||
96 | id="g30"> | ||
97 | </g> | ||
98 | <g | ||
99 | id="g32"> | ||
100 | </g> | ||
101 | <g | ||
102 | id="g34"> | ||
103 | </g> | ||
104 | <g | ||
105 | id="g36"> | ||
106 | </g> | ||
107 | <g | ||
108 | id="g38"> | ||
109 | </g> | ||
110 | <g | ||
111 | id="g40"> | ||
112 | </g> | ||
113 | </svg> \ No newline at end of file | ||
diff --git a/uncompressed/nextcloud-cospend/index.js b/uncompressed/nextcloud-cospend/index.js new file mode 100644 index 0000000..8547bce --- /dev/null +++ b/uncompressed/nextcloud-cospend/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/cospend/`; | ||
6 | } | ||
7 | }; | ||
diff --git a/uncompressed/nextcloud-cospend/package.json b/uncompressed/nextcloud-cospend/package.json new file mode 100644 index 0000000..89ae0c9 --- /dev/null +++ b/uncompressed/nextcloud-cospend/package.json | |||
@@ -0,0 +1,16 @@ | |||
1 | { | ||
2 | "id": "nextcloud-cospend", | ||
3 | "name": "Nextcloud Cospend", | ||
4 | "version": "1.0.0", | ||
5 | "description": "Ferdi recipe for Nextcloud Cospend. Nextcloud Cospend is a group/shared budget manager.", | ||
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-cospend", | ||
10 | "config": { | ||
11 | "hasNotificationSound": true, | ||
12 | "hasIndirectMessages": true, | ||
13 | "hasCustomUrl": true, | ||
14 | "serviceURL": "https://{nextcloud}/apps/cospend/" | ||
15 | } | ||
16 | } | ||
diff --git a/uncompressed/nextcloud-cospend/service.css b/uncompressed/nextcloud-cospend/service.css new file mode 100644 index 0000000..764531b --- /dev/null +++ b/uncompressed/nextcloud-cospend/service.css | |||
@@ -0,0 +1,12 @@ | |||
1 | /* Hide all app links and contacts menu link in the top menu except for | ||
2 | Cospend */ | ||
3 | #appmenu li:not([data-id="cospend"]), #contactsmenu {display: none;} | ||
4 | |||
5 | /* Change the cursor to the default for Nextcloud home, Cospend and settings | ||
6 | links in the top menu and disable them */ | ||
7 | #nextcloud, #appmenu li[data-id="cospend"] 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-cospend/webview.js b/uncompressed/nextcloud-cospend/webview.js new file mode 100644 index 0000000..53496fe --- /dev/null +++ b/uncompressed/nextcloud-cospend/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 | }; | ||