* Fix i18n page titles

* fix frontend crash in npu stats

* return empty object for gpu_usages if null

* fix gpu info i18n keys
This commit is contained in:
Josh Hawkins 2025-04-29 17:03:44 -05:00 committed by GitHub
parent c91c6970de
commit a9f139e062
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 11 deletions

View File

@ -6,9 +6,10 @@
"classification": "Classification Settings - Frigate", "classification": "Classification Settings - Frigate",
"masksAndZones": "Mask and Zone Editor - Frigate", "masksAndZones": "Mask and Zone Editor - Frigate",
"motionTuner": "Motion Tuner - Frigate", "motionTuner": "Motion Tuner - Frigate",
"object": "Object Settings - Frigate", "object": "Debug - Frigate",
"general": "General Settings - Frigate", "general": "General Settings - Frigate",
"frigatePlus": "Frigate+ Settings - Frigate" "frigatePlus": "Frigate+ Settings - Frigate",
"notifications": "Notification Settings - Frigate"
}, },
"menu": { "menu": {
"ui": "UI", "ui": "UI",

View File

@ -108,7 +108,7 @@ export default function GPUInfoDialog({
<br /> <br />
<div> <div>
{t("general.hardwareInfo.gpuInfo.nvidiaSMIOutput.driver", { {t("general.hardwareInfo.gpuInfo.nvidiaSMIOutput.driver", {
name: nvinfo["0"].driver, driver: nvinfo["0"].driver,
})} })}
</div> </div>
<br /> <br />
@ -116,14 +116,14 @@ export default function GPUInfoDialog({
{t( {t(
"general.hardwareInfo.gpuInfo.nvidiaSMIOutput.cudaComputerCapability", "general.hardwareInfo.gpuInfo.nvidiaSMIOutput.cudaComputerCapability",
{ {
name: nvinfo["0"].cuda_compute, cuda_compute: nvinfo["0"].cuda_compute,
}, },
)} )}
</div> </div>
<br /> <br />
<div> <div>
{t("general.hardwareInfo.gpuInfo.nvidiaSMIOutput.vbios", { {t("general.hardwareInfo.gpuInfo.nvidiaSMIOutput.vbios", {
name: nvinfo["0"].vbios, vbios: nvinfo["0"].vbios,
})} })}
</div> </div>
</div> </div>

View File

@ -251,8 +251,8 @@ export default function CameraSettingsView({
} }
useEffect(() => { useEffect(() => {
document.title = "Camera Settings - Frigate"; document.title = t("documentTitle.camera");
}, []); }, [t]);
if (!cameraConfig && !selectedCamera) { if (!cameraConfig && !selectedCamera) {
return <ActivityIndicator />; return <ActivityIndicator />;

View File

@ -299,6 +299,10 @@ export default function NotificationView({
saveToConfig(values as NotificationSettingsValueType); saveToConfig(values as NotificationSettingsValueType);
} }
useEffect(() => {
document.title = t("documentTitle.notifications");
}, [t]);
if (!("Notification" in window) || !window.isSecureContext) { if (!("Notification" in window) || !window.isSecureContext) {
return ( return (
<div className="scrollbar-container order-last mb-10 mt-2 flex h-full w-full flex-col overflow-y-auto rounded-lg border-[1px] border-secondary-foreground bg-background_alt p-2 md:order-none md:mb-0 md:mr-2 md:mt-0"> <div className="scrollbar-container order-last mb-10 mt-2 flex h-full w-full flex-col overflow-y-auto rounded-lg border-[1px] border-secondary-foreground bg-background_alt p-2 md:order-none md:mb-0 md:mr-2 md:mt-0">

View File

@ -240,7 +240,7 @@ export default function GeneralMetrics({
return; return;
} }
Object.entries(stats.gpu_usages || []).forEach(([key, stats]) => { Object.entries(stats.gpu_usages || {}).forEach(([key, stats]) => {
if (!(key in series)) { if (!(key in series)) {
series[key] = { name: key, data: [] }; series[key] = { name: key, data: [] };
} }
@ -316,7 +316,7 @@ export default function GeneralMetrics({
return; return;
} }
Object.entries(stats.gpu_usages || []).forEach(([key, stats]) => { Object.entries(stats.gpu_usages || {}).forEach(([key, stats]) => {
if (!(key in series)) { if (!(key in series)) {
series[key] = { name: key, data: [] }; series[key] = { name: key, data: [] };
} }
@ -350,7 +350,7 @@ export default function GeneralMetrics({
return; return;
} }
Object.entries(stats.gpu_usages || []).forEach(([key, stats]) => { Object.entries(stats.gpu_usages || {}).forEach(([key, stats]) => {
if (!(key in series)) { if (!(key in series)) {
series[key] = { name: key, data: [] }; series[key] = { name: key, data: [] };
} }
@ -386,7 +386,7 @@ export default function GeneralMetrics({
return; return;
} }
Object.entries(stats.npu_usages || []).forEach(([key, stats]) => { Object.entries(stats.npu_usages || {}).forEach(([key, stats]) => {
if (!(key in series)) { if (!(key in series)) {
series[key] = { name: key, data: [] }; series[key] = { name: key, data: [] };
} }