Skip to content

Commit 920dc96

Browse files
committed
Enhance AccountBtn styling and add disabled state for better user experience during login
1 parent 2d1743c commit 920dc96

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

components/ui/accountBtn.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ export default function AccountBtn({ session, openAccountModal, navbarMode, inCr
3030

3131
{ loginQueued ? (
3232
<div style={{ marginRight: '10px', marginLeft: '10px', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
33-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
34-
<div style={{
35-
width: '16px',
36-
height: '16px',
37-
border: '2px solid rgba(255, 255, 255, 0.3)',
38-
borderTop: '2px solid white',
39-
borderRadius: '50%',
40-
animation: 'spin 1s linear infinite'
41-
}}></div>
42-
</div>
33+
{text("login")}&nbsp;&nbsp;
34+
<div style={{
35+
width: '16px',
36+
height: '16px',
37+
border: '2px solid rgba(255, 255, 255, 0.3)',
38+
borderTop: '2px solid white',
39+
borderRadius: '50%',
40+
animation: 'spin 1s linear infinite'
41+
}}></div>
4342
</div>
4443
) : !session?.token?.secret && session !== null ? '...' :
4544
(

styles/globals.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,10 @@ html {
696696
background-color: rgba(40, 40, 40, 0.3);
697697
cursor: not-allowed;
698698
}
699+
.accountBtn[disabled], .navBtn[disabled] {
700+
background-color: var(--primaryTransparent);
701+
cursor: wait;
702+
}
699703

700704
.homeBtn {
701705
padding: 10px;

0 commit comments

Comments
 (0)