From 6fdd65ddb56c8c21796f56e4cccd65617dcf4e5e Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 29 May 2026 17:00:30 -0500 Subject: [PATCH] UI tweaks (#23346) * remove redundant per-view toasters in settings * add variants to standardize dialog footer button layouts * remove text-md this class name compiles to nothing in tailwind. we used to add it to prevent iOS from zooming when focusing on an input, but that is now solved via the viewport meta in index.html * make wizard footers consistent with dialog footers * consistent destructive button style remove text-white from individual buttons and add it to the variant --- web/src/components/auth/AuthForm.tsx | 4 +- web/src/components/card/ExportCard.tsx | 3 +- web/src/components/card/SettingsGroupCard.tsx | 2 +- web/src/components/chat/ChatSettings.tsx | 4 +- .../ClassificationModelEditDialog.tsx | 2 +- .../wizard/Step1NameAndDefine.tsx | 6 +- .../classification/wizard/Step2StateArea.tsx | 2 +- .../wizard/Step3ChooseExamples.tsx | 6 +- .../NotificationsSettingsExtras.tsx | 6 +- .../config-form/sections/BaseSection.tsx | 4 +- .../theme/templates/ObjectFieldTemplate.tsx | 2 +- .../theme/widgets/ArrayAsTextWidget.tsx | 2 +- .../theme/widgets/CameraPathWidget.tsx | 2 +- .../config-form/theme/widgets/TextWidget.tsx | 2 +- .../theme/widgets/TextareaWidget.tsx | 2 +- .../components/filter/CameraGroupSelector.tsx | 9 +- .../components/filter/LogSettingsButton.tsx | 4 +- web/src/components/icons/IconPicker.tsx | 2 +- web/src/components/input/InputWithTags.tsx | 2 +- web/src/components/input/NameAndIdFields.tsx | 7 +- web/src/components/input/SaveSearchDialog.tsx | 2 - web/src/components/input/TextEntry.tsx | 2 +- web/src/components/menu/LiveContextMenu.tsx | 2 +- .../components/overlay/CreateRoleDialog.tsx | 54 +++++------ .../overlay/CreateTriggerDialog.tsx | 54 +++++------ .../components/overlay/CreateUserDialog.tsx | 54 +++++------ .../components/overlay/CustomTimeSelector.tsx | 4 +- .../components/overlay/DebugReplayDialog.tsx | 7 +- .../components/overlay/DeleteRoleDialog.tsx | 57 +++++------ .../overlay/DeleteTriggerDialog.tsx | 54 +++++------ .../components/overlay/DeleteUserDialog.tsx | 36 +++---- .../overlay/EditRoleCamerasDialog.tsx | 68 +++++++------ web/src/components/overlay/ExportDialog.tsx | 15 +-- web/src/components/overlay/ImagePicker.tsx | 2 +- .../components/overlay/MultiExportDialog.tsx | 12 +-- .../components/overlay/RoleChangeDialog.tsx | 41 ++++---- .../components/overlay/SetPasswordDialog.tsx | 54 +++++------ .../overlay/ShareTimestampDialog.tsx | 9 +- .../overlay/detail/AnnotationSettingsPane.tsx | 2 +- .../overlay/detail/FaceCreateWizardDialog.tsx | 6 +- .../overlay/detail/SearchDetailDialog.tsx | 4 +- .../overlay/detail/TrackingDetails.tsx | 4 +- .../overlay/dialog/DeleteCameraDialog.tsx | 96 ++++++++----------- .../overlay/dialog/FrigatePlusDialog.tsx | 2 +- .../overlay/dialog/MultiSelectDialog.tsx | 4 +- .../overlay/dialog/OptionAndInputDialog.tsx | 10 +- .../overlay/dialog/SearchFilterDialog.tsx | 4 +- .../overlay/dialog/TextEntryDialog.tsx | 4 +- web/src/components/player/LivePlayer.tsx | 2 +- .../components/settings/CloneCameraDialog.tsx | 4 +- .../settings/MotionMaskEditPane.tsx | 2 - .../settings/ObjectMaskEditPane.tsx | 2 - web/src/components/settings/PolygonItem.tsx | 6 +- .../components/settings/SearchSettings.tsx | 12 +-- web/src/components/settings/ZoneEditPane.tsx | 16 ++-- .../settings/wizard/Step1NameCamera.tsx | 14 +-- .../settings/wizard/Step2ProbeOrSnapshot.tsx | 8 +- .../settings/wizard/Step3StreamConfig.tsx | 2 +- .../settings/wizard/Step4Validation.tsx | 2 +- .../trigger/wizard/Step1NameAndType.tsx | 11 +-- .../trigger/wizard/Step2ConfigureData.tsx | 11 +-- .../wizard/Step3ThresholdAndActions.tsx | 11 +-- web/src/components/ui/alert-dialog.tsx | 32 ++++++- web/src/components/ui/button.tsx | 3 +- web/src/components/ui/dialog.tsx | 28 +++++- web/src/pages/Exports.tsx | 15 ++- web/src/pages/FaceLibrary.tsx | 1 - web/src/pages/Replay.tsx | 13 +-- web/src/pages/Settings.tsx | 4 +- .../classification/ModelTrainingView.tsx | 1 - web/src/views/events/EventView.tsx | 13 +-- web/src/views/live/LiveCameraView.tsx | 2 +- .../motion-search/MotionSearchDialog.tsx | 4 +- .../views/motion-search/MotionSearchView.tsx | 1 - web/src/views/settings/AuthenticationView.tsx | 2 - .../views/settings/CameraManagementView.tsx | 4 +- .../DetectorsAndModelSettingsView.tsx | 2 - .../settings/EnrichmentsSettingsView.tsx | 8 +- .../settings/FrigatePlusSettingsView.tsx | 2 - .../settings/Go2RtcStreamsSettingsView.tsx | 13 +-- web/src/views/settings/MasksAndZonesView.tsx | 8 +- .../views/settings/MediaSyncSettingsView.tsx | 2 - web/src/views/settings/MotionTunerView.tsx | 6 +- web/src/views/settings/ObjectSettingsView.tsx | 8 +- web/src/views/settings/ProfilesView.tsx | 8 +- .../views/settings/RegionGridSettingsView.tsx | 9 +- web/src/views/settings/TriggerView.tsx | 2 - web/src/views/settings/UiSettingsView.tsx | 3 +- 88 files changed, 440 insertions(+), 593 deletions(-) diff --git a/web/src/components/auth/AuthForm.tsx b/web/src/components/auth/AuthForm.tsx index 8798b5d00..e621d120c 100644 --- a/web/src/components/auth/AuthForm.tsx +++ b/web/src/components/auth/AuthForm.tsx @@ -107,7 +107,7 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) { {t("form.user")} {t("form.password")} diff --git a/web/src/components/card/ExportCard.tsx b/web/src/components/card/ExportCard.tsx index 58600ed3f..958135d29 100644 --- a/web/src/components/card/ExportCard.tsx +++ b/web/src/components/card/ExportCard.tsx @@ -257,7 +257,7 @@ export function ExportCard({ {editName && ( <> diff --git a/web/src/components/classification/wizard/Step2StateArea.tsx b/web/src/components/classification/wizard/Step2StateArea.tsx index 84367a877..7da1a62dc 100644 --- a/web/src/components/classification/wizard/Step2StateArea.tsx +++ b/web/src/components/classification/wizard/Step2StateArea.tsx @@ -458,7 +458,7 @@ export default function Step2StateArea({ -
+
diff --git a/web/src/components/classification/wizard/Step3ChooseExamples.tsx b/web/src/components/classification/wizard/Step3ChooseExamples.tsx index c6693d029..75f4d263f 100644 --- a/web/src/components/classification/wizard/Step3ChooseExamples.tsx +++ b/web/src/components/classification/wizard/Step3ChooseExamples.tsx @@ -1,4 +1,4 @@ -import { Button } from "@/components/ui/button"; +import { Button, buttonVariants } from "@/components/ui/button"; import { useTranslation } from "react-i18next"; import { useState, useEffect, useCallback, useMemo } from "react"; import ActivityIndicator from "@/components/indicators/activity-indicator"; @@ -540,7 +540,7 @@ export default function Step3ChooseExamples({ {t("button.continue", { ns: "common" })} @@ -693,7 +693,7 @@ export default function Step3ChooseExamples({ )} {!isTraining && ( -
+
diff --git a/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx b/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx index fb53055bc..cf8b6778c 100644 --- a/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx +++ b/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx @@ -10,7 +10,6 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; -import { Toaster } from "@/components/ui/sonner"; import { StatusBarMessagesContext } from "@/context/statusbar-provider"; import { FrigateConfig } from "@/types/frigateConfig"; import { zodResolver } from "@hookform/resolvers/zod"; @@ -491,7 +490,6 @@ export default function NotificationsSettingsExtras({ return (
-
{isAdmin && ( @@ -521,7 +519,7 @@ export default function NotificationsSettingsExtras({ diff --git a/web/src/components/config-form/sections/BaseSection.tsx b/web/src/components/config-form/sections/BaseSection.tsx index b3261a5cc..685b06ebe 100644 --- a/web/src/components/config-form/sections/BaseSection.tsx +++ b/web/src/components/config-form/sections/BaseSection.tsx @@ -32,7 +32,7 @@ import { ProfileOverridesBadge } from "./ProfileOverridesBadge"; import { useSectionSchema } from "@/hooks/use-config-schema"; import type { FrigateConfig } from "@/types/frigateConfig"; import { Badge } from "@/components/ui/badge"; -import { Button } from "@/components/ui/button"; +import { Button, buttonVariants } from "@/components/ui/button"; import { LuChevronDown, LuChevronRight } from "react-icons/lu"; import Heading from "@/components/ui/heading"; import get from "lodash/get"; @@ -1236,7 +1236,7 @@ export function ConfigSection({ {t("button.cancel", { ns: "common" })} { onDeleteProfileSection?.(); setIsDeleteProfileDialogOpen(false); diff --git a/web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx b/web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx index bdd61eb1f..9d703b3c8 100644 --- a/web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx +++ b/web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx @@ -371,7 +371,7 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) { key={group.groupKey} className="space-y-4 rounded-lg border border-border/70 bg-card/30 p-4" > -
+
{group.label}
diff --git a/web/src/components/config-form/theme/widgets/ArrayAsTextWidget.tsx b/web/src/components/config-form/theme/widgets/ArrayAsTextWidget.tsx index 21bba78cc..2f32de645 100644 --- a/web/src/components/config-form/theme/widgets/ArrayAsTextWidget.tsx +++ b/web/src/components/config-form/theme/widgets/ArrayAsTextWidget.tsx @@ -79,7 +79,7 @@ export function ArrayAsTextWidget(props: WidgetProps) { return (