Skip to content

Commit a764db5

Browse files
feat(frontend): simplify navbar wallet (#2459)
* feat(frontend): simplify navbar wallet * chore: fmt * feat: redo and label * feat: remove ids * feat: remove hr * feat: spacing
1 parent e3a2cae commit a764db5

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

src/frontend/src/lib/components/core/NavbarWallet.svelte

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import Hr from '$lib/components/ui/Hr.svelte';
66
import Popover from '$lib/components/ui/Popover.svelte';
77
import WalletActions from '$lib/components/wallet/WalletActions.svelte';
8-
import WalletIds from '$lib/components/wallet/WalletIds.svelte';
98
import WalletPicker from '$lib/components/wallet/WalletPicker.svelte';
109
import WalletTokenPicker from '$lib/components/wallet/WalletTokenPicker.svelte';
1110
import WalletBalanceById from '$lib/components/wallet/balance/WalletBalanceById.svelte';
@@ -51,13 +50,11 @@
5150
<WalletTotal />
5251
</div>
5352

54-
<Hr />
55-
5653
<div class="picker selected-wallet">
5754
<WalletPicker bind:selectedWallet />
5855
</div>
5956

60-
<div class="picker">
57+
<div class="picker token-selector">
6158
<WalletTokenPicker {selectedWallet} bind:selectedToken />
6259
</div>
6360

@@ -68,8 +65,6 @@
6865
{/if}
6966

7067
{#if nonNullish(selectedWallet)}
71-
<WalletIds {selectedWallet} />
72-
7368
<div class="actions">
7469
<WalletActions onreceive={openReceive} onsend={onclose} {selectedToken} {selectedWallet} />
7570
</div>
@@ -105,6 +100,12 @@
105100
padding: var(--padding-0_5x) 0 0;
106101
}
107102
103+
.token-selector {
104+
:global(div.picker) {
105+
margin: 0 0 var(--padding-0_5x);
106+
}
107+
}
108+
108109
.picker {
109110
:global(select) {
110111
margin: var(--padding-0_5x) 0;
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<script lang="ts">
2+
import { nonNullish } from '@dfinity/utils';
23
import WalletBalanceCycles from '$lib/components/wallet/balance/WalletBalanceCycles.svelte';
4+
import { missionControlId } from '$lib/derived/console/account.mission-control.derived';
35
import { balance } from '$lib/derived/wallet/balance.derived';
46
import { i18n } from '$lib/stores/app/i18n.store';
7+
8+
let label = $derived(nonNullish($missionControlId) ? $i18n.wallet.total : undefined);
59
</script>
610

7-
<WalletBalanceCycles balance={$balance} label={$i18n.wallet.total} />
11+
<WalletBalanceCycles balance={$balance} {label} />

0 commit comments

Comments
 (0)