CB-4268 show error for all auth tabs

This commit is contained in:
sergeyteleshev
2024-04-18 18:25:59 +02:00
parent dbeca03a31
commit 996bdfebdb
@@ -236,34 +236,31 @@ export const AuthDialog: DialogComponent<IAuthOptions, null> = observer(function
</Form>
)}
</CommonDialogBody>
{/* TODO should we always display footer for both: local and federated? */}
{(!federate || (federate && state.isTooManySessions)) && (
<CommonDialogFooter>
<Container>
{state.isTooManySessions && (
<Checkbox
className={s(styles, { tooManySessionsCheckbox: true })}
checked={state.isForceSessionsLogout}
name="forceSessionLogout"
label={translate('authentication_auth_force_session_logout')}
onClick={e => {
state.setForceSessionsLogout(e.currentTarget.checked);
}}
<CommonDialogFooter>
<Container>
{state.isTooManySessions && (
<Checkbox
className={s(styles, { tooManySessionsCheckbox: true })}
checked={state.isForceSessionsLogout}
name="forceSessionLogout"
label={translate('authentication_auth_force_session_logout')}
onClick={e => {
state.setForceSessionsLogout(e.currentTarget.checked);
}}
/>
)}
<AuthDialogFooter authAvailable={!dialogData.configure} isAuthenticating={dialogData.authenticating} onLogin={() => login(linkUser)}>
{errorDetails.name && (
<ErrorMessage
className={s(styles, { errorMessage: true })}
text={errorDetails.message || errorDetails.name}
hasDetails={errorDetails.hasDetails}
onShowDetails={errorDetails.open}
/>
)}
<AuthDialogFooter authAvailable={!dialogData.configure} isAuthenticating={dialogData.authenticating} onLogin={() => login(linkUser)}>
{errorDetails.name && (
<ErrorMessage
className={s(styles, { errorMessage: true })}
text={errorDetails.message || errorDetails.name}
hasDetails={errorDetails.hasDetails}
onShowDetails={errorDetails.open}
/>
)}
</AuthDialogFooter>
</Container>
</CommonDialogFooter>
)}
</AuthDialogFooter>
</Container>
</CommonDialogFooter>
</CommonDialogWrapper>
</TabsState>
);