mirror of
https://github.com/status-im/nft-faucet.git
synced 2025-02-24 12:38:30 +00:00
49 lines
2.2 KiB
Plaintext
49 lines
2.2 KiB
Plaintext
@page "/uploads/new"
|
|
@inherits BasicComponent
|
|
|
|
<PageTitle>Create upload</PageTitle>
|
|
<RadzenContent Container="main">
|
|
<RadzenSteps Change="@(async x => await OnChange(x))" ShowStepsButtons="false">
|
|
<Steps>
|
|
<RadzenStepsItem Text="Select uploader">
|
|
<CardList Data="@UploaderCards" @bind-SelectedItems="@SelectedUploaderIds"/>
|
|
</RadzenStepsItem>
|
|
<RadzenStepsItem Text="Configure uploader" Disabled="@(SelectedUploader == null)">
|
|
@if (ConfigurationItems != null)
|
|
{
|
|
foreach (var configurationItem in ConfigurationItems)
|
|
{
|
|
<h3 class="mt-4">@configurationItem.Name</h3>
|
|
<p>@configurationItem.Tooltip</p>
|
|
<RadzenTextBox @bind-Value="@configurationItem.Value" Class="w-100"/>
|
|
}
|
|
<RadzenButton Text="Verify configuration" Click="@(async () => await VerifyConfiguration())" />
|
|
}
|
|
</RadzenStepsItem>
|
|
<RadzenStepsItem Text="Upload" Disabled="@(SelectedUploader == null || !SelectedUploader.IsInitialized)">
|
|
@if (FileLocation == null)
|
|
{
|
|
<h3 class="mt-4">Uploading... Wait!</h3>
|
|
}
|
|
else if (FileLocation.Value.IsSuccess)
|
|
{
|
|
<h3 class="mt-4">Upload succeeded!</h3>
|
|
<p>@FileLocation.Value.Value.OriginalString</p>
|
|
}
|
|
else
|
|
{
|
|
<h3 class="mt-4">Upload failed! :(</h3>
|
|
<p>@FileLocation.Value.Error</p>
|
|
<RadzenButton Text="Retry" Click="@(async () => await Upload())" />
|
|
}
|
|
</RadzenStepsItem>
|
|
</Steps>
|
|
</RadzenSteps>
|
|
<div class="row">
|
|
<div class="col-md-12 text-right">
|
|
<RadzenButton Click="@((args) => DialogService.Close())" ButtonStyle="ButtonStyle.Secondary" Text="Cancel" Style="width: 120px" Class="mr-1"/>
|
|
<RadzenButton Click="@((args) => OnSavePressed())" Disabled="!ModelIsValid" Text="Save" Style="width: 120px"/>
|
|
</div>
|
|
</div>
|
|
</RadzenContent>
|