mirror of
https://github.com/status-im/nft-faucet.git
synced 2025-02-23 20:18:24 +00:00
111 lines
3.3 KiB
Plaintext
111 lines
3.3 KiB
Plaintext
@page "/mint"
|
|
@using NftFaucetRadzen.Plugins.NetworkPlugins
|
|
@inherits BasicComponent
|
|
|
|
<PageTitle>Mint</PageTitle>
|
|
<RadzenContent Container="main">
|
|
<RadzenHeading Size="H1" Text="Mint" />
|
|
<p>
|
|
<text style="font-weight: bold;">Network: </text>
|
|
@if (AppState?.SelectedNetwork == null)
|
|
{
|
|
@:<text style="color: red;">NOT SELECTED</text>
|
|
}
|
|
else
|
|
{
|
|
@:<text style="color: green;">OK</text>
|
|
}
|
|
</p>
|
|
<p>
|
|
<text style="font-weight: bold;">Provider: </text>
|
|
@if (AppState?.SelectedProvider == null)
|
|
{
|
|
@:<text style="color: red;">NOT SELECTED</text>
|
|
}
|
|
else if (!AppState.SelectedProvider.IsConfigured)
|
|
{
|
|
@:<text style="color: red;">NOT CONFIGURED</text>
|
|
}
|
|
else if (!NetworkMatches)
|
|
{
|
|
@:<text style="color: red;">NETWORK MISMATCH</text>
|
|
} else
|
|
{
|
|
@:<text style="color: green;">OK</text>
|
|
}
|
|
</p>
|
|
<p>
|
|
@if (string.IsNullOrEmpty(SourceAddress))
|
|
{
|
|
@:<text style="font-weight: bold;">Balance: </text>
|
|
}
|
|
else
|
|
{
|
|
@:<text style="font-weight: bold;">Balance</text>
|
|
@:<text> (@SourceAddress)</text>
|
|
@:<text style="font-weight: bold;">: </text>
|
|
}
|
|
|
|
@if (AppState?.SelectedProvider == null || !AppState.SelectedProvider.IsConfigured || string.IsNullOrEmpty(SourceAddress))
|
|
{
|
|
@:<text style="color: red;">UNKNOWN</text>
|
|
}
|
|
else if (BalanceIsZero)
|
|
{
|
|
@:<text style="color: red;">ZERO</text>
|
|
}
|
|
else
|
|
{
|
|
@:<text style="color: green;">OK</text>
|
|
}
|
|
</p>
|
|
<p>
|
|
<text style="font-weight: bold;">Contract: </text>
|
|
@if (AppState?.SelectedContract == null)
|
|
{
|
|
@:<text style="color: red;">NOT SELECTED</text>
|
|
}
|
|
else
|
|
{
|
|
@:<text style="color: green;">OK</text>
|
|
}
|
|
</p>
|
|
<p>
|
|
<text style="font-weight: bold;">Token: </text>
|
|
@if (AppState?.SelectedToken == null)
|
|
{
|
|
@:<text style="color: red;">NOT SELECTED</text>
|
|
}
|
|
else
|
|
{
|
|
@:<text style="color: green;">OK</text>
|
|
}
|
|
</p>
|
|
<p>
|
|
<text style="font-weight: bold;">Upload location: </text>
|
|
@if (AppState?.SelectedUploadLocation == null)
|
|
{
|
|
@:<text style="color: red;">NOT SELECTED</text>
|
|
}
|
|
else
|
|
{
|
|
@:<text style="color: green;">OK</text>
|
|
}
|
|
</p>
|
|
@if (IsReadyToMint)
|
|
{
|
|
<div class="mb-4">
|
|
<h4>Destination address</h4>
|
|
<RadzenTextBox Placeholder="<null>" @bind-Value="@AppState.UserStorage.DestinationAddress" Class="w-100"/>
|
|
</div>
|
|
if (AppState!.SelectedContract!.Type == ContractType.Erc1155)
|
|
{
|
|
<div class="mb-4">
|
|
<h4>Tokens amount</h4>
|
|
<RadzenNumeric TValue="int" Min="1" Max="100000" @bind-Value="@AppState.UserStorage.TokenAmount" Class="w-100" />
|
|
</div>
|
|
}
|
|
<RadzenButton Text="Mint" Disabled="@string.IsNullOrEmpty(AppState.UserStorage.DestinationAddress)" Click="@(async () => await Mint())" />
|
|
}
|
|
</RadzenContent>
|