Camera groups (#10223)

* Add camera group config

* Add saving of camera group selection

* Implement camera groups in config and live view

* Fix warnings

* Add tooltips to camera group items on desktop

* Add camera groups to the filters for events

* Fix tooltips and group selection

* Cleanup
This commit is contained in:
Nicolas Mowen
2024-03-04 16:18:30 -07:00
committed by GitHub
parent 38e76666e7
commit b4b2162ada
11 changed files with 247 additions and 40 deletions

View File

@@ -3,14 +3,36 @@ import {
FaAmazon,
FaCarSide,
FaCat,
FaCircle,
FaDog,
FaFedex,
FaFire,
FaLeaf,
FaUps,
} from "react-icons/fa";
import { LuBox, LuLassoSelect } from "react-icons/lu";
import { MdRecordVoiceOver } from "react-icons/md";
export function getIconTypeForGroup(icon: string) {
switch (icon) {
case "car":
return FaCarSide;
case "cat":
return FaCat;
case "dog":
return FaDog;
case "leaf":
return FaLeaf;
default:
return FaCircle;
}
}
export function getIconForGroup(icon: string, className: string = "size-4") {
const GroupIcon = getIconTypeForGroup(icon);
return <GroupIcon className={className} />;
}
export function getIconForLabel(label: string, className?: string) {
switch (label) {
case "car":