fix: handle dialog result for Caddy restart and ensure processing state is updated on failure
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Caddy Manager CI build / docker (push) Successful in 1m2s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Caddy Manager CI build / docker (push) Successful in 1m2s
				
			This commit is contained in:
		| @@ -74,7 +74,13 @@ public partial class CaddyReverseProxiesPage : ComponentBase | ||||
|                 { p => p.InitialContent, initialContent } | ||||
|             }); | ||||
|  | ||||
|         _ = await dialog.Result; | ||||
|         var result = await dialog.Result; | ||||
|  | ||||
|         if (result is { Data: bool, Canceled: false } && (bool)result.Data) | ||||
|         { | ||||
|             await RestartCaddy(); | ||||
|         } | ||||
|  | ||||
|         Refresh(); | ||||
|     } | ||||
|  | ||||
| @@ -175,6 +181,8 @@ public partial class CaddyReverseProxiesPage : ComponentBase | ||||
|         catch | ||||
|         { | ||||
|             Snackbar.Add("Failed to restart the Caddy container", Severity.Error); | ||||
|             _isProcessing = false; | ||||
|             StateHasChanged(); | ||||
|         } | ||||
|     } | ||||
|      | ||||
|   | ||||
		Reference in New Issue
	
	Block a user