feat(boards): add upload buttons for background, favicon and logo (#2770)

* feat(boards): add upload buttons for background, favicon and logo

* feat(boards): use media search and show names for background

* fix: background preview not working
This commit is contained in:
Meier Lukas
2025-04-05 13:54:16 +02:00
committed by GitHub
parent 14bff5d530
commit e07b9e6a88
4 changed files with 105 additions and 50 deletions

View File

@@ -33,6 +33,9 @@ interface IconPickerProps {
error?: string | null;
onFocus?: FocusEventHandler;
onBlur?: FocusEventHandler;
label?: string;
placeholder?: string;
withAsterisk?: boolean;
}
@@ -43,6 +46,8 @@ export const IconPicker = ({
onFocus,
onBlur,
withAsterisk = true,
label,
placeholder,
}: IconPickerProps) => {
const [value, setValue] = useUncontrolled({
value: propsValue,
@@ -155,8 +160,8 @@ export const IconPicker = ({
rightSectionPointerEvents="none"
withAsterisk={withAsterisk}
error={error}
label={tCommon("iconPicker.label")}
placeholder={tCommon("iconPicker.header", { countIcons: String(data?.countIcons ?? 0) })}
label={label ?? tCommon("iconPicker.label")}
placeholder={placeholder ?? tCommon("iconPicker.header", { countIcons: String(data?.countIcons ?? 0) })}
/>
{session?.user.permissions.includes("media-upload") && (
<UploadMedia