Skip to content

Commit 0a696ce

Browse files
committed
Updated to close the config dialog on save.
1 parent 7a2fe26 commit 0a696ce

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Pages/Configs.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ else
188188
}
189189
}
190190

191-
private async Task SaveConfig(Nginx.ConfigFile conf)
191+
private async Task SaveConfig(Nginx.ConfigFile conf, DialogService ds)
192192
{
193193
try
194194
{
@@ -197,6 +197,8 @@ else
197197
await conf.Save();
198198

199199
await layout!.DisplayToastAsync(MainLayout.toastType.success, $"Config %ss%{conf.Name}%se% saved successfully!");
200+
201+
ds.Close();
200202
}
201203
catch
202204
{
@@ -424,7 +426,7 @@ else
424426
{
425427
var result = await DialogService.OpenAsync("Edit Config - " + conf.Name, ds =>
426428
@<RadzenCard>
427-
<RadzenButton Click=@(() => SaveConfig(conf)) Disabled="busyRefreshing" Text="Save" Icon="save" BusyText="Saving..." IsBusy="conf.busySaving" class="rz-background-color-success-dark" Style="margin-right: 25px;" />
429+
<RadzenButton Click=@(() => SaveConfig(conf, ds)) Disabled="busyRefreshing" Text="Save" Icon="save" BusyText="Saving..." IsBusy="conf.busySaving" class="rz-background-color-success-dark" Style="margin-right: 25px;" />
428430
<RadzenButton Click=@(() => AutoFormatConfig(conf)) Disabled="busyRefreshing" Text="Auto Format" Icon="brush" BusyText="Formatting..." IsBusy="conf.busySaving" class="rz-background-color-primary-dark" Style="margin-right: 5px;" />
429431
<RadzenButton Click=@(() => RevertConfig(conf)) Disabled="busyRefreshing" Text="Revert" Icon="upload_file" BusyText="Reverting..." IsBusy="conf.busySaving" class="rz-background-color-primary-dark" />
430432

0 commit comments

Comments
 (0)