mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
UI tweaks (#14326)
* small tweaks for frigate+ submission and debug object list * exclude attributes from labels colormap
This commit is contained in:
parent
1ec459ea3a
commit
833768172d
@ -157,8 +157,16 @@ class ModelConfig(BaseModel):
|
|||||||
self._model_hash = file_hash.hexdigest()
|
self._model_hash = file_hash.hexdigest()
|
||||||
|
|
||||||
def create_colormap(self, enabled_labels: set[str]) -> None:
|
def create_colormap(self, enabled_labels: set[str]) -> None:
|
||||||
"""Get a list of colors for enabled labels."""
|
"""Get a list of colors for enabled labels that aren't attributes."""
|
||||||
colors = generate_color_palette(len(enabled_labels))
|
colors = generate_color_palette(
|
||||||
|
len(
|
||||||
|
list(
|
||||||
|
filter(
|
||||||
|
lambda label: label not in self._all_attributes, enabled_labels
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
self._colormap = {label: color for label, color in zip(enabled_labels, colors)}
|
self._colormap = {label: color for label, color in zip(enabled_labels, colors)}
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ function ObjectSnapshotTab({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</TransformComponent>
|
</TransformComponent>
|
||||||
{search.plus_id !== "not_enabled" && (
|
{search.plus_id !== "not_enabled" && search.end_time && (
|
||||||
<Card className="p-1 text-sm md:p-2">
|
<Card className="p-1 text-sm md:p-2">
|
||||||
<CardContent className="flex flex-col items-center justify-between gap-3 p-2 md:flex-row">
|
<CardContent className="flex flex-col items-center justify-between gap-3 p-2 md:flex-row">
|
||||||
<div className={cn("flex flex-col space-y-3")}>
|
<div className={cn("flex flex-col space-y-3")}>
|
||||||
@ -553,7 +553,7 @@ function ObjectSnapshotTab({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-row justify-center gap-2 md:justify-end">
|
<div className="flex flex-row justify-center gap-2 md:justify-end">
|
||||||
{state == "reviewing" && search.end_time && (
|
{state == "reviewing" && (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
className="bg-success"
|
className="bg-success"
|
||||||
|
@ -307,7 +307,7 @@ function ObjectList(objects?: ObjectType[]) {
|
|||||||
{getIconForLabel(obj.label, "size-5 text-white")}
|
{getIconForLabel(obj.label, "size-5 text-white")}
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-3 text-lg">
|
<div className="ml-3 text-lg">
|
||||||
{capitalizeFirstLetter(obj.label)}
|
{capitalizeFirstLetter(obj.label.replaceAll("_", " "))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex w-8/12 flex-row items-end justify-end">
|
<div className="flex w-8/12 flex-row items-end justify-end">
|
||||||
|
Loading…
Reference in New Issue
Block a user