mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
fix(app): require a username on username-only instances (#3430)
This commit is contained in:
1 parent
9bc43c0c08
commit
d1b4b82895
1 file changed
+4
-1
+4
-1
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import type {RuntimeConfigSnapshot} from '@app/features/app/state/InstanceSnapshotStore';
|
||||
import {usesUsernameSignIn} from '@app/features/app/utils/AccountIdentityFeatures';
|
||||
import type * as AuthenticationCommands from '@app/features/auth/commands/AuthenticationCommands';
|
||||
import authStyles from '@app/features/auth/components/accounts/account_switcher_modal/AccountSwitcherAuthFlow.module.css';
|
||||
import pageStyles from '@app/features/auth/flow/AuthPageStyles.module.css';
|
||||
@@ -35,6 +36,7 @@ export const AccountSwitcherRegisterStep = observer(function AccountSwitcherRegi
|
||||
/>
|
||||
);
|
||||
}
|
||||
const usernameSignIn = usesUsernameSignIn(runtimeSnapshot.features);
|
||||
return (
|
||||
<>
|
||||
<h1
|
||||
@@ -49,10 +51,11 @@ export const AccountSwitcherRegisterStep = observer(function AccountSwitcherRegi
|
||||
>
|
||||
<AuthRegisterFormCore
|
||||
fields={{
|
||||
showEmail: true,
|
||||
showEmail: !usernameSignIn,
|
||||
showPassword: true,
|
||||
showPasswordConfirmation: true,
|
||||
showUsernameValidation: true,
|
||||
requireUsername: usernameSignIn,
|
||||
}}
|
||||
submitLabel={<Trans>Create account</Trans>}
|
||||
redirectPath=""
|
||||
|
||||
Reference in new issue
Block a user