mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-22 22:02:00 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user