mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-30 19:09:13 +01:00
Don't show submit to frigate plus card if plus is disabled (#14319)
This commit is contained in:
parent
e8b2fde753
commit
92ac025e43
@ -536,57 +536,59 @@ function ObjectSnapshotTab({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</TransformComponent>
|
</TransformComponent>
|
||||||
<Card className="p-1 text-sm md:p-2">
|
{search.plus_id !== "not_enabled" && (
|
||||||
<CardContent className="flex flex-col items-center justify-between gap-3 p-2 md:flex-row">
|
<Card className="p-1 text-sm md:p-2">
|
||||||
<div className={cn("flex flex-col space-y-3")}>
|
<CardContent className="flex flex-col items-center justify-between gap-3 p-2 md:flex-row">
|
||||||
<div
|
<div className={cn("flex flex-col space-y-3")}>
|
||||||
className={
|
<div
|
||||||
"text-lg font-semibold leading-none tracking-tight"
|
className={
|
||||||
}
|
"text-lg font-semibold leading-none tracking-tight"
|
||||||
>
|
}
|
||||||
Submit To Frigate+
|
>
|
||||||
</div>
|
Submit To Frigate+
|
||||||
<div className="text-sm text-muted-foreground">
|
|
||||||
Objects in locations you want to avoid are not false
|
|
||||||
positives. Submitting them as false positives will confuse
|
|
||||||
the model.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex flex-row justify-center gap-2 md:justify-end">
|
|
||||||
{state == "reviewing" && search.end_time && (
|
|
||||||
<>
|
|
||||||
<Button
|
|
||||||
className="bg-success"
|
|
||||||
onClick={() => {
|
|
||||||
setState("uploading");
|
|
||||||
onSubmitToPlus(false);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
This is a {search?.label}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
className="text-white"
|
|
||||||
variant="destructive"
|
|
||||||
onClick={() => {
|
|
||||||
setState("uploading");
|
|
||||||
onSubmitToPlus(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
This is not a {search?.label}
|
|
||||||
</Button>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{state == "uploading" && <ActivityIndicator />}
|
|
||||||
{state == "submitted" && (
|
|
||||||
<div className="flex flex-row items-center justify-center gap-2">
|
|
||||||
<FaCheckCircle className="text-success" />
|
|
||||||
Submitted
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
<div className="text-sm text-muted-foreground">
|
||||||
</div>
|
Objects in locations you want to avoid are not false
|
||||||
</CardContent>
|
positives. Submitting them as false positives will confuse
|
||||||
</Card>
|
the model.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row justify-center gap-2 md:justify-end">
|
||||||
|
{state == "reviewing" && search.end_time && (
|
||||||
|
<>
|
||||||
|
<Button
|
||||||
|
className="bg-success"
|
||||||
|
onClick={() => {
|
||||||
|
setState("uploading");
|
||||||
|
onSubmitToPlus(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
This is a {search?.label}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
className="text-white"
|
||||||
|
variant="destructive"
|
||||||
|
onClick={() => {
|
||||||
|
setState("uploading");
|
||||||
|
onSubmitToPlus(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
This is not a {search?.label}
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{state == "uploading" && <ActivityIndicator />}
|
||||||
|
{state == "submitted" && (
|
||||||
|
<div className="flex flex-row items-center justify-center gap-2">
|
||||||
|
<FaCheckCircle className="text-success" />
|
||||||
|
Submitted
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</TransformWrapper>
|
</TransformWrapper>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user