Add more custom colors and improve graph

This commit is contained in:
Nick Mowen 2024-01-02 11:20:32 -07:00
parent 248a045034
commit 08ca024426
3 changed files with 27 additions and 4 deletions

View File

@ -83,19 +83,19 @@ export default function DynamicCameraImage({
<div className="flex absolute right-0 bottom-0 bg-black bg-opacity-20 rounded p-1"> <div className="flex absolute right-0 bottom-0 bg-black bg-opacity-20 rounded p-1">
<MdLeakAdd <MdLeakAdd
className={`${ className={`${
detectingMotion == "ON" ? "text-red-500" : "text-gray-600" detectingMotion == "ON" ? "text-motion" : "text-gray-600"
}`} }`}
/> />
<TbUserScan <TbUserScan
className={`${ className={`${
activeObjects.length > 0 ? "text-cyan-500" : "text-gray-600" activeObjects.length > 0 ? "text-object" : "text-gray-600"
}`} }`}
/> />
{camera.audio.enabled && ( {camera.audio.enabled && (
<LuEar <LuEar
className={`${ className={`${
parseInt(audioRms) >= camera.audio.min_volume parseInt(audioRms) >= camera.audio.min_volume
? "text-orange-500" ? "text-audio"
: "text-gray-600" : "text-gray-600"
}`} }`}
/> />

View File

@ -16,16 +16,35 @@ export default function TimelineGraph({ id, data }: TimelineGraphProps) {
options={{ options={{
chart: { chart: {
id: id, id: id,
selection: {
enabled: false,
},
toolbar: { toolbar: {
show: false, show: false,
}, },
zoom: {
enabled: false,
},
}, },
dataLabels: { enabled: false }, dataLabels: { enabled: false },
grid: { grid: {
show: false, show: false,
}, },
legend: {
show: false,
position: "top",
},
tooltip: {
enabled: false,
},
xaxis: { xaxis: {
type: "datetime", type: "datetime",
axisBorder: {
show: false,
},
axisTicks: {
show: false,
},
labels: { labels: {
show: false, show: false,
}, },
@ -37,7 +56,7 @@ export default function TimelineGraph({ id, data }: TimelineGraphProps) {
}, },
}} }}
series={data} series={data}
height={100} height="100%"
/> />
); );
} }

View File

@ -22,6 +22,10 @@ module.exports = {
ring: "hsl(var(--ring))", ring: "hsl(var(--ring))",
danger: "#ef4444", danger: "#ef4444",
success: "#22c55e", success: "#22c55e",
// detection colors
motion: "#991b1b",
object: "#06b6d4",
audio: "#ea580c",
background: "hsl(var(--background))", background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))", foreground: "hsl(var(--foreground))",
primary: { primary: {