File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 43
43
</div >
44
44
</MudStack >
45
45
46
+ <MudText Typo =" Typo.h4" >From aoWebWallet</MudText >
47
+ <MudStack Spacing =" 0" Row =" true" >
48
+ <MudLink Href =" @shareUrl" Typo =" Typo.h6" >
49
+ @shareUrl
50
+ </MudLink >
51
+ <MudIconButton Class =" copy-clipboard" Icon =" @Icons.Material.Filled.ContentCopy" Color =" Color.Default" OnClick =" async () => { await ClipboardService.CopyToClipboard(shareUrl); }" />
52
+ </MudStack >
53
+
46
54
<MudText Typo =" Typo.h4" >Scan QR</MudText >
47
55
<MudBarcode Value =" @BindingContext.QrCode" Width =" 200" Height =" 200" ForceHeight =" 1" BarcodeFormat =" BarcodeFormat.QR_CODE" Clickable =" false" />
48
56
</MudStack >
57
+
49
58
<br />
50
59
@if (BindingContext .Token != null )
51
60
{
69
78
public string ? TokenId { get ; set ; }
70
79
71
80
public string detailUrl => $" /wallet/{Address }" ;
81
+ public string shareUrl => NavigationManager .ToAbsoluteUri (BindingContext .ShareLink ).ToString ();
72
82
73
83
74
84
protected override async Task OnParametersSetAsync ()
Original file line number Diff line number Diff line change 55
55
56
56
NavigationManager .NavigateTo ($" /action?{aoAction .ToQueryString ()}" );
57
57
}
58
+ else
59
+ {
60
+ NavigationManager .NavigateTo ($" /wallet/{address }" );
61
+ }
58
62
59
63
Snackbar .Add (" Token type not recognized" , Severity .Error );
60
64
return ;
Original file line number Diff line number Diff line change 1
1
using aoWebWallet . Models ;
2
2
using aoWebWallet . Services ;
3
3
using CommunityToolkit . Mvvm . ComponentModel ;
4
+ using System . Net ;
4
5
5
6
namespace aoWebWallet . ViewModels
6
7
{
@@ -24,6 +25,19 @@ public string QrCode
24
25
}
25
26
}
26
27
28
+ public string ShareLink
29
+ {
30
+ get
31
+ {
32
+ if ( ! string . IsNullOrWhiteSpace ( TokenId ) )
33
+ {
34
+ return "/action?" + AoAction . CreateForTokenTransaction ( Address , TokenId ) . ToQueryString ( ) ;
35
+ }
36
+ else
37
+ return $ "/wallet/{ Address } ";
38
+ }
39
+ }
40
+
27
41
public async Task Initialize ( string address , string ? tokenId )
28
42
{
29
43
Address = address ;
You can’t perform that action at this time.
0 commit comments