Skip to content

Commit

Permalink
frontend/auth: fix auth screen glitch on startup
Browse files Browse the repository at this point in the history
The auth screen was sometimes showed for a very short time at startup
even when it was disabled. This fixes the glitch, hiding the auth screen
details while the backend checks if the auth config is enabled.
  • Loading branch information
Beerosagos committed Nov 7, 2024
1 parent 6077981 commit 40ba452
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- macOS: create a universal build that runs natively on arm64 and amd64
- Show fiat amount at the time of the transaction in transaction history
- Add BTC Direct private trading desk information
- Fix authentication view glitch at startup

# 4.45.0
- Bundle BitBox02 firmware version v9.21.0
Expand Down
27 changes: 15 additions & 12 deletions frontends/web/src/components/auth/authrequired.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,21 @@ export const AuthRequired = () => {
textCenter
verticallyCentered
withBottomBar>
<ViewHeader small title={t('auth.title')} />
<ViewContent children={undefined} minHeight="0" />
<ViewButtons>
<Button
autoFocus
primary
hidden={authForced.current}
disabled={authenticating}
onClick={newAuthentication}>
{t('auth.authButton')}
</Button>
</ViewButtons>
{ !authenticating && (
<>
<ViewHeader small title={t('auth.title')} />
<ViewContent children={undefined} minHeight="0" />
<ViewButtons>
<Button
autoFocus
primary
hidden={authForced.current}
onClick={newAuthentication}>
{t('auth.authButton')}
</Button>
</ViewButtons>
</>
)}
</View>
</div>
);
Expand Down

0 comments on commit 40ba452

Please sign in to comment.