2021-12-17 06:06:41 +00:00
|
|
|
@using Start.Client.Components.Shared
|
|
|
|
@using Start.Client.Store.Features.DeleteGroup
|
2021-12-11 21:56:35 +00:00
|
|
|
@using Fluxor
|
|
|
|
|
|
|
|
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
|
|
|
|
|
|
|
|
@inject IDispatcher dispatch
|
|
|
|
@inject IState<DeleteGroupState> state
|
|
|
|
|
2021-12-17 06:06:41 +00:00
|
|
|
<Dialog Active="this.state.Value.ShowDeleteGroupForm" OnClose="this.OnDialogClose">
|
|
|
|
<Header>
|
|
|
|
Delete Group "@this.state.Value.BookmarkGroupTitleToDelete"
|
|
|
|
</Header>
|
|
|
|
<Body>
|
|
|
|
@if (this.state.Value.DeleteGroupErrorMessage != null)
|
2021-12-11 21:56:35 +00:00
|
|
|
{
|
2021-12-17 06:06:41 +00:00
|
|
|
<Alert Type="Alert.AlertType.Error">
|
|
|
|
@this.state.Value.DeleteGroupErrorMessage
|
|
|
|
</Alert>
|
2021-12-11 21:56:35 +00:00
|
|
|
}
|
2021-12-17 06:06:41 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
Are you sure you want to delete the bookmark container
|
|
|
|
"@this.state.Value.BookmarkGroupTitleToDelete"?
|
|
|
|
</p>
|
|
|
|
<div class="text-right">
|
|
|
|
@if (!this.state.Value.IsLoadingDeleteGroup)
|
|
|
|
{
|
|
|
|
<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>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</Body>
|
2021-12-11 21:56:35 +00:00
|
|
|
</Dialog>
|
|
|
|
|
|
|
|
@code {
|
2021-12-17 06:06:41 +00:00
|
|
|
public void OnDialogClose()
|
|
|
|
{
|
2021-12-11 21:56:35 +00:00
|
|
|
this.dispatch.Dispatch(new HideDeleteGroupFormAction());
|
|
|
|
}
|
|
|
|
|
2021-12-17 06:06:41 +00:00
|
|
|
public void OnConfirmDelete()
|
|
|
|
{
|
2021-12-11 21:56:35 +00:00
|
|
|
this.dispatch.Dispatch(new SubmitDeleteGroupFormAction(
|
|
|
|
this.state.Value.BookmarkGroupIdToDelete));
|
|
|
|
}
|
|
|
|
}
|