Skip to content

Commit aa0347d

Browse files
committed
Merge branch 'frontend-revamp-upgrade-bootloader'
2 parents 7dab8b9 + b1207fd commit aa0347d

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

frontends/web/src/components/devices/bitbox02bootloader/bitbox02bootloader.module.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
.content {
2-
font-size: 16px;
3-
margin: 0;
1+
.upgradingTitle {
2+
text-align: center;
43
}
54

65
.progressBar {
76
margin: var(--space-quarter) 0;
87
}
98

9+
.progressInfo {
10+
display: flex;
11+
font-size: 16px;
12+
justify-content: space-between;
13+
margin: 0 0 var(--space-default);
14+
}
15+
1016
.additionalUpgrade {
1117
font-size: 16px;
1218
margin: 0;

frontends/web/src/components/devices/bitbox02bootloader/bitbox02bootloader.tsx

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,33 @@ export const BitBox02Bootloader = ({ deviceID }: TProps) => {
5858
} else {
5959
const value = Math.round(status.progress * 100);
6060
contents = (
61-
<div className="box large">
62-
<SubTitle>
61+
<>
62+
<SubTitle className={style.upgradingTitle}>
6363
{t('bb02Bootloader.upgradeTitle', { context: (info.erased ? 'install' : '') })}
6464
</SubTitle>
6565
{ info.additionalUpgradeFollows ? (
66-
<>
67-
<p className={style.additionalUpgrade}>{t('bb02Bootloader.additionalUpgradeFollows1')}</p>
68-
<p className={style.additionalUpgrade}>{t('bb02Bootloader.additionalUpgradeFollows2')}</p>
69-
</>
66+
<p className={style.additionalUpgrade}>
67+
{t('bb02Bootloader.additionalUpgradeFollows1')}
68+
</p>
7069
) : null }
7170
<progress className={style.progressBar} value={value} max="100">{value}%</progress>
72-
<p className={style.content}>
73-
{t('bootloader.progress', {
74-
progress: value.toString(),
75-
context: (info.erased ? 'install' : ''),
76-
})}
77-
</p>
78-
</div>
71+
<div className={style.progressInfo}>
72+
<span>
73+
{t('bootloader.progress', {
74+
context: (info.erased ? 'install' : ''),
75+
})}
76+
</span>
77+
<span>
78+
{value}%
79+
</span>
80+
</div>
81+
82+
{ info.additionalUpgradeFollows ? (
83+
<p className={style.additionalUpgrade}>
84+
{t('bb02Bootloader.additionalUpgradeFollows2')}
85+
</p>
86+
) : null }
87+
</>
7988
);
8089
}
8190
} else {
@@ -132,7 +141,7 @@ export const BitBox02Bootloader = ({ deviceID }: TProps) => {
132141
(isDarkMode ? <BitBox02Inverted /> : <BitBox02 />);
133142

134143
return (
135-
<View fitContent verticallyCentered width="600px">
144+
<View fitContent verticallyCentered width="556px">
136145
<ViewContent>
137146
{logo}
138147
{status && status.errMsg && (

0 commit comments

Comments
 (0)