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/sendtask/README.md | 20 +++++++++++++ recipes/sendtask/franz.css | 3 ++ recipes/sendtask/icon.png | Bin 0 -> 115397 bytes recipes/sendtask/icon.svg | 68 ++++++++++++++++++++++++++++++++++++++++++ recipes/sendtask/index.js | 5 ++++ recipes/sendtask/package.json | 15 ++++++++++ recipes/sendtask/webview.js | 21 +++++++++++++ 7 files changed, 132 insertions(+) create mode 100644 recipes/sendtask/README.md create mode 100644 recipes/sendtask/franz.css create mode 100644 recipes/sendtask/icon.png create mode 100644 recipes/sendtask/icon.svg create mode 100644 recipes/sendtask/index.js create mode 100644 recipes/sendtask/package.json create mode 100644 recipes/sendtask/webview.js (limited to 'recipes/sendtask') diff --git a/recipes/sendtask/README.md b/recipes/sendtask/README.md new file mode 100644 index 0000000..ebb4c55 --- /dev/null +++ b/recipes/sendtask/README.md @@ -0,0 +1,20 @@ +# Sendtask +Recipe for [Sendtask](https://www.sendtask.io) integration with [Franz 5](http://meetfranz.com) + +## To test this dev release + +1. Clone/download the folder `sendtask`. + +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 `sendtask` folder into the recipes dev directory + +4. Restart Franz + +## How to create your own Franz recipes: +* [Read the documentation](https://github.com/meetfranz/plugins) diff --git a/recipes/sendtask/franz.css b/recipes/sendtask/franz.css new file mode 100644 index 0000000..09e72fb --- /dev/null +++ b/recipes/sendtask/franz.css @@ -0,0 +1,3 @@ +footer { + display: none !important; +} diff --git a/recipes/sendtask/icon.png b/recipes/sendtask/icon.png new file mode 100644 index 0000000..c3e0bf3 Binary files /dev/null and b/recipes/sendtask/icon.png differ diff --git a/recipes/sendtask/icon.svg b/recipes/sendtask/icon.svg new file mode 100644 index 0000000..b688584 --- /dev/null +++ b/recipes/sendtask/icon.svg @@ -0,0 +1,68 @@ + + + + + + + + + + diff --git a/recipes/sendtask/index.js b/recipes/sendtask/index.js new file mode 100644 index 0000000..eaccd05 --- /dev/null +++ b/recipes/sendtask/index.js @@ -0,0 +1,5 @@ +"use strict"; + +// just pass through Franz +module.exports = Franz => Franz; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbmR0YXNrL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJGcmFueiJdLCJtYXBwaW5ncyI6Ijs7QUFBQTtBQUNBQSxPQUFPQyxPQUFQLEdBQWlCQyxTQUFTQSxLQUExQiIsImZpbGUiOiJzZW5kdGFzay9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIGp1c3QgcGFzcyB0aHJvdWdoIEZyYW56XG5tb2R1bGUuZXhwb3J0cyA9IEZyYW56ID0+IEZyYW56O1xuIl19 \ No newline at end of file diff --git a/recipes/sendtask/package.json b/recipes/sendtask/package.json new file mode 100644 index 0000000..f9d2d29 --- /dev/null +++ b/recipes/sendtask/package.json @@ -0,0 +1,15 @@ +{ + "id": "sendtask", + "name": "Sendtask", + "version": "1.0.2", + "description": "Sendtask", + "main": "index.js", + "author": "Patrick Daniel", + "repository": "https://github.com/patrickdaniel/sendtask-franz", + "license": "MIT", + "config": { + "serviceURL": "https://app.sendtask.io/", + "hasNotificationSound": true, + "hasIndirectMessages": true + } +} diff --git a/recipes/sendtask/webview.js b/recipes/sendtask/webview.js new file mode 100644 index 0000000..d3151ce --- /dev/null +++ b/recipes/sendtask/webview.js @@ -0,0 +1,21 @@ +'use strict'; + +const path = require('path'); + +module.exports = Franz => { + const getMessages = () => { + const inbox = document.querySelector('.topbar-notificationsButton.has-newNotifications'); + const passiveCount = inbox === null ? 0 : 1; + // set Franz badge + // updates => active unread count + // inbox => passive unread count + Franz.setBadge(0, passiveCount); + }; + + // inject franz.css stylesheet + Franz.injectCSS(path.join(__dirname, 'franz.css')); + + // check for new messages every second and update Franz badge + Franz.loop(getMessages); +}; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbmR0YXNrL3dlYnZpZXcuanMiXSwibmFtZXMiOlsicGF0aCIsInJlcXVpcmUiLCJtb2R1bGUiLCJleHBvcnRzIiwiRnJhbnoiLCJnZXRNZXNzYWdlcyIsImluYm94IiwiZG9jdW1lbnQiLCJxdWVyeVNlbGVjdG9yIiwicGFzc2l2ZUNvdW50Iiwic2V0QmFkZ2UiLCJpbmplY3RDU1MiLCJqb2luIiwiX19kaXJuYW1lIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxPQUFPQyxRQUFRLE1BQVIsQ0FBYjs7QUFFQUMsT0FBT0MsT0FBUCxHQUFrQkMsS0FBRCxJQUFXO0FBQzFCLFFBQU1DLGNBQWMsTUFBTTtBQUN4QixVQUFNQyxRQUFRQyxTQUFTQyxhQUFULENBQXVCLGtEQUF2QixDQUFkO0FBQ0EsVUFBTUMsZUFBZUgsVUFBVSxJQUFWLEdBQWlCLENBQWpCLEdBQXFCLENBQTFDO0FBQ0E7QUFDQTtBQUNBO0FBQ0FGLFVBQU1NLFFBQU4sQ0FBZSxDQUFmLEVBQWtCRCxZQUFsQjtBQUNELEdBUEQ7O0FBU0E7QUFDQUwsUUFBTU8sU0FBTixDQUFnQlgsS0FBS1ksSUFBTCxDQUFVQyxTQUFWLEVBQXFCLFdBQXJCLENBQWhCOztBQUVBO0FBQ0FULFFBQU1VLElBQU4sQ0FBV1QsV0FBWDtBQUNELENBZkQiLCJmaWxlIjoic2VuZHRhc2svd2Vidmlldy5qcyIsInNvdXJjZXNDb250ZW50IjpbImNvbnN0IHBhdGggPSByZXF1aXJlKCdwYX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