|
|
@@ -24,13 +24,13 @@ interface SettingsFormState {
|
|
|
const initialSettingsState: SettingsFormState = {
|
|
|
key: "",
|
|
|
value: "",
|
|
|
- isOpen: false
|
|
|
+ isOpen: false,
|
|
|
};
|
|
|
|
|
|
export default function SettingsCrud({
|
|
|
editKey,
|
|
|
editValue,
|
|
|
- onEditClose
|
|
|
+ onEditClose,
|
|
|
}: SettingsCrudProps) {
|
|
|
const { updateSetting } = useAppContext();
|
|
|
const { addNotification } = useNotifications();
|
|
|
@@ -45,7 +45,7 @@ export default function SettingsCrud({
|
|
|
setFormState({
|
|
|
key: editKey,
|
|
|
value: editValue || "",
|
|
|
- isOpen: true
|
|
|
+ isOpen: true,
|
|
|
});
|
|
|
}
|
|
|
}, [editKey, editValue, isEditing]);
|
|
|
@@ -63,7 +63,7 @@ export default function SettingsCrud({
|
|
|
addNotification({
|
|
|
type: "success",
|
|
|
title: "Setting Saved",
|
|
|
- message: `${formState.key} has been ${isEditing ? "updated" : "added"} successfully.`
|
|
|
+ message: `${formState.key} has been ${isEditing ? "updated" : "added"} successfully.`,
|
|
|
});
|
|
|
} catch (error) {
|
|
|
console.error("Failed to save setting:", error);
|
|
|
@@ -71,7 +71,7 @@ export default function SettingsCrud({
|
|
|
addNotification({
|
|
|
type: "error",
|
|
|
title: "Save Failed",
|
|
|
- message: "Failed to save the setting. Please try again."
|
|
|
+ message: "Failed to save the setting. Please try again.",
|
|
|
});
|
|
|
} finally {
|
|
|
setIsSaving(false);
|
|
|
@@ -101,7 +101,7 @@ export default function SettingsCrud({
|
|
|
/>
|
|
|
);
|
|
|
case "datasets":
|
|
|
- // For datasets, just use JsonInput since DatasetsSettingsEditor uses context
|
|
|
+ // Use JsonInput with JSON mode toggle for datasets configuration
|
|
|
return (
|
|
|
<JsonInput
|
|
|
value={formState.value}
|