Skip to content

Commit 13e55f2

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 1df6fe9 commit 13e55f2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@
112112

113113
.sidebarItem > a,
114114
.sidebarItem > button {
115-
background-color: transparent;
116115
align-items: center;
116+
background-color: transparent;
117117
border-radius: 2px;
118118
color: white;
119119
cursor: default;
120120
display: flex;
121121
flex-direction: row;
122-
height: var(--sidebar-item-height);
123122
justify-content: center;
123+
min-height: var(--sidebar-item-height);
124124
overflow: hidden;
125125
position: relative;
126126
text-decoration: none;
@@ -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)