/
NFTDetails.razor
71 lines (62 loc) · 2.33 KB
/
NFTDetails.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@using VEDriversLite
@using VEDriversLite.NFT
@inject AppData AppData
@inherits NFTComponentBase
@if ( NFT != null )
{
<Modal @ref="NFTDetailsModal">
<ModalContent Centered Size="ModalSize.ExtraLarge">
<ModalHeader>
<ModalTitle>@NFT.Name - Details</ModalTitle>
<CloseButton />
</ModalHeader>
<ModalBody>
<Row>
<Column>
<NFTBasicInfo NFT="@NFT" />
<NFTText Text="@NFT.Text" />
</Column>
<Column>
<Card Margin="Margin.Is4.FromBottom">
<CardBody>
<CardTitle Size="5">@SpecificInfoHeading</CardTitle>
@ChildContent
</CardBody>
</Card>
<NFTActionControl Address="@Address"
IsSubAccount="@IsSubAccount"
HideOpenInWorkTabButton="@HideOpenInWorkTabButton"
IsOwnNFT="@IsOwnNFT"
OpenNFTsInWorkTab="@OpenNFTInWorkTabHandler"
@bind-NFT="@NFT"
NFTSent="@NFTSentHandler" />
<StorageInfoActions IPFSLink="@NFT.ImageLink" Utxo="@NFT.Utxo" UtxoIndex="@NFT.UtxoIndex" />
</Column>
</Row>
<NotificationAlert />
</ModalBody>
</ModalContent>
</Modal>
}
@code {
private Modal? NFTDetailsModal;
[Parameter]
public string SpecificInfoHeading { get; set; } = "Specific Info";
public bool ShowNFTDetails(INFT nft = null)
{
if (NFT == null && nft == null)
return false;
else if (NFT == null && nft != null)
{
NFT = nft;
InvokeAsync(StateHasChanged);
}
NFTDetailsModal?.Show();
return true;
}
public bool HideNFTDetails()
{
NFTDetailsModal?.Hide();
return true;
}
}