AI-Studio/app/MindWork AI Studio/Dialogs/UpdateDialog.razor.cs

26 lines
779 B
C#
Raw Normal View History

2024-06-30 13:26:28 +00:00
using System.Reflection;
using AIStudio.Tools;
using Microsoft.AspNetCore.Components;
2024-08-21 06:30:01 +00:00
namespace AIStudio.Dialogs;
2024-06-30 13:26:28 +00:00
/// <summary>
/// The update dialog that is used to inform the user about an available update.
/// </summary>
public partial class UpdateDialog : ComponentBase
{
private static readonly Assembly ASSEMBLY = Assembly.GetExecutingAssembly();
private static readonly MetaDataAttribute META_DATA = ASSEMBLY.GetCustomAttribute<MetaDataAttribute>()!;
[CascadingParameter]
private MudDialogInstance MudDialog { get; set; } = null!;
[Parameter]
public UpdateResponse UpdateResponse { get; set; }
private void Cancel() => this.MudDialog.Cancel();
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(true));
}