fix prettier linting issue

This commit is contained in:
Scai 2024-04-30 22:59:30 +03:00
parent d4a02336aa
commit cc5208cc6b
11 changed files with 43 additions and 30 deletions

View File

@ -79,9 +79,7 @@ export default () => {
<Field
light
label={'Email'}
description={
t('forgot_password.label_help')
}
description={t('forgot_password.label_help')}
name={'email'}
type={'email'}
/>

View File

@ -78,9 +78,21 @@ const LoginContainer = ({ history }: RouteComponentProps) => {
>
{({ isSubmitting, setSubmitting, submitForm }) => (
<LoginFormContainer title={t('login.title')} css={tw`w-full flex`}>
<Field light type={'text'} label={t('user_identifier', { ns: 'strings' })} name={'username'} disabled={isSubmitting} />
<Field
light
type={'text'}
label={t('user_identifier', { ns: 'strings' })}
name={'username'}
disabled={isSubmitting}
/>
<div css={tw`mt-6`}>
<Field light type={'password'} label={t('password', { ns: 'strings' })} name={'password'} disabled={isSubmitting} />
<Field
light
type={'password'}
label={t('password', { ns: 'strings' })}
name={'password'}
disabled={isSubmitting}
/>
</div>
<div css={tw`mt-6`}>
<Button type={'submit'} size={'xlarge'} isLoading={isSubmitting} disabled={isSubmitting}>

View File

@ -79,7 +79,12 @@ export default ({ match, location }: RouteComponentProps<{ token: string }>) =>
/>
</div>
<div css={tw`mt-6`}>
<Field light label={t('reset_password.confirm_new_password')} name={'passwordConfirmation'} type={'password'} />
<Field
light
label={t('reset_password.confirm_new_password')}
name={'passwordConfirmation'}
type={'password'}
/>
</div>
<div css={tw`mt-6`}>
<Button size={'xlarge'} type={'submit'} disabled={isSubmitting} isLoading={isSubmitting}>

View File

@ -77,7 +77,9 @@ export default () => {
<p css={tw`text-sm break-words`}>{key.description}</p>
<p css={tw`text-2xs text-neutral-300 uppercase`}>
{t('last_used', { ns: 'strings' })}:&nbsp;
{key.lastUsedAt ? format(key.lastUsedAt, 'MMM do, yyyy HH:mm') : t('never', { ns: 'strings' })}
{key.lastUsedAt
? format(key.lastUsedAt, 'MMM do, yyyy HH:mm')
: t('never', { ns: 'strings' })}
</p>
</div>
<p css={tw`text-sm ml-4 hidden md:block`}>

View File

@ -76,9 +76,7 @@ export default () => {
))
) : (
<p css={tw`text-center text-sm text-neutral-400`}>
{showOnlyAdmin
? t('no-other-servers')
: t('no-servers-associated')}
{showOnlyAdmin ? t('no-other-servers') : t('no-servers-associated')}
</p>
)
}

View File

@ -33,14 +33,12 @@ export default () => {
<SetupTOTPDialog open={visible === 'enable'} onClose={() => setVisible(null)} onTokens={onTokens} />
<RecoveryTokensDialog tokens={tokens} open={tokens.length > 0} onClose={() => setTokens([])} />
<DisableTOTPDialog open={visible === 'disable'} onClose={() => setVisible(null)} />
<p css={tw`text-sm`}>
{isEnabled
? t('two_factor.disable.help')
: t('two_factor.enable.help')}
</p>
<p css={tw`text-sm`}>{isEnabled ? t('two_factor.disable.help') : t('two_factor.enable.help')}</p>
<div css={tw`mt-6`}>
{isEnabled ? (
<Button.Danger onClick={() => setVisible('disable')}>{t('two_factor.disable.button')}</Button.Danger>
<Button.Danger onClick={() => setVisible('disable')}>
{t('two_factor.disable.button')}
</Button.Danger>
) : (
<Button onClick={() => setVisible('enable')}>{t('two_factor.enable.button')}</Button>
)}

View File

@ -59,7 +59,12 @@ export default () => {
<React.Fragment>
<SpinnerOverlay size={'large'} visible={isSubmitting} />
<Form css={tw`m-0`}>
<Field id={'current_email'} type={'email'} name={'email'} label={t('email', { ns: 'strings' })} />
<Field
id={'current_email'}
type={'email'}
name={'email'}
label={t('email', { ns: 'strings' })}
/>
<div css={tw`mt-6`}>
<Field
id={'confirm_password'}

View File

@ -29,7 +29,7 @@ export default () => {
function (value) {
return value === this.parent.password;
}
),
),
});
const user = useStoreState((state: State<ApplicationStore>) => state.user.data);
@ -80,9 +80,7 @@ export default () => {
type={'password'}
name={'password'}
label={t('new_password', { ns: 'strings' })}
description={
t('password.requirements')
}
description={t('password.requirements')}
/>
</div>
<div css={tw`mt-6`}>

View File

@ -90,11 +90,7 @@ export default ({ ...props }: Props) => {
{({ isSubmitting }) => (
<Modal {...props}>
<Form>
<FormikFieldWrapper
name={'term'}
label={t('term.label')}
description={t('term.description')}
>
<FormikFieldWrapper name={'term'} label={t('term.label')} description={t('term.description')}>
<SearchWatcher />
<InputSpinner visible={isSubmitting}>
<Field as={InputWithRef} name={'term'} />

View File

@ -28,7 +28,10 @@ class ErrorBoundary extends React.Component<{}, State> {
<div css={tw`flex items-center bg-neutral-900 rounded p-3 text-red-500`}>
<Icon icon={faExclamationTriangle} css={tw`h-4 w-auto mr-2`} />
<p css={tw`text-sm text-neutral-100`}>
<Trans i18nKey="error_rendering_view" defaults="An error was encountered by the application while rendering this view. Try refreshing the page." />
<Trans
i18nKey='error_rendering_view'
defaults='An error was encountered by the application while rendering this view. Try refreshing the page.'
/>
</p>
</div>
</div>

View File

@ -13,9 +13,7 @@ const RequireServerPermission: React.FC<RequireServerPermissionProps> = ({ child
return (
<Can
action={permissions}
renderOnError={
<ServerError title={t('access_denied.title')} message={t('access_denied.message')} />
}
renderOnError={<ServerError title={t('access_denied.title')} message={t('access_denied.message')} />}
>
{children}
</Can>