From 38e1b621353262186c46779bbe6bee4d862e30ca Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Sat, 7 Feb 2026 10:06:08 -0600
Subject: [PATCH] make buttons sticky at bottom of sections
---
.../config-form/sections/BaseSection.tsx | 115 ++++++++++--------
web/src/pages/Settings.tsx | 2 +-
2 files changed, 65 insertions(+), 52 deletions(-)
diff --git a/web/src/components/config-form/sections/BaseSection.tsx b/web/src/components/config-form/sections/BaseSection.tsx
index 4a417f85b..6a76f358c 100644
--- a/web/src/components/config-form/sections/BaseSection.tsx
+++ b/web/src/components/config-form/sections/BaseSection.tsx
@@ -47,7 +47,7 @@ import {
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { applySchemaDefaults } from "@/lib/config-schema";
-import { isJsonObject } from "@/lib/utils";
+import { cn, isJsonObject } from "@/lib/utils";
import { ConfigSectionData, JsonObject, JsonValue } from "@/types/configForm";
import ActivityIndicator from "@/components/indicators/activity-indicator";
import RestartDialog from "@/components/overlay/dialog/RestartDialog";
@@ -849,65 +849,72 @@ export function ConfigSection({
/>
{/* Save button */}
-
-
- {hasChanges && (
-
- {t("unsavedChanges", {
- ns: "views/settings",
- defaultValue: "You have unsaved changes",
- })}
-
+
+
-
- {((level === "camera" && isOverridden) || level === "global") &&
- !hasChanges && (
+ >
+ {hasChanges && (
+
+
+ {t("unsavedChanges", {
+ ns: "views/settings",
+ defaultValue: "You have unsaved changes",
+ })}
+
+
+ )}
+
+ {((level === "camera" && isOverridden) || level === "global") &&
+ !hasChanges && (
+
+ )}
+ {hasChanges && (
)}
- {hasChanges && (
- )}
-
+
@@ -1005,7 +1012,10 @@ export function ConfigSection({
{showOverrideIndicator &&
level === "camera" &&
isOverridden && (
-
+
{t("button.overridden", {
ns: "common",
defaultValue: "Overridden",
@@ -1013,7 +1023,10 @@ export function ConfigSection({
)}
{hasChanges && (
-
+
{t("modified", { ns: "common", defaultValue: "Modified" })}
)}
diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx
index 4c1225ca9..dbf268eed 100644
--- a/web/src/pages/Settings.tsx
+++ b/web/src/pages/Settings.tsx
@@ -1031,7 +1031,7 @@ export default function Settings() {
-
+
{(() => {
const CurrentComponent = getCurrentComponent(page);
if (!CurrentComponent) return null;