diff --git a/LANCommander/Components/ArchiveBrowserDialog.razor b/LANCommander/Components/ArchiveBrowserDialog.razor index e4fda74..a64b6ad 100644 --- a/LANCommander/Components/ArchiveBrowserDialog.razor +++ b/LANCommander/Components/ArchiveBrowserDialog.razor @@ -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); } diff --git a/LANCommander/Components/ArchiveUploader.razor b/LANCommander/Components/ArchiveUploader.razor index 6b8c5e0..98c67fb 100644 --- a/LANCommander/Components/ArchiveUploader.razor +++ b/LANCommander/Components/ArchiveUploader.razor @@ -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() diff --git a/LANCommander/Components/ScriptEditorDialog.razor b/LANCommander/Components/ScriptEditorDialog.razor index c7ffba4..7c8690e 100644 --- a/LANCommander/Components/ScriptEditorDialog.razor +++ b/LANCommander/Components/ScriptEditorDialog.razor @@ -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) diff --git a/LANCommander/Pages/Games/Edit.razor b/LANCommander/Pages/Games/Edit.razor index e6b395d..52e9f17 100644 --- a/LANCommander/Pages/Games/Edit.razor +++ b/LANCommander/Pages/Games/Edit.razor @@ -288,14 +288,7 @@ ["GameId"] = Game.Id }; - var dialog = await DialogService.ShowAsync("Upload Archive", parameters, new DialogOptions() - { - CloseButton = false, - DisableBackdropClick = true, - FullWidth = true, - MaxWidth = MaxWidth.Large, - CloseOnEscapeKey = false, - }); + var dialog = await DialogService.ShowAsync("Upload Archive", parameters); var result = await dialog.Result; @@ -343,14 +336,7 @@ ["Script"] = script }; - var dialog = await DialogService.ShowAsync("Edit Script", parameters, new DialogOptions() - { - CloseButton = true, - DisableBackdropClick = true, - FullWidth = true, - MaxWidth = MaxWidth.ExtraLarge, - CloseOnEscapeKey = false, - }); + var dialog = await DialogService.ShowAsync("Edit Script", parameters); var result = await dialog.Result;