Fix and final touch to use transulations

This commit is contained in:
Dinesh Reddy J 2023-04-21 21:04:33 +05:30
parent 52c6ee2c98
commit d475411db4
3 changed files with 8 additions and 4 deletions

View File

@ -92,6 +92,9 @@
"episodes": "Episodes",
"songs": "Songs"
},
"ngrok": {
"no_active": "No Active Tunnels"
},
"flood": {
"download": "Download",
"upload": "Upload",

View File

@ -39,6 +39,9 @@ export default async function credentialedProxyHandler(req, res, map) {
headers.Authorization = `Bearer ${widget.key}`;
} else if (widget.type === "proxmox") {
headers.Authorization = `PVEAPIToken=${widget.username}=${widget.password}`;
} else if (widget.type === "proxmoxbackupserver") {
delete headers["Content-Type"];
headers.Authorization = `PBSAPIToken=${widget.username}:${widget.password}`;
} else if (widget.type === "ngrok") {
headers.Authorization = `Bearer ${widget.key}`;
headers["Ngrok-Version"] = 2;

View File

@ -21,9 +21,7 @@ export default function Component({ service }) {
const {
data: ngrokData,
error: ngrokError
} = useWidgetAPI(widget,{
refreshInterval: 30000,
});
} = useWidgetAPI(widget);
if (ngrokError) {
return <Container error={ngrokError} />;
@ -33,7 +31,7 @@ export default function Component({ service }) {
if(ngrokData.tunnels.length === 0){
return (
<div className="text-theme-700 dark:text-theme-200 text-xs relative h-5 w-full rounded-md bg-theme-200/50 dark:bg-theme-900/20 mt-1">
<span className="absolute left-2 text-xs mt-[2px]">{t("No Active Tunnels")}</span>
<span className="absolute left-2 text-xs mt-[2px]">{t("ngrok.no_active")}</span>
</div>
);
}