From 679aff4a8d607ffb4b6cf0ed3a71c8d637d27d94 Mon Sep 17 00:00:00 2001 From: Kevin <39208150+Kvrnn@users.noreply.github.com> Date: Sun, 7 Apr 2024 23:01:45 -0700 Subject: [PATCH] adding todoist entry to base Adding Todoist to the base files to allow configuration for the widget --- src/utils/config/service-helpers.js | 6 ++++++ src/utils/proxy/handlers/credentialed.js | 2 +- src/widgets/components.js | 1 + src/widgets/widgets.js | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index d6552253f..b200fb11f 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -452,6 +452,9 @@ export function cleanServiceGroups(groups) { enablePools, nasType, + // todoist + categories, + // unifi site, } = cleanedService.widget; @@ -525,6 +528,9 @@ export function cleanServiceGroups(groups) { if (enablePools !== undefined) cleanedService.widget.enablePools = JSON.parse(enablePools); if (nasType !== undefined) cleanedService.widget.nasType = nasType; } + if (type === "todoist") { + if (categories !== undefined) cleanedService.widget.categories = categories; + } if (["diskstation", "qnap"].includes(type)) { if (volume) cleanedService.widget.volume = volume; } diff --git a/src/utils/proxy/handlers/credentialed.js b/src/utils/proxy/handlers/credentialed.js index de2111b12..93d07c411 100644 --- a/src/utils/proxy/handlers/credentialed.js +++ b/src/utils/proxy/handlers/credentialed.js @@ -29,7 +29,7 @@ export default async function credentialedProxyHandler(req, res, map) { } else if (widget.type === "gotify") { headers["X-gotify-Key"] = `${widget.key}`; } else if ( - ["authentik", "cloudflared", "ghostfolio", "mealie", "tailscale", "tandoor", "pterodactyl"].includes( + ["authentik", "cloudflared", "ghostfolio", "mealie", "tailscale", "tandoor", "pterodactyl", "todoist"].includes( widget.type, ) ) { diff --git a/src/widgets/components.js b/src/widgets/components.js index 500fe0ce7..1b409b794 100644 --- a/src/widgets/components.js +++ b/src/widgets/components.js @@ -107,6 +107,7 @@ const components = { tandoor: dynamic(() => import("./tandoor/component")), tautulli: dynamic(() => import("./tautulli/component")), tdarr: dynamic(() => import("./tdarr/component")), + todoist: dynamic(() => import("./todoist/component")), traefik: dynamic(() => import("./traefik/component")), transmission: dynamic(() => import("./transmission/component")), tubearchivist: dynamic(() => import("./tubearchivist/component")), diff --git a/src/widgets/widgets.js b/src/widgets/widgets.js index 7ed98bfb9..08e66366f 100644 --- a/src/widgets/widgets.js +++ b/src/widgets/widgets.js @@ -98,6 +98,7 @@ import tailscale from "./tailscale/widget"; import tandoor from "./tandoor/widget"; import tautulli from "./tautulli/widget"; import tdarr from "./tdarr/widget"; +import todoist from "./todoist/widget"; import traefik from "./traefik/widget"; import transmission from "./transmission/widget"; import tubearchivist from "./tubearchivist/widget"; @@ -216,6 +217,7 @@ const widgets = { tandoor, tautulli, tdarr, + todoist, traefik, transmission, tubearchivist,