2021-12-04 00:44:02 +00:00
|
|
|
@using Start.Client.Store.Features.DeleteContainer
|
|
|
|
@using Fluxor
|
2021-11-29 06:32:21 +00:00
|
|
|
|
2021-12-04 00:44:02 +00:00
|
|
|
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
|
2021-11-23 06:12:13 +00:00
|
|
|
|
2021-12-04 00:44:02 +00:00
|
|
|
@inject IDispatcher dispatch
|
|
|
|
@inject IState<DeleteContainerState> state
|
2021-11-23 06:12:13 +00:00
|
|
|
|
2021-12-04 00:44:02 +00:00
|
|
|
@{ string title = $"Delete Container \"{this.state.Value.BookmarkContainerTitleToDelete}\""; }
|
|
|
|
|
|
|
|
<Dialog Title="@title" Active="this.state.Value.ShowDeleteContainerForm" OnClose="this.OnDialogClose">
|
|
|
|
@if (this.state.Value.DeleteContainerErrorMessage != null)
|
2021-11-23 06:12:13 +00:00
|
|
|
{
|
2021-12-04 00:44:02 +00:00
|
|
|
<Alert Type="Alert.AlertType.Error">
|
|
|
|
@this.state.Value.DeleteContainerErrorMessage
|
|
|
|
</Alert>
|
2021-11-23 06:12:13 +00:00
|
|
|
}
|
2021-12-04 00:44:02 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
Are you sure you want to delete the bookmark container
|
|
|
|
"@this.state.Value.BookmarkContainerTitleToDelete"?
|
|
|
|
</p>
|
2021-11-23 06:12:13 +00:00
|
|
|
<div class="text-right">
|
2021-12-04 00:44:02 +00:00
|
|
|
@if (!this.state.Value.IsLoadingDeleteContainer)
|
|
|
|
{
|
|
|
|
<button type="button" class="btn" @onclick="this.OnDialogClose">Cancel</button>
|
|
|
|
<button type="submit" class="btn btn-error" @onclick="this.OnConfirmDelete">Delete</button>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<button type="button" disabled class="btn" @onclick="this.OnDialogClose">Cancel</button>
|
|
|
|
<button type="submit" disabled class="btn btn-error loading" @onclick="this.OnConfirmDelete">Delete</button>
|
|
|
|
}
|
2021-11-23 06:12:13 +00:00
|
|
|
</div>
|
|
|
|
</Dialog>
|
|
|
|
|
|
|
|
@code {
|
2021-12-04 00:44:02 +00:00
|
|
|
public void OnDialogClose()
|
2021-11-23 06:12:13 +00:00
|
|
|
{
|
2021-12-04 00:44:02 +00:00
|
|
|
this.dispatch.Dispatch(new HideDeleteContainerFormAction());
|
2021-11-23 06:12:13 +00:00
|
|
|
}
|
|
|
|
|
2021-12-04 00:44:02 +00:00
|
|
|
public void OnConfirmDelete()
|
2021-11-23 06:12:13 +00:00
|
|
|
{
|
2021-12-04 00:44:02 +00:00
|
|
|
this.dispatch.Dispatch(new SubmitDeleteContainerAction(
|
|
|
|
this.state.Value.BookmarkContainerIdToDelete));
|
2021-11-23 06:12:13 +00:00
|
|
|
}
|
|
|
|
}
|