kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
SoapboxConfig: improve style of file uploader
rodzic
874ae980e6
commit
0bd43a3f2c
|
@ -9,10 +9,7 @@ import { Column, Form, FormActions, FormGroup, Input, Textarea, Button } from 's
|
||||||
import HStack from 'soapbox/components/ui/hstack/hstack';
|
import HStack from 'soapbox/components/ui/hstack/hstack';
|
||||||
import Stack from 'soapbox/components/ui/stack/stack';
|
import Stack from 'soapbox/components/ui/stack/stack';
|
||||||
import Streamfield from 'soapbox/components/ui/streamfield/streamfield';
|
import Streamfield from 'soapbox/components/ui/streamfield/streamfield';
|
||||||
import {
|
import { Checkbox } from 'soapbox/features/forms';
|
||||||
FileChooserLogo,
|
|
||||||
Checkbox,
|
|
||||||
} from 'soapbox/features/forms';
|
|
||||||
import ThemeToggle from 'soapbox/features/ui/components/theme-toggle';
|
import ThemeToggle from 'soapbox/features/ui/components/theme-toggle';
|
||||||
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
||||||
import { normalizeSoapboxConfig } from 'soapbox/normalizers';
|
import { normalizeSoapboxConfig } from 'soapbox/normalizers';
|
||||||
|
@ -210,12 +207,17 @@ const SoapboxConfig: React.FC = () => {
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack className='w-1/2'>
|
<Stack className='w-1/2'>
|
||||||
<FileChooserLogo
|
<FormGroup
|
||||||
label={<FormattedMessage id='soapbox_config.fields.logo_label' defaultMessage='Logo' />}
|
labelText={<FormattedMessage id='soapbox_config.fields.logo_label' defaultMessage='Logo' />}
|
||||||
name='logo'
|
hintText={<FormattedMessage id='soapbox_config.hints.logo' defaultMessage='SVG. At most 2 MB. Will be displayed to 50px height, maintaining aspect ratio' />}
|
||||||
hint={<FormattedMessage id='soapbox_config.hints.logo' defaultMessage='SVG. At most 2 MB. Will be displayed to 50px height, maintaining aspect ratio' />}
|
>
|
||||||
|
<input
|
||||||
|
type='file'
|
||||||
onChange={handleFileChange(['logo'])}
|
onChange={handleFileChange(['logo'])}
|
||||||
|
className='text-sm'
|
||||||
|
accept='image/svg,image/png'
|
||||||
/>
|
/>
|
||||||
|
</FormGroup>
|
||||||
</Stack>
|
</Stack>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|
||||||
|
@ -330,6 +332,7 @@ const SoapboxConfig: React.FC = () => {
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<FormActions>
|
<FormActions>
|
||||||
<Button type='submit'>
|
<Button type='submit'>
|
||||||
<FormattedMessage id='soapbox_config.save' defaultMessage='Save' />
|
<FormattedMessage id='soapbox_config.save' defaultMessage='Save' />
|
||||||
|
|
Ładowanie…
Reference in New Issue