mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Review UI improvements (#11882)
This commit is contained in:
parent
c9d253a320
commit
bb359f67a4
@ -559,14 +559,16 @@ function GeneralFilterButton({
|
|||||||
const trigger = (
|
const trigger = (
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant={selectedLabels?.length ? "select" : "default"}
|
variant={
|
||||||
|
selectedLabels?.length || selectedZones?.length ? "select" : "default"
|
||||||
|
}
|
||||||
className="flex items-center gap-2 capitalize"
|
className="flex items-center gap-2 capitalize"
|
||||||
>
|
>
|
||||||
<FaFilter
|
<FaFilter
|
||||||
className={`${selectedLabels?.length ? "text-selected-foreground" : "text-secondary-foreground"}`}
|
className={`${selectedLabels?.length || selectedZones?.length ? "text-selected-foreground" : "text-secondary-foreground"}`}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className={`hidden md:block ${selectedLabels?.length ? "text-selected-foreground" : "text-primary"}`}
|
className={`hidden md:block ${selectedLabels?.length || selectedZones?.length ? "text-selected-foreground" : "text-primary"}`}
|
||||||
>
|
>
|
||||||
Filter
|
Filter
|
||||||
</div>
|
</div>
|
||||||
@ -641,7 +643,7 @@ type GeneralFilterContentProps = {
|
|||||||
updateLabelFilter: (labels: string[] | undefined) => void;
|
updateLabelFilter: (labels: string[] | undefined) => void;
|
||||||
setCurrentLabels: (labels: string[] | undefined) => void;
|
setCurrentLabels: (labels: string[] | undefined) => void;
|
||||||
updateZoneFilter?: (zones: string[] | undefined) => void;
|
updateZoneFilter?: (zones: string[] | undefined) => void;
|
||||||
setCurrentZones?: (zones: string[] | undefined) => void;
|
setCurrentZones: (zones: string[] | undefined) => void;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
};
|
};
|
||||||
export function GeneralFilterContent({
|
export function GeneralFilterContent({
|
||||||
@ -793,6 +795,7 @@ export function GeneralFilterContent({
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentLabels(undefined);
|
setCurrentLabels(undefined);
|
||||||
|
setCurrentZones(undefined);
|
||||||
updateLabelFilter(undefined);
|
updateLabelFilter(undefined);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -145,11 +145,11 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
{features.includes("filter") && (
|
{features.includes("filter") && (
|
||||||
<Button
|
<Button
|
||||||
className="flex w-full items-center justify-center gap-2"
|
className="flex w-full items-center justify-center gap-2"
|
||||||
variant={filter?.labels ? "select" : "default"}
|
variant={filter?.labels || filter?.zones ? "select" : "default"}
|
||||||
onClick={() => setDrawerMode("filter")}
|
onClick={() => setDrawerMode("filter")}
|
||||||
>
|
>
|
||||||
<FaFilter
|
<FaFilter
|
||||||
className={`${filter?.labels ? "text-selected-foreground" : "text-secondary-foreground"}`}
|
className={`${filter?.labels || filter?.zones ? "text-selected-foreground" : "text-secondary-foreground"}`}
|
||||||
/>
|
/>
|
||||||
Filter
|
Filter
|
||||||
</Button>
|
</Button>
|
||||||
@ -284,12 +284,16 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
<DrawerTrigger asChild>
|
<DrawerTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className="rounded-lg capitalize"
|
className="rounded-lg capitalize"
|
||||||
variant={filter?.labels || filter?.after ? "select" : "default"}
|
variant={
|
||||||
|
filter?.labels || filter?.after || filter?.zones
|
||||||
|
? "select"
|
||||||
|
: "default"
|
||||||
|
}
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => setDrawerMode("select")}
|
onClick={() => setDrawerMode("select")}
|
||||||
>
|
>
|
||||||
<FaCog
|
<FaCog
|
||||||
className={`${filter?.labels || filter?.after ? "text-selected-foreground" : "text-secondary-foreground"}`}
|
className={`${filter?.labels || filter?.after || filter?.zones ? "text-selected-foreground" : "text-secondary-foreground"}`}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
</DrawerTrigger>
|
</DrawerTrigger>
|
||||||
|
Loading…
Reference in New Issue
Block a user