diff --git a/public/locales/en/common.json b/public/locales/en/common.json index d8bfb039d..ecfaec1ca 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -126,7 +126,7 @@ "leech": "Leech", "seed": "Seed" }, - "diskstation": { + "downloadstation": { "download": "Download", "upload": "Upload", "leech": "Leech", diff --git a/src/widgets/components.js b/src/widgets/components.js index eb7c686f7..2146fb79a 100644 --- a/src/widgets/components.js +++ b/src/widgets/components.js @@ -8,7 +8,7 @@ const components = { changedetectionio: dynamic(() => import("./changedetectionio/component")), coinmarketcap: dynamic(() => import("./coinmarketcap/component")), deluge: dynamic(() => import("./deluge/component")), - diskstation: dynamic(() => import("./diskstation/component")), + downloadstation: dynamic(() => import("./downloadstation/component")), docker: dynamic(() => import("./docker/component")), emby: dynamic(() => import("./emby/component")), flood: dynamic(() => import("./flood/component")), diff --git a/src/widgets/diskstation/component.jsx b/src/widgets/downloadstation/component.jsx similarity index 64% rename from src/widgets/diskstation/component.jsx rename to src/widgets/downloadstation/component.jsx index 3a87eebc3..a91d1891c 100644 --- a/src/widgets/diskstation/component.jsx +++ b/src/widgets/downloadstation/component.jsx @@ -17,10 +17,10 @@ export default function Component({ service }) { if (!tasks) { return ( - - - - + + + + ); } @@ -32,10 +32,10 @@ export default function Component({ service }) { return ( - - - - + + + + ); } diff --git a/src/widgets/diskstation/proxy.js b/src/widgets/downloadstation/proxy.js similarity index 92% rename from src/widgets/diskstation/proxy.js rename to src/widgets/downloadstation/proxy.js index af7678152..dc76a3cb9 100644 --- a/src/widgets/diskstation/proxy.js +++ b/src/widgets/downloadstation/proxy.js @@ -4,7 +4,7 @@ import createLogger from "utils/logger"; import widgets from "widgets/widgets"; import getServiceWidget from "utils/config/service-helpers"; -const logger = createLogger("diskstationProxyHandler"); +const logger = createLogger("downloadstationProxyHandler"); const authApi = "{url}/webapi/auth.cgi?api=SYNO.API.Auth&version=2&method=login&account={username}&passwd={password}&session=DownloadStation&format=cookie" async function login(widget) { @@ -34,7 +34,7 @@ async function login(widget) { return [status, contentType, data]; } -export default async function diskstationProxyHandler(req, res) { +export default async function downloadstationProxyHandler(req, res) { const { group, service, endpoint } = req.query; if (!group || !service) { @@ -56,7 +56,7 @@ export default async function diskstationProxyHandler(req, res) { const json = JSON.parse(data.toString()); if (json?.success !== true) { - logger.debug("Logging in to DiskStation"); + logger.debug("Logging in to DownloadStation"); [status, contentType, data] = await login(widget); if (status !== 200) { return res.status(status).end(data) diff --git a/src/widgets/diskstation/widget.js b/src/widgets/downloadstation/widget.js similarity index 71% rename from src/widgets/diskstation/widget.js rename to src/widgets/downloadstation/widget.js index 71187425d..38245adfd 100644 --- a/src/widgets/diskstation/widget.js +++ b/src/widgets/downloadstation/widget.js @@ -1,8 +1,8 @@ -import diskstationProxyHandler from "./proxy"; +import downloadstationProxyHandler from "./proxy"; const widget = { api: "{url}/webapi/DownloadStation/task.cgi?api=SYNO.DownloadStation.Task&version=1&method={endpoint}", - proxyHandler: diskstationProxyHandler, + proxyHandler: downloadstationProxyHandler, mappings: { "list": { diff --git a/src/widgets/widgets.js b/src/widgets/widgets.js index 2b45e55ad..d7d7c2537 100644 --- a/src/widgets/widgets.js +++ b/src/widgets/widgets.js @@ -5,7 +5,7 @@ import bazarr from "./bazarr/widget"; import changedetectionio from "./changedetectionio/widget"; import coinmarketcap from "./coinmarketcap/widget"; import deluge from "./deluge/widget"; -import diskstation from "./diskstation/widget"; +import downloadstation from "./downloadstation/widget"; import emby from "./emby/widget"; import flood from "./flood/widget"; import gluetun from "./gluetun/widget"; @@ -56,7 +56,8 @@ const widgets = { changedetectionio, coinmarketcap, deluge, - diskstation, + diskstation: downloadstation, + downloadstation, emby, flood, gluetun,