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/asana/LICENSE | 7 +++++++ recipes/asana/README.md | 10 ++++++++++ recipes/asana/icon.png | Bin 0 -> 106555 bytes recipes/asana/icon.svg | 1 + recipes/asana/index.js | 4 ++++ recipes/asana/package.json | 13 +++++++++++++ recipes/asana/service.css | 5 +++++ recipes/asana/webview.js | 23 +++++++++++++++++++++++ 8 files changed, 63 insertions(+) create mode 100644 recipes/asana/LICENSE create mode 100644 recipes/asana/README.md create mode 100644 recipes/asana/icon.png create mode 100644 recipes/asana/icon.svg create mode 100644 recipes/asana/index.js create mode 100644 recipes/asana/package.json create mode 100644 recipes/asana/service.css create mode 100644 recipes/asana/webview.js (limited to 'recipes/asana') diff --git a/recipes/asana/LICENSE b/recipes/asana/LICENSE new file mode 100644 index 0000000..41ea455 --- /dev/null +++ b/recipes/asana/LICENSE @@ -0,0 +1,7 @@ +Copyright 2017 Elnur Mammadov + +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. \ No newline at end of file diff --git a/recipes/asana/README.md b/recipes/asana/README.md new file mode 100644 index 0000000..2d06f2b --- /dev/null +++ b/recipes/asana/README.md @@ -0,0 +1,10 @@ +# Asana for Franz +Asana recipe for Franz 5 ! + +# Installation +1. Open the Franz Plugins folder on your machine (note that this dev directory may not exist yet, and you must create it): + - Mac: ~/Library/Application Support/Franz/recipes/dev/ + - Windows: %appdata%/Franz/recipes/dev/ + - Linux: ~/.config/Franz/recipes/dev +2. Copy the franz-recipe-asana folder into the plugins directory +3. Reload Franz diff --git a/recipes/asana/icon.png b/recipes/asana/icon.png new file mode 100644 index 0000000..8eaed2a Binary files /dev/null and b/recipes/asana/icon.png differ diff --git a/recipes/asana/icon.svg b/recipes/asana/icon.svg new file mode 100644 index 0000000..5d0b078 --- /dev/null +++ b/recipes/asana/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/recipes/asana/index.js b/recipes/asana/index.js new file mode 100644 index 0000000..1a63b14 --- /dev/null +++ b/recipes/asana/index.js @@ -0,0 +1,4 @@ +"use strict"; + +module.exports = Franz => Franz; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndoYXRzYXBwL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQkMsU0FBU0EsS0FBMUIiLCJmaWxlIjoid2hhdHNhcHAvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56O1xuIl19 \ No newline at end of file diff --git a/recipes/asana/package.json b/recipes/asana/package.json new file mode 100644 index 0000000..dbf7ffe --- /dev/null +++ b/recipes/asana/package.json @@ -0,0 +1,13 @@ +{ + "id": "asana", + "name": "Asana", + "version": "1.0.0", + "description": "Asana", + "main": "index.js", + "author": "Elnur Mammadov ", + "license": "MIT", + "config": { + "serviceURL": "https://app.asana.com", + "hasNotificationSound": true + } +} diff --git a/recipes/asana/service.css b/recipes/asana/service.css new file mode 100644 index 0000000..b453fd4 --- /dev/null +++ b/recipes/asana/service.css @@ -0,0 +1,5 @@ +.app-wrapper-web .app { + width: 100% !important; + height: 100% !important; + top: 0 !important; +} diff --git a/recipes/asana/webview.js b/recipes/asana/webview.js new file mode 100644 index 0000000..e9b5810 --- /dev/null +++ b/recipes/asana/webview.js @@ -0,0 +1,23 @@ +'use strict'; + +const path = require('path'); + +module.exports = Franz => { + const getMessages = function getMessages() { + const hasNotification = document.querySelectorAll(".SidebarTopNavLinks-notificationsButton--hasNewNotifications"); + let count = 0; + if (hasNotification.length > 0) { + count +=1; + } + + // set Franz badge + Franz.setBadge(count); + }; + + // inject franz.css stylesheet + Franz.injectCSS(path.join(__dirname, 'service.css')); + + // check for new messages every second and update Franz badge + Franz.loop(getMessages); +}; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndoYXRzYXBwL3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsImVsZW1lbnRzIiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yQWxsIiwiY291bnQiLCJpIiwibGVuZ3RoIiwic2V0QmFkZ2UiLCJpbmplY3RDU1MiLCJqb2luIiwiX19kaXJuYW1lIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxPQUFPQyxRQUFRLE1BQVIsQ0FBYjs7QUFFQUMsT0FBT0MsT0FBUCxHQUFrQkMsS0FBRCxJQUFXO0FBQzFCLFFBQU1DLGNBQWMsU0FBU0EsV0FBVCxHQUF1QjtBQUN6QyxVQUFNQyxXQUFXQyxTQUFTQyxnQkFBVC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