Skip to content

Commit d47a4e5

Browse files
committed
frontend: improve sidebar in responsive mode
Sidebar can appear on Android tablets, fixed some styles related to the sidebar component. Also removed anmiation all (transition) on sidebar labels. Kept only icons should animate opacity.
1 parent 930ea24 commit d47a4e5

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

frontends/web/src/components/keystore/connected-keystore.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ export const ConnectedKeystore = ({
5353
<>
5454
{' '}
5555
<Badge
56-
icon={props => <USBSuccess style={{ width: '0.9rem', height: '0.9rem' }} {...props} />}
56+
icon={props => (
57+
<USBSuccess style={{
58+
width: 'min(0.9rem, 12px)',
59+
height: 'min(0.9rem, 12px)',
60+
}} {...props} />
61+
)}
5762
title={t('device.keystoreConnected')}
5863
type="success">
5964
{connectedIconOnly ? undefined : t('device.keystoreConnected')}

frontends/web/src/components/sidebar/sidebar.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ a.sidebarActive .single img,
185185
line-height: 1;
186186
flex: 1;
187187
padding-top: 0;
188-
padding-right: var(--space-default);
188+
padding-right: var(--space-half);
189189
font-size: var(--size-default);
190190
font-weight: 400;
191-
transition: all 0.2s ease;
192191
word-break: break-word;
193192
}
194193

frontends/web/src/style/layout.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,15 @@ button, textarea {
348348
}
349349

350350
.stacked img {
351+
display: block;
351352
transition: opacity 0.2s ease;
352353
}
353354

354355
.stacked img:last-child {
356+
left: 50%;
355357
opacity: 0;
356358
position: absolute;
357359
top: 0;
358-
left: 50%;
359360
transform: translateX(-50%);
360361
}
361362

0 commit comments

Comments
 (0)