From 6f5e4a00588aefdda7a5a1cfe70935870e7e234a Mon Sep 17 00:00:00 2001 From: Bennett Date: Tue, 22 Sep 2020 20:56:48 +0200 Subject: Unpack recipes and update recipes icons (#292) Co-authored-by: Amine Mouafik --- recipes/wrike/LICENSE | 21 +++++++++++++++++++++ recipes/wrike/README.md | 23 +++++++++++++++++++++++ recipes/wrike/icon.png | Bin 0 -> 7990 bytes recipes/wrike/icon.svg | 1 + recipes/wrike/index.js | 4 ++++ recipes/wrike/package.json | 13 +++++++++++++ recipes/wrike/webview.js | 16 ++++++++++++++++ 7 files changed, 78 insertions(+) create mode 100644 recipes/wrike/LICENSE create mode 100644 recipes/wrike/README.md create mode 100644 recipes/wrike/icon.png create mode 100644 recipes/wrike/icon.svg create mode 100644 recipes/wrike/index.js create mode 100644 recipes/wrike/package.json create mode 100644 recipes/wrike/webview.js (limited to 'recipes/wrike') diff --git a/recipes/wrike/LICENSE b/recipes/wrike/LICENSE new file mode 100644 index 0000000..eee14ce --- /dev/null +++ b/recipes/wrike/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Koma + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/recipes/wrike/README.md b/recipes/wrike/README.md new file mode 100644 index 0000000..e079838 --- /dev/null +++ b/recipes/wrike/README.md @@ -0,0 +1,23 @@ +# Wrike +Recipe for [Wrike](https://www.wrike.com) integration with [Franz 5](http://meetfranz.com) + +## To test this dev release + +1. Clone/download the folder `recipe-wrike`. + +2. Open the Franz Recipe folder on your machine: + * Mac: `~/Library/Application Support/Franz/recipes/` + * Windows: `%appdata%/Franz/recipes/` + * Linux: `~/.config/Franz/recipes/` + +3. Create a `dev` folder if you have not already done so + +3. Unzip and copy the `recipe-wrike` folder into the recipes dev directory + +4. Restart Franz + +## How to create your own Franz recipes: +[Read the documentation](https://github.com/meetfranz/plugins) + +## Authors +[Koma](https://github.com/koma-private/) diff --git a/recipes/wrike/icon.png b/recipes/wrike/icon.png new file mode 100644 index 0000000..18e46cc Binary files /dev/null and b/recipes/wrike/icon.png differ diff --git a/recipes/wrike/icon.svg b/recipes/wrike/icon.svg new file mode 100644 index 0000000..d577b7c --- /dev/null +++ b/recipes/wrike/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/wrike/index.js b/recipes/wrike/index.js new file mode 100644 index 0000000..8fbf1bf --- /dev/null +++ b/recipes/wrike/index.js @@ -0,0 +1,4 @@ +'use strict'; + +// just pass through Franz +module.exports = Franz => Franz; \ No newline at end of file diff --git a/recipes/wrike/package.json b/recipes/wrike/package.json new file mode 100644 index 0000000..7b61255 --- /dev/null +++ b/recipes/wrike/package.json @@ -0,0 +1,13 @@ +{ + "id": "wrike", + "name": "Wrike", + "version": "1.0.1", + "description": "Project management SaaS", + "main": "index.js", + "author": "Koma", + "license": "MIT", + "repository": "https://github.com/koma-private/recipe-wrike", + "config": { + "serviceURL": "https://www.wrike.com/login/" + } +} diff --git a/recipes/wrike/webview.js b/recipes/wrike/webview.js new file mode 100644 index 0000000..7aaeba4 --- /dev/null +++ b/recipes/wrike/webview.js @@ -0,0 +1,16 @@ +'use strict'; + +module.exports = (Franz, options) => { + function getMessages() { + let directCount = 0; + let element = document.querySelector('.ws-navigation-button__indicator.ws-navigation-button-indicator'); + + if (element && element.innerText) { + directCount = parseInt(element.innerText); + } + + Franz.setBadge(directCount); + } + + Franz.loop(getMessages); +} -- cgit v1.2.3-70-g09d2