mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 22:25:24 +03:00
add close button to all toasters
This commit is contained in:
parent
f0054ceba4
commit
9f015816af
@ -273,7 +273,11 @@ function NewGroupDialog({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Toaster className="toaster group z-[100]" position="top-center" />
|
<Toaster
|
||||||
|
className="toaster group z-[100]"
|
||||||
|
position="top-center"
|
||||||
|
closeButton={true}
|
||||||
|
/>
|
||||||
<Overlay
|
<Overlay
|
||||||
open={open}
|
open={open}
|
||||||
onOpenChange={(open) => {
|
onOpenChange={(open) => {
|
||||||
|
|||||||
@ -366,7 +366,7 @@ export default function MasksAndZones({
|
|||||||
<>
|
<>
|
||||||
{cameraConfig && editingPolygons && (
|
{cameraConfig && editingPolygons && (
|
||||||
<div className="flex flex-col md:flex-row size-full">
|
<div className="flex flex-col md:flex-row size-full">
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<div className="flex flex-col h-full w-full overflow-y-auto mt-2 md:mt-0 mb-10 md:mb-0 md:w-3/12 order-last md:order-none md:mr-2 rounded-lg border-secondary-foreground border-[1px] p-2 bg-background_alt">
|
<div className="flex flex-col h-full w-full overflow-y-auto mt-2 md:mt-0 mb-10 md:mb-0 md:w-3/12 order-last md:order-none md:mr-2 rounded-lg border-secondary-foreground border-[1px] p-2 bg-background_alt">
|
||||||
{editPane == "zone" && (
|
{editPane == "zone" && (
|
||||||
<ZoneEditPane
|
<ZoneEditPane
|
||||||
|
|||||||
@ -183,7 +183,7 @@ export default function MotionMaskEditPane({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<Heading as="h3" className="my-2">
|
<Heading as="h3" className="my-2">
|
||||||
{polygon.name.length ? "Edit" : "New"} Motion Mask
|
{polygon.name.length ? "Edit" : "New"} Motion Mask
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|||||||
@ -169,7 +169,7 @@ export default function MotionTuner({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col md:flex-row size-full">
|
<div className="flex flex-col md:flex-row size-full">
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<div className="flex flex-col h-full w-full overflow-y-auto mt-2 md:mt-0 mb-10 md:mb-0 md:w-3/12 order-last md:order-none md:mr-2 rounded-lg border-secondary-foreground border-[1px] p-2 bg-background_alt">
|
<div className="flex flex-col h-full w-full overflow-y-auto mt-2 md:mt-0 mb-10 md:mb-0 md:w-3/12 order-last md:order-none md:mr-2 rounded-lg border-secondary-foreground border-[1px] p-2 bg-background_alt">
|
||||||
<Heading as="h3" className="my-2">
|
<Heading as="h3" className="my-2">
|
||||||
Motion Detection Tuner
|
Motion Detection Tuner
|
||||||
|
|||||||
@ -245,7 +245,7 @@ export default function ObjectMaskEditPane({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<Heading as="h3" className="my-2">
|
<Heading as="h3" className="my-2">
|
||||||
{polygon.name.length ? "Edit" : "New"} Object Mask
|
{polygon.name.length ? "Edit" : "New"} Object Mask
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export default function ObjectSettings({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col md:flex-row size-full">
|
<div className="flex flex-col md:flex-row size-full">
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<div className="flex flex-col h-full w-full overflow-y-auto mt-2 md:mt-0 mb-10 md:mb-0 md:w-3/12 order-last md:order-none md:mr-2 rounded-lg border-secondary-foreground border-[1px] p-2 bg-background_alt">
|
<div className="flex flex-col h-full w-full overflow-y-auto mt-2 md:mt-0 mb-10 md:mb-0 md:w-3/12 order-last md:order-none md:mr-2 rounded-lg border-secondary-foreground border-[1px] p-2 bg-background_alt">
|
||||||
<Heading as="h3" className="my-2">
|
<Heading as="h3" className="my-2">
|
||||||
Debug
|
Debug
|
||||||
|
|||||||
@ -202,7 +202,7 @@ export default function PolygonItem({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
|
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
|
|||||||
@ -318,7 +318,7 @@ export default function ZoneEditPane({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<Heading as="h3" className="my-2">
|
<Heading as="h3" className="my-2">
|
||||||
{polygon.name.length ? "Edit" : "New"} Zone
|
{polygon.name.length ? "Edit" : "New"} Zone
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|||||||
@ -18,6 +18,8 @@ const Toaster = ({ ...props }: ToasterProps) => {
|
|||||||
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary",
|
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary",
|
||||||
cancelButton:
|
cancelButton:
|
||||||
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
||||||
|
closeButton:
|
||||||
|
"group-[.toast]:bg-secondary border-primary border-[1px]",
|
||||||
success:
|
success:
|
||||||
"group toast group-[.toaster]:bg-success group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
"group toast group-[.toaster]:bg-success group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
||||||
error:
|
error:
|
||||||
|
|||||||
@ -158,7 +158,7 @@ function ConfigEditor() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div ref={configRef} className="h-full mt-2" />
|
<div ref={configRef} className="h-full mt-2" />
|
||||||
<Toaster />
|
<Toaster closeButton={true} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -332,7 +332,7 @@ function Logs() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="size-full p-2 flex flex-col">
|
<div className="size-full p-2 flex flex-col">
|
||||||
<Toaster position="top-center" />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<LogInfoDialog logLine={selectedLog} setLogLine={setSelectedLog} />
|
<LogInfoDialog logLine={selectedLog} setLogLine={setSelectedLog} />
|
||||||
|
|
||||||
<div className="flex justify-between items-center">
|
<div className="flex justify-between items-center">
|
||||||
|
|||||||
@ -238,7 +238,7 @@ export default function EventView({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="py-2 flex flex-col size-full">
|
<div className="py-2 flex flex-col size-full">
|
||||||
<Toaster />
|
<Toaster closeButton={true} />
|
||||||
<div className="h-11 mb-2 pl-3 pr-2 relative flex justify-between items-center">
|
<div className="h-11 mb-2 pl-3 pr-2 relative flex justify-between items-center">
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<Logo className="absolute inset-x-1/2 -translate-x-1/2 h-8" />
|
<Logo className="absolute inset-x-1/2 -translate-x-1/2 h-8" />
|
||||||
|
|||||||
@ -261,7 +261,7 @@ export function RecordingView({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={contentRef} className="size-full pt-2 flex flex-col">
|
<div ref={contentRef} className="size-full pt-2 flex flex-col">
|
||||||
<Toaster />
|
<Toaster closeButton={true} />
|
||||||
<div
|
<div
|
||||||
className={`w-full h-11 mb-2 px-2 relative flex items-center justify-between`}
|
className={`w-full h-11 mb-2 px-2 relative flex items-center justify-between`}
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user