aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/toggl
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2023-07-26 06:29:03 -0600
committerLibravatar GitHub <noreply@github.com>2023-07-26 17:59:03 +0530
commit9b8f01716774a960073e944823ab727cc867a8f6 (patch)
tree732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/toggl
parentAdd Excalidraw recipe (#393) (diff)
downloadferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.gz
ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.zst
ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.zip
chore: improve lint setup (#397)
- update eslint config to closely mirror the ones from ferdium-app - add .eslintignore - opt in to eslint `reportUnusedDisableDirectives` config option - remove `trailingComma: all` from `prettier` config which is default in `prettier` v3 - autofix or disable a lot of lint issues throughout codebase - add `volta` configuration to `package.json` to autoload correct `node` and `pnpm` versions - upgrade all `eslint` and `prettier` related dependencies to latest - update lint:fix npm script - reformat touched files with prettier - bumped up minor version for all recipes that have changes - introduced injection of 'service.css' where it was missing in many recipes --------- Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'recipes/toggl')
-rw-r--r--recipes/toggl/package.json2
-rw-r--r--recipes/toggl/webview-unsafe.js6
-rw-r--r--recipes/toggl/webview.js14
3 files changed, 13 insertions, 9 deletions
diff --git a/recipes/toggl/package.json b/recipes/toggl/package.json
index 327a91d..76297b1 100644
--- a/recipes/toggl/package.json
+++ b/recipes/toggl/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "toggl", 2 "id": "toggl",
3 "name": "Toggl", 3 "name": "Toggl",
4 "version": "1.3.0", 4 "version": "1.4.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://www.toggl.com/app/timer", 7 "serviceURL": "https://www.toggl.com/app/timer",
diff --git a/recipes/toggl/webview-unsafe.js b/recipes/toggl/webview-unsafe.js
index f657e0c..3e39e3e 100644
--- a/recipes/toggl/webview-unsafe.js
+++ b/recipes/toggl/webview-unsafe.js
@@ -1,6 +1,8 @@
1// only try to update badge once Ferdium API has finished loading 1// only try to update badge once Ferdium API has finished loading
2if (window.ferdium != undefined && window.ferdium.setBadge != undefined) { 2if (window.ferdium !== undefined && window.ferdium.setBadge !== undefined) {
3 var timerRunning = (window.toggl != undefined) && !!(window.toggl.store.getState().view.timer.timeEntry.start); 3 const timerRunning =
4 window.toggl !== undefined &&
5 !!window.toggl.store.getState().view.timer.timeEntry.start;
4 6
5 // Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1") 7 // Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1")
6 window.ferdium.setBadge(0, timerRunning ? 1 : 0); 8 window.ferdium.setBadge(0, timerRunning ? 1 : 0);
diff --git a/recipes/toggl/webview.js b/recipes/toggl/webview.js
index 39ac3c3..22d5a66 100644
--- a/recipes/toggl/webview.js
+++ b/recipes/toggl/webview.js
@@ -1,11 +1,13 @@
1const _path = _interopRequireDefault(require('path')); 1function _interopRequireDefault(obj) {
2 return obj && obj.__esModule ? obj : { default: obj };
3}
2 4
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 5const _path = _interopRequireDefault(require('path'));
4 6
5module.exports = Ferdium => { 7module.exports = Ferdium => {
6 const updateBadge = function updateBadge() { 8 const updateBadge = function updateBadge() {
7 Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js')); 9 Ferdium.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js'));
8 }; 10 };
9 11
10 Ferdium.loop(updateBadge); 12 Ferdium.loop(updateBadge);
11}; 13};