mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
Miscellaneous Fixes (0.17 beta) (#21474)
* disable modal on dropdown menu in explore * add another example case for when classification overrides a sub label * update ollama docs link * Improve handling of automatic playback for recordings * Improve ollama documentation * Don't fall out when all recording segments exist * clarify coral docs * improve initial scroll to active item in detail stream * i18n fixes * remove console warning * detail stream scrolling fixes for HA/iOS * Improve usability of GenAI summary dialog and make clicking on the description directly open it * Review card too * Use empty card with dynamic text for review based on the user's config --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
fb9604fbcc
commit
e0d6365f62
@@ -2,15 +2,18 @@ import React from "react";
|
||||
import { Button } from "../ui/button";
|
||||
import Heading from "../ui/heading";
|
||||
import { Link } from "react-router-dom";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type EmptyCardProps = {
|
||||
className?: string;
|
||||
icon: React.ReactNode;
|
||||
title: string;
|
||||
description: string;
|
||||
description?: string;
|
||||
buttonText?: string;
|
||||
link?: string;
|
||||
};
|
||||
export function EmptyCard({
|
||||
className,
|
||||
icon,
|
||||
title,
|
||||
description,
|
||||
@@ -18,10 +21,12 @@ export function EmptyCard({
|
||||
link,
|
||||
}: EmptyCardProps) {
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<div className={cn("flex flex-col items-center gap-2", className)}>
|
||||
{icon}
|
||||
<Heading as="h4">{title}</Heading>
|
||||
<div className="mb-3 text-secondary-foreground">{description}</div>
|
||||
{description && (
|
||||
<div className="mb-3 text-secondary-foreground">{description}</div>
|
||||
)}
|
||||
{buttonText?.length && (
|
||||
<Button size="sm" variant="select">
|
||||
<Link to={link ?? "#"}>{buttonText}</Link>
|
||||
|
||||
@@ -39,6 +39,7 @@ import { Trans, useTranslation } from "react-i18next";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { LuCircle } from "react-icons/lu";
|
||||
import { MdAutoAwesome } from "react-icons/md";
|
||||
import { GenAISummaryDialog } from "../overlay/chip/GenAISummaryChip";
|
||||
|
||||
type ReviewCardProps = {
|
||||
event: ReviewSegment;
|
||||
@@ -219,12 +220,14 @@ export default function ReviewCard({
|
||||
/>
|
||||
</div>
|
||||
{event.data.metadata?.title && (
|
||||
<div className="flex items-center gap-1.5 rounded bg-secondary/50">
|
||||
<MdAutoAwesome className="size-3 shrink-0 text-primary" />
|
||||
<span className="truncate text-xs text-primary">
|
||||
{event.data.metadata.title}
|
||||
</span>
|
||||
</div>
|
||||
<GenAISummaryDialog review={event}>
|
||||
<div className="flex items-center gap-1.5 rounded bg-secondary/50 hover:underline">
|
||||
<MdAutoAwesome className="size-3 shrink-0 text-primary" />
|
||||
<span className="truncate text-xs text-primary">
|
||||
{event.data.metadata.title}
|
||||
</span>
|
||||
</div>
|
||||
</GenAISummaryDialog>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user