refactor: cleanup
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -2,4 +2,6 @@ bin/
|
||||
obj/
|
||||
/packages/
|
||||
riderModule.iml
|
||||
/_ReSharper.Caches/
|
||||
/_ReSharper.Caches/
|
||||
.idea/
|
||||
*.sln.DotSettings.user
|
||||
|
||||
4
.idea/.idea.CaddyManager/.idea/encodings.xml
generated
4
.idea/.idea.CaddyManager/.idea/encodings.xml
generated
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Method to handle the system preference change for dark mode
|
||||
/// </summary>
|
||||
@@ -34,4 +39,4 @@ public partial class MainLayout
|
||||
StateHasChanged();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ app.MapStaticAssets();
|
||||
app.MapRazorComponents<App>()
|
||||
.AddInteractiveServerRenderMode();
|
||||
|
||||
app.Run();
|
||||
app.Run();
|
||||
|
||||
@@ -98,7 +98,7 @@ public class CaddyService(IConfigurationsService configurationsService) : ICaddy
|
||||
public CaddyDeleteOperationResponse DeleteCaddyConfigurations(List<string> configurationNames)
|
||||
{
|
||||
var failed = new List<string>();
|
||||
|
||||
|
||||
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()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user