added missing Settings functionality, moved ntfy setting

This commit is contained in:
PxlLoewe
2025-07-17 01:08:10 -07:00
parent 44427a1b4b
commit 11b1d8745d
9 changed files with 141 additions and 150 deletions

View File

@@ -47,27 +47,28 @@ export default function MicrophoneLevel({ deviceId, volumeInput }: MicrophoneLev
};
}, [deviceId, volumeInput]);
const barWidth = Math.max((volumeLevel / 70) * 100 - 35, 0);
const barWidth = Math.min((volumeLevel / 140) * 100, 100);
return (
<div className="w-full">
<div className="relative w-full bg-base-300 h-5 rounded">
<div
className={cn("bg-primary h-full rounded", barWidth > 100 && "bg-red-400")}
className={cn("bg-primary h-full rounded", barWidth == 100 && "bg-red-400")}
style={{
width: `${barWidth > 100 ? 100 : barWidth}%`,
width: `${barWidth}%`,
transition: "width 0.2s",
}}
/>
<div
className="absolute top-0 left-[60%] w-[20%] h-full bg-green-500 opacity-40 rounded"
className="absolute top-0 left-[60%] w-[30%] h-full bg-green-500 opacity-40 rounded"
style={{
transform: "translateX(-50%)",
}}
/>
</div>
<p className="text-gray-500 text-sm">
Lautstärke sollte beim Sprechen in dem Grünen bereich bleiben
Lautstärke sollte beim Sprechen in dem Grünen bereich bleiben. Beachte das scharfe Laute
(z.B. "S" oder "Z") die Anzeige verfälschen können.
</p>
</div>
);