Fix and final touch to use transulations
This commit is contained in:
parent
52c6ee2c98
commit
d475411db4
@ -92,6 +92,9 @@
|
|||||||
"episodes": "Episodes",
|
"episodes": "Episodes",
|
||||||
"songs": "Songs"
|
"songs": "Songs"
|
||||||
},
|
},
|
||||||
|
"ngrok": {
|
||||||
|
"no_active": "No Active Tunnels"
|
||||||
|
},
|
||||||
"flood": {
|
"flood": {
|
||||||
"download": "Download",
|
"download": "Download",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
|
|||||||
@ -39,6 +39,9 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|||||||
headers.Authorization = `Bearer ${widget.key}`;
|
headers.Authorization = `Bearer ${widget.key}`;
|
||||||
} else if (widget.type === "proxmox") {
|
} else if (widget.type === "proxmox") {
|
||||||
headers.Authorization = `PVEAPIToken=${widget.username}=${widget.password}`;
|
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") {
|
} else if (widget.type === "ngrok") {
|
||||||
headers.Authorization = `Bearer ${widget.key}`;
|
headers.Authorization = `Bearer ${widget.key}`;
|
||||||
headers["Ngrok-Version"] = 2;
|
headers["Ngrok-Version"] = 2;
|
||||||
|
|||||||
@ -21,9 +21,7 @@ export default function Component({ service }) {
|
|||||||
const {
|
const {
|
||||||
data: ngrokData,
|
data: ngrokData,
|
||||||
error: ngrokError
|
error: ngrokError
|
||||||
} = useWidgetAPI(widget,{
|
} = useWidgetAPI(widget);
|
||||||
refreshInterval: 30000,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (ngrokError) {
|
if (ngrokError) {
|
||||||
return <Container error={ngrokError} />;
|
return <Container error={ngrokError} />;
|
||||||
@ -33,7 +31,7 @@ export default function Component({ service }) {
|
|||||||
if(ngrokData.tunnels.length === 0){
|
if(ngrokData.tunnels.length === 0){
|
||||||
return (
|
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">
|
<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>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user