diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-05-11 14:45:32 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-05-11 14:45:32 +0200 |
| commit | 021a869716c1be3d7753bce4500c2cf9a5e4d8d8 (patch) | |
| tree | 7b9e88fdc08ca390ac7c54e9b4ca900c133a22b5 | |
| parent | 805c4f966b3cc6a640b0fe39058a03646ced31af (diff) | |
| download | mullvadvpn-021a869716c1be3d7753bce4500c2cf9a5e4d8d8.tar.xz mullvadvpn-021a869716c1be3d7753bce4500c2cf9a5e4d8d8.zip | |
Disable too many devices continue button when logging in
| -rw-r--r-- | gui/src/renderer/components/TooManyDevices.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/src/renderer/components/TooManyDevices.tsx b/gui/src/renderer/components/TooManyDevices.tsx index 3823cc6f5d..5df8da0df3 100644 --- a/gui/src/renderer/components/TooManyDevices.tsx +++ b/gui/src/renderer/components/TooManyDevices.tsx @@ -102,6 +102,7 @@ export default function TooManyDevices() { const { removeDevice, login, cancelLogin } = useAppContext(); const accountToken = useSelector((state) => state.account.accountToken)!; const devices = useSelector((state) => state.account.devices); + const loginState = useSelector((state) => state.account.status); const onRemoveDevice = useCallback( async (deviceId: string) => { @@ -120,6 +121,8 @@ export default function TooManyDevices() { const title = getTitle(devices); const subtitle = getSubtitle(devices); + const continueButtonDisabled = devices.length === 5 || loginState.type !== 'too many devices'; + return ( <ModalContainer> <Layout> @@ -145,7 +148,7 @@ export default function TooManyDevices() { {devices !== undefined && ( <StyledFooter> <AppButton.ButtonGroup> - <AppButton.GreenButton onClick={continueLogin} disabled={devices.length === 5}> + <AppButton.GreenButton onClick={continueLogin} disabled={continueButtonDisabled}> { // TRANSLATORS: Button for continuing login process. messages.pgettext('device-management', 'Continue with login') |
