feat: add LogoInput component to settings input for app logo configuration

- Integrated LogoInput component into the SettingsInput to allow users to upload and manage the application logo.
- Updated the renderInput function to handle the new appLogo configuration, enhancing the settings interface.
This commit is contained in:
Daniel Luiz Alves
2025-07-07 16:38:25 -03:00
parent 1294329083
commit 4d101fbdeb

View File

@@ -10,6 +10,7 @@ import { Switch } from "@/components/ui/switch";
import { Textarea } from "@/components/ui/textarea";
import { Config } from "../types";
import { FileSizeInput } from "./file-size-input";
import { LogoInput } from "./logo-input";
const HIDDEN_FIELDS = ["serverUrl", "firstUserAccess"];
@@ -44,6 +45,16 @@ export function SettingsInput({
(isSmtpField && smtpEnabled === "false") || (isAuthProvidersField && authProvidersEnabled === "false");
const renderInput = () => {
if (config.key === "appLogo") {
return (
<LogoInput
value={watch(`configs.${config.key}`)}
onChange={(value) => setValue(`configs.${config.key}`, value)}
isDisabled={isDisabled}
/>
);
}
if (config.type === "boolean") {
return (
<Switch