Set dialog options within dialog

dashboard
Pat Hartl 2023-02-13 22:43:48 -06:00
parent 0c532de7e2
commit ff071d2680
4 changed files with 20 additions and 16 deletions

View File

@ -23,6 +23,8 @@
MudDialog.Options.MaxWidth = MaxWidth.Large;
MudDialog.Options.FullWidth = true;
MudDialog.Options.FullScreen = true;
MudDialog.Options.CloseButton = true;
MudDialog.Options.CloseOnEscapeKey = true;
MudDialog.SetOptions(MudDialog.Options);
}

View File

@ -63,6 +63,14 @@
protected override async Task OnInitializedAsync()
{
MudDialog.Options.MaxWidth = MaxWidth.Large;
MudDialog.Options.FullWidth = true;
MudDialog.Options.CloseButton = false;
MudDialog.Options.CloseOnEscapeKey = false;
MudDialog.Options.DisableBackdropClick = true;
MudDialog.SetOptions(MudDialog.Options);
HttpClient.BaseAddress = new Uri(Navigator.BaseUri);
Archive = new Archive()

View File

@ -68,6 +68,14 @@
protected override async Task OnInitializedAsync()
{
MudDialog.Options.MaxWidth = MaxWidth.ExtraLarge;
MudDialog.Options.FullWidth = true;
MudDialog.Options.CloseButton = true;
MudDialog.Options.CloseOnEscapeKey = false;
MudDialog.Options.DisableBackdropClick = true;
MudDialog.SetOptions(MudDialog.Options);
Snippets = ScriptService.GetSnippets();
if (Script == null)

View File

@ -288,14 +288,7 @@
["GameId"] = Game.Id
};
var dialog = await DialogService.ShowAsync<ArchiveUploader>("Upload Archive", parameters, new DialogOptions()
{
CloseButton = false,
DisableBackdropClick = true,
FullWidth = true,
MaxWidth = MaxWidth.Large,
CloseOnEscapeKey = false,
});
var dialog = await DialogService.ShowAsync<ArchiveUploader>("Upload Archive", parameters);
var result = await dialog.Result;
@ -343,14 +336,7 @@
["Script"] = script
};
var dialog = await DialogService.ShowAsync<ScriptEditorDialog>("Edit Script", parameters, new DialogOptions()
{
CloseButton = true,
DisableBackdropClick = true,
FullWidth = true,
MaxWidth = MaxWidth.ExtraLarge,
CloseOnEscapeKey = false,
});
var dialog = await DialogService.ShowAsync<ScriptEditorDialog>("Edit Script", parameters);
var result = await dialog.Result;