Skip to content

Commit 8939a51

Browse files
committed
Merge branch 'frontend-update-manage-accounts'
2 parents ea13541 + d066864 commit 8939a51

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
.label {
2+
white-space: nowrap;
3+
}
4+
15
.labelText {
6+
display: inline-block;
27
font-size: 14px;
38
line-height: 1;
49
margin-right: 8px;
10+
padding-left: var(--space-quarter);
511
vertical-align: sub;
612
}

frontends/web/src/routes/settings/manage-accounts.module.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
}
55

66
.walletHeader {
7+
align-items: end;
78
display: flex;
89
flex-wrap: wrap;
910
justify-content: space-between;
@@ -13,7 +14,12 @@
1314
.walletTitle {
1415
font-size: 20px;
1516
font-weight: 400;
16-
margin: 0;
17+
margin: 0 0 var(--space-quarter) 0;
18+
}
19+
20+
.walletTitle small {
21+
color: var(--color-secondary);
22+
font-size: var(--size-default);
1723
}
1824

1925
.setting {

frontends/web/src/routes/settings/manage-accounts.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
*/
1616

1717
import React, { Component } from 'react';
18-
import { getAccountsByKeystore } from '../account/utils';
18+
import { getAccountsByKeystore, isAmbiguiousName } from '../account/utils';
1919
import { route } from '../../utils/route';
2020
import * as accountAPI from '../../api/account';
2121
import * as backendAPI from '../../api/backend';
2222
import { alertUser } from '../../components/alert/Alert';
2323
import { Button, Input, Label } from '../../components/forms';
2424
import Logo from '../../components/icon/logo';
25-
import { EditActive, EyeOpenedDark } from '../../components/icon';
25+
import { EditActive, EyeOpenedDark, USBSuccess } from '../../components/icon';
2626
import { Column, Grid, GuideWrapper, GuidedContent, Header, Main } from '../../components/layout';
2727
import { Toggle } from '../../components/toggle/toggle';
2828
import { Dialog, DialogButtons } from '../../components/dialog/dialog';
@@ -31,6 +31,7 @@ import { translate, TranslateProps } from '../../decorators/translate';
3131
import { WithSettingsTabs } from './components/tabs';
3232
import { View, ViewContent } from '../../components/view/view';
3333
import { MobileHeader } from '../settings/components/mobile-header';
34+
import { Badge } from '../../components/badge/badge';
3435
import { AccountGuide } from './manage-account-guide';
3536
import { WatchonlySetting } from './components/manage-accounts/watchonlySetting';
3637
import style from './manage-accounts.module.css';
@@ -281,7 +282,22 @@ class ManageAccounts extends Component<Props, State> {
281282
asCard>
282283
<div className={style.walletHeader}>
283284
<h2 className={style.walletTitle}>
284-
{keystore.keystore.name}
285+
<span className="p-right-quarter">
286+
{keystore.keystore.name}
287+
{ isAmbiguiousName(keystore.keystore.name, accountsByKeystore) ? (
288+
// Disambiguate accounts group by adding the fingerprint.
289+
// The most common case where this would happen is when adding accounts from the
290+
// same seed using different passphrases.
291+
<small> {keystore.keystore.rootFingerprint}</small>
292+
) : null }
293+
</span>
294+
{keystore.keystore.connected ? (
295+
<Badge
296+
icon={props => <USBSuccess {...props} />}
297+
type="success">
298+
{t('device.keystoreConnected')}
299+
</Badge>
300+
) : null}
285301
</h2>
286302
<WatchonlySetting keystore={keystore.keystore} />
287303
</div>

0 commit comments

Comments
 (0)