fix: issue with clicking settings on public form (#5392)

This commit is contained in:
Katherine 2024-10-12 11:40:59 +08:00 committed by GitHub
parent d5e931f70a
commit fc90817fac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ const PublicFormQRCode = () => {
onOpenChange={handleQRCodeOpen} onOpenChange={handleQRCodeOpen}
content={open ? <QRCode value={link} bordered={false} /> : ' '} content={open ? <QRCode value={link} bordered={false} /> : ' '}
> >
{t('QR code', { ns: NAMESPACE })} <a>{t('QR code', { ns: NAMESPACE })}</a>
</Popover> </Popover>
); );
}; };
@ -140,25 +140,22 @@ export function AdminPublicFormPage() {
{ {
key: 'enabled', key: 'enabled',
label: ( label: (
<span <a
style={{ style={{
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
}} }}
onClick={() => handleEditPublicForm({ enabled: !enabled })}
> >
<span style={{ marginRight: '10px' }}>{t('Enable form', { ns: NAMESPACE })}</span> <span style={{ marginRight: '10px' }}>{t('Enable form', { ns: NAMESPACE })}</span>
<Switch <Switch size={'small'} checked={enabled} />
size={'small'} </a>
checked={enabled}
onChange={(checked) => handleEditPublicForm({ enabled: checked })}
/>
</span>
), ),
}, },
{ {
key: 'password', key: 'password',
label: <span onClick={handleSetPassword}> {t('Set password')}</span>, label: <a onClick={handleSetPassword}> {t('Set password')}</a>,
}, },
{ {
key: 'divider1', key: 'divider1',
@ -166,7 +163,7 @@ export function AdminPublicFormPage() {
}, },
{ {
key: 'copyLink', key: 'copyLink',
label: <span onClick={handleCopyLink}>{t('Copy link')}</span>, label: <a onClick={handleCopyLink}>{t('Copy link')}</a>,
}, },
{ {
key: 'qrcode', key: 'qrcode',