mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
change secondary button variant to be default button
This commit is contained in:
parent
88f5bb2811
commit
2f78f63c51
@ -34,7 +34,6 @@ export default function NewReviewData({
|
|||||||
? "animate-in slide-in-from-top duration-500"
|
? "animate-in slide-in-from-top duration-500"
|
||||||
: "invisible"
|
: "invisible"
|
||||||
} text-center mt-5 mx-auto bg-gray-400 text-white`}
|
} text-center mt-5 mx-auto bg-gray-400 text-white`}
|
||||||
variant="secondary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
pullLatestData();
|
pullLatestData();
|
||||||
if (contentRef.current) {
|
if (contentRef.current) {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ export function LogLevelFilterButton({
|
|||||||
updateLabelFilter,
|
updateLabelFilter,
|
||||||
}: LogLevelFilterButtonProps) {
|
}: LogLevelFilterButtonProps) {
|
||||||
const trigger = (
|
const trigger = (
|
||||||
<Button size="sm" className="flex items-center gap-2" variant="secondary">
|
<Button size="sm" className="flex items-center gap-2">
|
||||||
<FaFilter className="text-secondary-foreground" />
|
<FaFilter className="text-secondary-foreground" />
|
||||||
<div className="hidden md:block text-primary">Filter</div>
|
<div className="hidden md:block text-primary">Filter</div>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -50,7 +50,6 @@ export default function ReviewActionGroup({
|
|||||||
{selectedReviews.length == 1 && (
|
{selectedReviews.length == 1 && (
|
||||||
<Button
|
<Button
|
||||||
className="p-2 flex items-center gap-2"
|
className="p-2 flex items-center gap-2"
|
||||||
variant="secondary"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onExport(selectedReviews[0]);
|
onExport(selectedReviews[0]);
|
||||||
@ -63,7 +62,6 @@ export default function ReviewActionGroup({
|
|||||||
)}
|
)}
|
||||||
<Button
|
<Button
|
||||||
className="p-2 flex items-center gap-2"
|
className="p-2 flex items-center gap-2"
|
||||||
variant="secondary"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={onMarkAsReviewed}
|
onClick={onMarkAsReviewed}
|
||||||
>
|
>
|
||||||
@ -72,7 +70,6 @@ export default function ReviewActionGroup({
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
className="p-2 flex items-center gap-1"
|
className="p-2 flex items-center gap-1"
|
||||||
variant="secondary"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={onDelete}
|
onClick={onDelete}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -223,7 +223,6 @@ function CamerasFilterButton({
|
|||||||
const trigger = (
|
const trigger = (
|
||||||
<Button
|
<Button
|
||||||
className={`flex items-center gap-2 capitalize ${selectedCameras?.length ? "bg-selected hover:bg-selected" : ""}`}
|
className={`flex items-center gap-2 capitalize ${selectedCameras?.length ? "bg-selected hover:bg-selected" : ""}`}
|
||||||
variant="secondary"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
>
|
>
|
||||||
<FaVideo
|
<FaVideo
|
||||||
@ -314,7 +313,6 @@ function CamerasFilterButton({
|
|||||||
Apply
|
Apply
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentCameras(undefined);
|
setCurrentCameras(undefined);
|
||||||
updateCameraFilter(undefined);
|
updateCameraFilter(undefined);
|
||||||
@ -393,7 +391,6 @@ function ShowReviewFilter({
|
|||||||
<Button
|
<Button
|
||||||
className={`block md:hidden duration-0 ${showReviewedSwitch == 1 ? "bg-selected hover:bg-selected" : "bg-secondary hover:bg-secondary/80"}`}
|
className={`block md:hidden duration-0 ${showReviewedSwitch == 1 ? "bg-selected hover:bg-selected" : "bg-secondary hover:bg-secondary/80"}`}
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => setShowReviewedSwitch(showReviewedSwitch == 0 ? 1 : 0)}
|
onClick={() => setShowReviewedSwitch(showReviewedSwitch == 0 ? 1 : 0)}
|
||||||
>
|
>
|
||||||
<FaCheckCircle
|
<FaCheckCircle
|
||||||
@ -423,7 +420,6 @@ function CalendarFilterButton({
|
|||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
className={`flex items-center gap-2 ${day == undefined ? "bg-secondary hover:bg-secondary/80" : "bg-selected hover:bg-selected"}`}
|
className={`flex items-center gap-2 ${day == undefined ? "bg-secondary hover:bg-secondary/80" : "bg-selected hover:bg-selected"}`}
|
||||||
variant="secondary"
|
|
||||||
>
|
>
|
||||||
<FaCalendarAlt
|
<FaCalendarAlt
|
||||||
className={`${day == undefined ? "text-secondary-foreground" : "text-primary"}`}
|
className={`${day == undefined ? "text-secondary-foreground" : "text-primary"}`}
|
||||||
@ -443,7 +439,6 @@ function CalendarFilterButton({
|
|||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<div className="p-2 flex justify-center items-center">
|
<div className="p-2 flex justify-center items-center">
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
updateSelectedDay(undefined);
|
updateSelectedDay(undefined);
|
||||||
}}
|
}}
|
||||||
@ -487,7 +482,7 @@ function GeneralFilterButton({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const trigger = (
|
const trigger = (
|
||||||
<Button size="sm" className="flex items-center gap-2" variant="secondary">
|
<Button size="sm" className="flex items-center gap-2">
|
||||||
<FaFilter className="text-secondary-foreground" />
|
<FaFilter className="text-secondary-foreground" />
|
||||||
<div className="hidden md:block text-primary">Filter</div>
|
<div className="hidden md:block text-primary">Filter</div>
|
||||||
</Button>
|
</Button>
|
||||||
@ -632,7 +627,6 @@ export function GeneralFilterContent({
|
|||||||
Apply
|
Apply
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentLabels(undefined);
|
setCurrentLabels(undefined);
|
||||||
updateLabelFilter(undefined);
|
updateLabelFilter(undefined);
|
||||||
@ -678,7 +672,6 @@ function ShowMotionOnlyButton({
|
|||||||
<div className="block md:hidden">
|
<div className="block md:hidden">
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
className={`duration-0 ${motionOnlyButton ? "bg-selected hover:bg-selected" : "bg-secondary hover:bg-secondary/80"}`}
|
className={`duration-0 ${motionOnlyButton ? "bg-selected hover:bg-selected" : "bg-secondary hover:bg-secondary/80"}`}
|
||||||
onClick={() => setMotionOnlyButton(!motionOnlyButton)}
|
onClick={() => setMotionOnlyButton(!motionOnlyButton)}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -119,7 +119,6 @@ export default function ExportDialog({
|
|||||||
<Trigger asChild>
|
<Trigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className="flex items-center gap-2"
|
className="flex items-center gap-2"
|
||||||
variant="secondary"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setMode("select");
|
setMode("select");
|
||||||
@ -388,7 +387,7 @@ function CustomTimeSelector({
|
|||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className={`text-primary ${isDesktop ? "" : "text-xs"}`}
|
className={`text-primary ${isDesktop ? "" : "text-xs"}`}
|
||||||
variant={startOpen ? "select" : "secondary"}
|
variant={startOpen ? "select" : "default"}
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setStartOpen(true);
|
setStartOpen(true);
|
||||||
@ -450,7 +449,7 @@ function CustomTimeSelector({
|
|||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
className={`text-primary ${isDesktop ? "" : "text-xs"}`}
|
className={`text-primary ${isDesktop ? "" : "text-xs"}`}
|
||||||
variant={endOpen ? "select" : "secondary"}
|
variant={endOpen ? "select" : "default"}
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setEndOpen(true);
|
setEndOpen(true);
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export default function MobileCameraDrawer({
|
|||||||
return (
|
return (
|
||||||
<Drawer open={cameraDrawer} onOpenChange={setCameraDrawer}>
|
<Drawer open={cameraDrawer} onOpenChange={setCameraDrawer}>
|
||||||
<DrawerTrigger asChild>
|
<DrawerTrigger asChild>
|
||||||
<Button className="rounded-lg capitalize" size="sm" variant="secondary">
|
<Button className="rounded-lg capitalize" size="sm">
|
||||||
<FaVideo className="text-secondary-foreground" />
|
<FaVideo className="text-secondary-foreground" />
|
||||||
</Button>
|
</Button>
|
||||||
</DrawerTrigger>
|
</DrawerTrigger>
|
||||||
|
|||||||
@ -138,7 +138,6 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
{features.includes("export") && (
|
{features.includes("export") && (
|
||||||
<Button
|
<Button
|
||||||
className="w-full flex justify-center items-center gap-2"
|
className="w-full flex justify-center items-center gap-2"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => setDrawerMode("export")}
|
onClick={() => setDrawerMode("export")}
|
||||||
>
|
>
|
||||||
<FaArrowDown className="p-1 fill-secondary bg-secondary-foreground rounded-md" />
|
<FaArrowDown className="p-1 fill-secondary bg-secondary-foreground rounded-md" />
|
||||||
@ -148,7 +147,6 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
{features.includes("calendar") && (
|
{features.includes("calendar") && (
|
||||||
<Button
|
<Button
|
||||||
className="w-full flex justify-center items-center gap-2"
|
className="w-full flex justify-center items-center gap-2"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => setDrawerMode("calendar")}
|
onClick={() => setDrawerMode("calendar")}
|
||||||
>
|
>
|
||||||
<FaCalendarAlt className="fill-secondary-foreground" />
|
<FaCalendarAlt className="fill-secondary-foreground" />
|
||||||
@ -158,7 +156,6 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
{features.includes("filter") && (
|
{features.includes("filter") && (
|
||||||
<Button
|
<Button
|
||||||
className="w-full flex justify-center items-center gap-2"
|
className="w-full flex justify-center items-center gap-2"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => setDrawerMode("filter")}
|
onClick={() => setDrawerMode("filter")}
|
||||||
>
|
>
|
||||||
<FaFilter className="fill-secondary-foreground" />
|
<FaFilter className="fill-secondary-foreground" />
|
||||||
@ -223,7 +220,6 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
<SelectSeparator />
|
<SelectSeparator />
|
||||||
<div className="p-2 flex justify-center items-center">
|
<div className="p-2 flex justify-center items-center">
|
||||||
<Button
|
<Button
|
||||||
variant="secondary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpdateFilter({
|
onUpdateFilter({
|
||||||
...filter,
|
...filter,
|
||||||
@ -285,7 +281,6 @@ export default function MobileReviewSettingsDrawer({
|
|||||||
<Button
|
<Button
|
||||||
className="rounded-lg capitalize"
|
className="rounded-lg capitalize"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => setDrawerMode("select")}
|
onClick={() => setDrawerMode("select")}
|
||||||
>
|
>
|
||||||
<FaCog className="text-secondary-foreground" />
|
<FaCog className="text-secondary-foreground" />
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export default function MobileTimelineDrawer({
|
|||||||
return (
|
return (
|
||||||
<Drawer open={drawer} onOpenChange={setDrawer}>
|
<Drawer open={drawer} onOpenChange={setDrawer}>
|
||||||
<DrawerTrigger asChild>
|
<DrawerTrigger asChild>
|
||||||
<Button className="rounded-lg capitalize" size="sm" variant="secondary">
|
<Button className="rounded-lg capitalize" size="sm">
|
||||||
<FaFlag className="text-secondary-foreground" />
|
<FaFlag className="text-secondary-foreground" />
|
||||||
</Button>
|
</Button>
|
||||||
</DrawerTrigger>
|
</DrawerTrigger>
|
||||||
|
|||||||
@ -33,7 +33,6 @@ export default function SaveExportOverlay({
|
|||||||
<Button
|
<Button
|
||||||
className="flex items-center gap-1 text-primary"
|
className="flex items-center gap-1 text-primary"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={onCancel}
|
onClick={onCancel}
|
||||||
>
|
>
|
||||||
<LuX />
|
<LuX />
|
||||||
|
|||||||
@ -44,9 +44,7 @@ export default function VainfoDialog({
|
|||||||
<ActivityIndicator />
|
<ActivityIndicator />
|
||||||
)}
|
)}
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button variant="secondary" onClick={() => setShowVainfo(false)}>
|
<Button onClick={() => setShowVainfo(false)}>Close</Button>
|
||||||
Close
|
|
||||||
</Button>
|
|
||||||
<Button variant="select" onClick={() => onCopyVainfo()}>
|
<Button variant="select" onClick={() => onCopyVainfo()}>
|
||||||
Copy
|
Copy
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -9,14 +9,13 @@ const buttonVariants = cva(
|
|||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
default: "bg-secondary text-primary hover:bg-secondary/80",
|
||||||
select: "bg-selected text-white hover:bg-opacity-90",
|
select: "bg-selected text-white hover:bg-opacity-90",
|
||||||
destructive:
|
destructive:
|
||||||
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
||||||
outline:
|
outline:
|
||||||
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
||||||
secondary:
|
secondary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
||||||
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
||||||
ghost:
|
ghost:
|
||||||
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
"text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
||||||
link: "text-primary underline-offset-4 hover:underline",
|
link: "text-primary underline-offset-4 hover:underline",
|
||||||
|
|||||||
@ -356,7 +356,6 @@ function Logs() {
|
|||||||
<Button
|
<Button
|
||||||
className="flex justify-between items-center gap-2"
|
className="flex justify-between items-center gap-2"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={handleCopyLogs}
|
onClick={handleCopyLogs}
|
||||||
>
|
>
|
||||||
<FaCopy />
|
<FaCopy />
|
||||||
@ -374,7 +373,6 @@ function Logs() {
|
|||||||
{initialScroll && !endVisible && (
|
{initialScroll && !endVisible && (
|
||||||
<Button
|
<Button
|
||||||
className="absolute bottom-8 left-[50%] -translate-x-[50%] rounded-md text-primary bg-secondary-foreground z-20 p-2"
|
className="absolute bottom-8 left-[50%] -translate-x-[50%] rounded-md text-primary bg-secondary-foreground z-20 p-2"
|
||||||
variant="secondary"
|
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
contentRef.current?.scrollTo({
|
contentRef.current?.scrollTo({
|
||||||
top: contentRef.current?.scrollHeight,
|
top: contentRef.current?.scrollHeight,
|
||||||
|
|||||||
@ -237,7 +237,7 @@ function PlusFilterGroup({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Trigger asChild>
|
<Trigger asChild>
|
||||||
<Button size="sm" className="mx-1 capitalize" variant="secondary">
|
<Button size="sm" className="mx-1 capitalize">
|
||||||
<FaVideo className="md:mr-[10px] text-secondary-foreground" />
|
<FaVideo className="md:mr-[10px] text-secondary-foreground" />
|
||||||
<div className="hidden md:block text-primary">
|
<div className="hidden md:block text-primary">
|
||||||
{selectedCameras == undefined
|
{selectedCameras == undefined
|
||||||
@ -314,7 +314,7 @@ function PlusFilterGroup({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Trigger asChild>
|
<Trigger asChild>
|
||||||
<Button size="sm" className="mx-1 capitalize" variant="secondary">
|
<Button size="sm" className="mx-1 capitalize">
|
||||||
<FaList className="md:mr-[10px] text-secondary-foreground" />
|
<FaList className="md:mr-[10px] text-secondary-foreground" />
|
||||||
<div className="hidden md:block text-primary">
|
<div className="hidden md:block text-primary">
|
||||||
{selectedLabels == undefined
|
{selectedLabels == undefined
|
||||||
|
|||||||
@ -254,7 +254,6 @@ export function RecordingView({
|
|||||||
<Button
|
<Button
|
||||||
className="flex items-center gap-2 rounded-lg"
|
className="flex items-center gap-2 rounded-lg"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => navigate(-1)}
|
onClick={() => navigate(-1)}
|
||||||
>
|
>
|
||||||
<IoMdArrowRoundBack className="size-5" size="small" />
|
<IoMdArrowRoundBack className="size-5" size="small" />
|
||||||
|
|||||||
@ -226,7 +226,6 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
|||||||
<Button
|
<Button
|
||||||
className={`flex items-center gap-2.5 rounded-lg`}
|
className={`flex items-center gap-2.5 rounded-lg`}
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => navigate(-1)}
|
onClick={() => navigate(-1)}
|
||||||
>
|
>
|
||||||
<IoMdArrowRoundBack className="size-5" />
|
<IoMdArrowRoundBack className="size-5" />
|
||||||
@ -235,7 +234,6 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
|||||||
<Button
|
<Button
|
||||||
className="flex items-center gap-2.5 rounded-lg"
|
className="flex items-center gap-2.5 rounded-lg"
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="secondary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate("events", {
|
navigate("events", {
|
||||||
state: {
|
state: {
|
||||||
|
|||||||
@ -349,7 +349,6 @@ export default function GeneralMetrics({
|
|||||||
{canGetGpuInfo && (
|
{canGetGpuInfo && (
|
||||||
<Button
|
<Button
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
variant="secondary"
|
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => setShowVainfo(true)}
|
onClick={() => setShowVainfo(true)}
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user