@* Licensed under the MIT License. See LICENSE file in the project root for full license information. *@ @using MUnique.OpenMU.Web.AdminPanel.Properties @using MUnique.OpenMU.Web.Shared.Components.Form @using MUnique.OpenMU.Web.Shared.Services @implements IDisposable @inject CreationPanelService Panel @inject Blazored.Toast.Services.IToastService ToastService @if (this.Panel.Current is { } session) {
@if (!this.Panel.IsCollapsed) {

@session.Title

}
} @code { /// protected override void OnInitialized() { base.OnInitialized(); this.Panel.StateChanged += this.OnStateChanged; } /// public void Dispose() { this.Panel.StateChanged -= this.OnStateChanged; } private void OnStateChanged() { _ = this.InvokeAsync(this.StateHasChanged); } private async Task OnSubmitAsync() { try { await this.Panel.CompleteAsync(); } catch (Exception ex) { this.ToastService.ShowError($"Could not save the new entry: {ex.Message}"); } } private Task OnCancelAsync() { return this.Panel.CancelAsync(); } }