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