diff --git a/.gitignore b/.gitignore index add57be..cba49bc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ bin/ obj/ /packages/ riderModule.iml -/_ReSharper.Caches/ \ No newline at end of file +/_ReSharper.Caches/ +.idea/ +*.sln.DotSettings.user diff --git a/.idea/.idea.CaddyManager/.idea/encodings.xml b/.idea/.idea.CaddyManager/.idea/encodings.xml deleted file mode 100644 index df87cf9..0000000 --- a/.idea/.idea.CaddyManager/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/CaddyManager/Components/Layout/MainLayout.razor.cs b/CaddyManager/Components/Layout/MainLayout.razor.cs index e87bac4..15f50c4 100644 --- a/CaddyManager/Components/Layout/MainLayout.razor.cs +++ b/CaddyManager/Components/Layout/MainLayout.razor.cs @@ -6,9 +6,14 @@ public partial class MainLayout { // To allow the menu button to control the drawer private NavigationDrawer _drawer = null!; - + + // To control the dark mode private bool _isDarkMode; + + // Indicates if the component is initializing, hence would not render anything to not confuse the user private bool _isInitialing = true; + + // Used for the system preference for dark mode private MudThemeProvider _mudThemeProvider = null!; protected override async Task OnAfterRenderAsync(bool firstRender) @@ -22,7 +27,7 @@ public partial class MainLayout StateHasChanged(); } } - + /// /// Method to handle the system preference change for dark mode /// @@ -34,4 +39,4 @@ public partial class MainLayout StateHasChanged(); return Task.CompletedTask; } -} \ No newline at end of file +} diff --git a/CaddyManager/Program.cs b/CaddyManager/Program.cs index c6b89d6..cb7615a 100644 --- a/CaddyManager/Program.cs +++ b/CaddyManager/Program.cs @@ -43,4 +43,4 @@ app.MapStaticAssets(); app.MapRazorComponents() .AddInteractiveServerRenderMode(); -app.Run(); \ No newline at end of file +app.Run(); diff --git a/CaddyManager/Services/Caddy/CaddyService.cs b/CaddyManager/Services/Caddy/CaddyService.cs index 020938c..1a378ea 100644 --- a/CaddyManager/Services/Caddy/CaddyService.cs +++ b/CaddyManager/Services/Caddy/CaddyService.cs @@ -98,7 +98,7 @@ public class CaddyService(IConfigurationsService configurationsService) : ICaddy public CaddyDeleteOperationResponse DeleteCaddyConfigurations(List configurationNames) { var failed = new List(); - + foreach (var configurationName in configurationNames) { var filePath = Path.Combine(Configurations.ConfigDir, @@ -120,7 +120,7 @@ public class CaddyService(IConfigurationsService configurationsService) : ICaddy failed.Add(configurationName); } } - + return new CaddyDeleteOperationResponse { Success = failed.Count == 0, @@ -130,4 +130,4 @@ public class CaddyService(IConfigurationsService configurationsService) : ICaddy DeletedConfigurations = configurationNames.Except(failed).ToList() }; } -} \ No newline at end of file +}