diff --git a/public/locales/en/settings/customization/page-appearance.json b/public/locales/en/settings/customization/page-appearance.json index 36d24c33c..b3f380bf2 100644 --- a/public/locales/en/settings/customization/page-appearance.json +++ b/public/locales/en/settings/customization/page-appearance.json @@ -18,6 +18,29 @@ "background": { "label": "Background" }, + "backgroundImageAttachment": { + "label": "Background image attachment", + "options": { + "fixed": "Fixed - Background stays in the same position (recommended)", + "scroll": "Scroll - Background scrolls with your mouse" + } + }, + "backgroundImageSize": { + "label": "Background image size", + "options": { + "cover": "Cover - Scales the image as small as possible to cover the entire window by cropping excessive space. (recommended)", + "contain": "Contain - Scales the image as large as possible within its container without cropping or stretching the image." + } + }, + "backgroundImageRepeat": { + "label": "Background image attachment", + "options": { + "repeat": "Repeat - The image is repeated as much as needed to cover the whole background image painting area.", + "no-repeat": "No repeat - The image is not repeated any may not fill the entire space (recommended)", + "repeat-x": "Repeat X - Same as 'Repeat' but only on horizontal axis.", + "repeat-y": "Repeat Y - Same as 'Repeat' but only on vertical axis." + } + }, "customCSS": { "label": "Custom CSS", "description": "Further, customize your dashboard using CSS, only recommended for experienced users", diff --git a/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx b/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx index 248f4e855..4f1411124 100644 --- a/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx +++ b/src/components/Board/Customize/Appearance/AppearanceCustomization.tsx @@ -4,9 +4,9 @@ import { Group, Input, MantineTheme, + Select, Slider, Stack, - Text, TextInput, createStyles, rem, @@ -16,6 +16,7 @@ import { useTranslation } from 'next-i18next'; import { highlight, languages } from 'prismjs'; import Editor from 'react-simple-code-editor'; import { useColorTheme } from '~/tools/color'; +import { BackgroundImageAttachment, BackgroundImageRepeat, BackgroundImageSize } from '~/types/settings'; import { useBoardCustomizationFormContext } from '../form'; @@ -30,6 +31,32 @@ export const AppearanceCustomization = () => { placeholder="/imgs/backgrounds/background.png" {...form.getInputProps('appearance.backgroundSrc')} /> + ({ + value: size, + label: t(`backgroundImageSize.options.${size}`) as string, + }))} + {...form.getInputProps('appearance.backgroundImageSize')} + /> + +