Skip to content

Commit 2f1499c

Browse files
feat(frontend): add an info link in the navbar wallet (#2482)
* feat(frontend): display an information link in the navbar wallet * chore: lint
1 parent 58078eb commit 2f1499c

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts">
22
import { nonNullish } from '@dfinity/utils';
3+
import IconInfo from '$lib/components/icons/IconInfo.svelte';
34
import IconWallet from '$lib/components/icons/IconWallet.svelte';
45
import ButtonIcon from '$lib/components/ui/ButtonIcon.svelte';
5-
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';
88
import WalletPicker from '$lib/components/wallet/WalletPicker.svelte';
@@ -46,6 +46,16 @@
4646

4747
<Popover anchor={button} direction="rtl" bind:visible>
4848
<div class="container">
49+
<div class="info">
50+
<a
51+
aria-label={$i18n.wallet.information}
52+
href="https://juno.build/docs/miscellaneous/wallet"
53+
rel="noreferrer noopener"
54+
tabindex="-1"
55+
target="_blank"><IconInfo size="20px" /></a
56+
>
57+
</div>
58+
4959
<div>
5060
<WalletTotal />
5161
</div>
@@ -112,4 +122,15 @@
112122
width: fit-content;
113123
}
114124
}
125+
126+
.info {
127+
display: flex;
128+
justify-content: flex-end;
129+
130+
a {
131+
display: flex;
132+
justify-content: center;
133+
align-items: center;
134+
}
135+
}
115136
</style>

src/frontend/src/lib/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359
"credits": "Credits",
360360
"transfer_icp_info": "Learn how to provision your wallet in the",
361361
"documentation": "documentation",
362+
"information": "Learn about the wallet in the documentation",
362363
"tx_id": "ID",
363364
"tx_timestamp": "Timestamp",
364365
"tx_from": "From",

src/frontend/src/lib/i18n/zh-cn.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359
"credits": "积分",
360360
"transfer_icp_info": "了解如何为您的钱包充值",
361361
"documentation": "文档",
362+
"information": "在文档中了解更多钱包信息",
362363
"tx_id": "交易ID",
363364
"tx_timestamp": "时间",
364365
"tx_from": "发送方",

src/frontend/src/lib/types/i18n.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ interface I18nWallet {
369369
credits: string;
370370
transfer_icp_info: string;
371371
documentation: string;
372+
information: string;
372373
tx_id: string;
373374
tx_timestamp: string;
374375
tx_from: string;

0 commit comments

Comments
 (0)