aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/workplace
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/workplace
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/workplace')
-rw-r--r--recipes/workplace/index.js2
-rw-r--r--recipes/workplace/package.json2
-rw-r--r--recipes/workplace/webview.js18
3 files changed, 13 insertions, 9 deletions
diff --git a/recipes/workplace/index.js b/recipes/workplace/index.js
index 258da41..23607bd 100644
--- a/recipes/workplace/index.js
+++ b/recipes/workplace/index.js
@@ -1 +1 @@
module.exports = Franz => Franz; module.exports = Ferdi => Ferdi;
diff --git a/recipes/workplace/package.json b/recipes/workplace/package.json
index 5be0095..61e317c 100644
--- a/recipes/workplace/package.json
+++ b/recipes/workplace/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "workplace", 2 "id": "workplace",
3 "name": "Workplace", 3 "name": "Workplace",
4 "version": "1.2.0", 4 "version": "1.3.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://{teamId}.workplace.com/chat", 7 "serviceURL": "https://{teamId}.workplace.com/chat",
diff --git a/recipes/workplace/webview.js b/recipes/workplace/webview.js
index af2af89..e10c449 100644
--- a/recipes/workplace/webview.js
+++ b/recipes/workplace/webview.js
@@ -1,6 +1,8 @@
1const path = require('path'); 1const _path = _interopRequireDefault(require('path'));
2 2
3module.exports = Franz => { 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5module.exports = Ferdi => {
4 const getMessages = () => { 6 const getMessages = () => {
5 let direct = 0; 7 let direct = 0;
6 let indirect = 0; 8 let indirect = 0;
@@ -23,18 +25,20 @@ module.exports = Franz => {
23 } 25 }
24 } 26 }
25 27
26 Franz.setBadge(direct, indirect); 28 Ferdi.setBadge(direct, indirect);
27 }; 29 };
28 30
29 Franz.injectCSS(path.join(__dirname, 'workplace.css')); 31 Ferdi.loop(getMessages);
30 Franz.loop(getMessages); 32
33 Ferdi.injectCSS(_path.default.join(__dirname, 'workplace.css'));
34
31 localStorage._cs_desktopNotifsEnabled = JSON.stringify({ 35 localStorage._cs_desktopNotifsEnabled = JSON.stringify({
32 __t: new Date().getTime(), 36 __t: new Date().getTime(),
33 __v: true, 37 __v: true,
34 }); 38 });
35 39
36 if (typeof Franz.onNotify === 'function') { 40 if (typeof Ferdi.onNotify === 'function') {
37 Franz.onNotify(notification => { 41 Ferdi.onNotify(notification => {
38 if (typeof notification.title !== 'string') { 42 if (typeof notification.title !== 'string') {
39 notification.title = ((notification.title.props || {}).content || [])[0] || 'Work Chat'; 43 notification.title = ((notification.title.props || {}).content || [])[0] || 'Work Chat';
40 } 44 }