diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/plek/icon.svg | 35 | ||||
-rw-r--r-- | recipes/plek/index.js | 1 | ||||
-rw-r--r-- | recipes/plek/package.json | 14 | ||||
-rw-r--r-- | recipes/plek/service.css | 0 | ||||
-rw-r--r-- | recipes/plek/webview.js | 25 |
5 files changed, 75 insertions, 0 deletions
diff --git a/recipes/plek/icon.svg b/recipes/plek/icon.svg new file mode 100644 index 0000000..3117f5c --- /dev/null +++ b/recipes/plek/icon.svg | |||
@@ -0,0 +1,35 @@ | |||
1 | <?xml version='1.0' encoding='UTF-8'?> | ||
2 | <!-- Made by gio1135 using Gravit.io --> | ||
3 | <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='isolation:isolate' viewBox='0 0 800 800' width='800' height='800'> | ||
4 | <defs> | ||
5 | <clipPath id='_clipPath_WSMg3MB2SE1NraJ1nyjih3IvGqHIGkkg'> | ||
6 | <rect width='800' height='800' /> | ||
7 | </clipPath> | ||
8 | </defs> | ||
9 | <g clip-path='url(#_clipPath_WSMg3MB2SE1NraJ1nyjih3IvGqHIGkkg)'> | ||
10 | <mask id='_mask_2BvtN9yaMg7qtna9I8S2XY65cqmsSlGm'> | ||
11 | <path d=' M 800 400 C 800 179.234 620.766 0 400 0 C 179.234 0 0 179.234 0 400 C 0 620.766 179.234 800 400 800 Q 402.471 800 724.438 800 C 766.142 800 800 766.142 800 724.438 Q 800 402.471 800 400 Z ' fill='white' stroke='none' /> | ||
12 | </mask> | ||
13 | <linearGradient id='_lgradient_6' x1='0%' y1='50%' x2='6.123233995736766e-15%' y2='150%'> | ||
14 | <stop offset='0%' stop-opacity='1' style='stop-color:rgb(246,200,68)' /> | ||
15 | <stop offset='22.17391304347826%' stop-opacity='1' style='stop-color:rgb(244,186,21)' /> | ||
16 | <stop offset='100%' stop-opacity='1' style='stop-color:rgb(195,149,17)' /> | ||
17 | </linearGradient> | ||
18 | <path d=' M 800 400 C 800 179.234 620.766 0 400 0 C 179.234 0 0 179.234 0 400 C 0 620.766 179.234 800 400 800 Q 402.471 800 724.438 800 C 766.142 800 800 766.142 800 724.438 Q 800 402.471 800 400 Z ' fill='rgb(244,186,21)' mask='url(#_mask_2BvtN9yaMg7qtna9I8S2XY65cqmsSlGm)' vector-effect='non-scaling-stroke' stroke-width='8' stroke='url(#_lgradient_6)' stroke-linejoin='round' stroke-linecap='round' stroke-miterlimit='3' /> | ||
19 | <path d=' M 526 800 Q 527.511 800 724.438 800 C 766.142 800 800 766.142 800 724.438 Q 800 525.526 800 524 L 549.421 273.421 L 274.421 548.421 L 526 800 L 526 800 Z ' fill='rgb(0,0,0)' fill-opacity='0.1' /> | ||
20 | <defs> | ||
21 | <filter id='AGwOQbVrNSbfUAymiSmBjNxoViV51mlH' x='-200%' y='-200%' width='400%' height='400%'> | ||
22 | <feGaussianBlur stdDeviation='8.587218125678056' /> | ||
23 | </filter> | ||
24 | </defs> | ||
25 | <g filter='url(#AGwOQbVrNSbfUAymiSmBjNxoViV51mlH)'> | ||
26 | <path d=' M 600 409 C 600 298.617 510.383 209 400 209 C 289.617 209 200 298.617 200 409 C 200 519.383 289.617 609 400 609 C 452.899 609 501.029 588.418 536.812 554.833 L 582 603 Q 587.144 606.248 590 605 Q 592.782 603.785 594 598 Q 600 413.326 600 409 Z ' fill='rgb(0,0,0)' fill-opacity='0.2' /> | ||
27 | </g> | ||
28 | <linearGradient id='_lgradient_7' x1='49.0990990990991%' y1='50%' x2='50.00000000000002%' y2='100%'> | ||
29 | <stop offset='0%' stop-opacity='1' style='stop-color:rgb(255,255,255)' /> | ||
30 | <stop offset='100%' stop-opacity='1' style='stop-color:rgb(221,221,221)' /> | ||
31 | </linearGradient> | ||
32 | <path d=' M 600 400 C 600 289.617 510.383 200 400 200 C 289.617 200 200 289.617 200 400 C 200 510.383 289.617 600 400 600 C 452.899 600 501.029 579.418 536.812 545.833 L 582 594 Q 587.144 597.248 590 596 Q 592.782 594.785 594 589 Q 600 404.326 600 400 Z ' fill='rgb(255,255,255)' vector-effect='non-scaling-stroke' stroke-width='2' stroke='url(#_lgradient_7)' stroke-linejoin='miter' stroke-linecap='square' stroke-miterlimit='3' /> | ||
33 | <path d=' M 599.995 398.637 C 599.254 289.984 509.923 202 400 202 C 289.617 202 200 290.721 200 400 L 400 400 L 599.995 398.637 Z ' fill='rgb(0,0,0)' fill-opacity='0.1' /> | ||
34 | </g> | ||
35 | </svg> \ No newline at end of file | ||
diff --git a/recipes/plek/index.js b/recipes/plek/index.js new file mode 100644 index 0000000..23607bd --- /dev/null +++ b/recipes/plek/index.js | |||
@@ -0,0 +1 @@ | |||
module.exports = Ferdi => Ferdi; | |||
diff --git a/recipes/plek/package.json b/recipes/plek/package.json new file mode 100644 index 0000000..de37a6e --- /dev/null +++ b/recipes/plek/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "plek", | ||
3 | "name": "Plek", | ||
4 | "version": "1.0.0", | ||
5 | "repository": "https://github.com/jsimonetti/franz-recipe-plek", | ||
6 | "license": "MIT", | ||
7 | "config": { | ||
8 | "serviceURL": "https://{teamId}.plek.co", | ||
9 | "hasNotificationSound": true, | ||
10 | "hasIndirectMessages": true, | ||
11 | "hasTeamId": true, | ||
12 | "disablewebsecurity": true | ||
13 | } | ||
14 | } | ||
diff --git a/recipes/plek/service.css b/recipes/plek/service.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/recipes/plek/service.css | |||
diff --git a/recipes/plek/webview.js b/recipes/plek/webview.js new file mode 100644 index 0000000..bc6d5aa --- /dev/null +++ b/recipes/plek/webview.js | |||
@@ -0,0 +1,25 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
4 | |||
5 | module.exports = (Ferdi) => { | ||
6 | const getMessages = () => { | ||
7 | let directMessages = 0; | ||
8 | let indirectMessages = 0; | ||
9 | |||
10 | const elements = document.querySelectorAll('.counter'); | ||
11 | for (let i = 0; i < elements.length; i += 1) { | ||
12 | directMessages += Ferdi.safeParseInt(elements[i].innerText); | ||
13 | } | ||
14 | |||
15 | const elements2 = document.querySelectorAll('.badge'); | ||
16 | for (let i = 0; i < elements2.length; i += 1) { | ||
17 | indirectMessages += Ferdi.safeParseInt(elements2[i].innerText); | ||
18 | } | ||
19 | |||
20 | Ferdi.setBadge(directMessages, indirectMessages); | ||
21 | }; | ||
22 | |||
23 | Ferdi.loop(getMessages); | ||
24 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
25 | }; | ||