mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html * Editorconfig: Keep 4 spaces indentation for Swagger JSON files They are all formatted that way, let's keep it like that. * Apply dotnet-format, mostly white-space related changes
This commit is contained in:
@@ -300,7 +300,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
ViewBag.UpdateUrlPresent = _Options.UpdateUrl != null;
|
||||
ViewBag.AppsList = await GetAppSelectList();
|
||||
|
||||
|
||||
if (command == "add-domain")
|
||||
{
|
||||
ModelState.Clear();
|
||||
@@ -403,7 +403,7 @@ namespace BTCPayServer.Controllers
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return View(result);
|
||||
}
|
||||
|
||||
@@ -989,11 +989,11 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
var settingsChanged = false;
|
||||
var settings = await _SettingsRepository.GetSettingAsync<ThemeSettings>() ?? new ThemeSettings();
|
||||
|
||||
|
||||
var userId = GetUserId();
|
||||
if (userId is null)
|
||||
return NotFound();
|
||||
|
||||
|
||||
if (model.CustomThemeFile != null)
|
||||
{
|
||||
if (model.CustomThemeFile.ContentType.Equals("text/css", StringComparison.InvariantCulture))
|
||||
@@ -1003,7 +1003,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
await _fileService.RemoveFile(settings.CustomThemeFileId, userId);
|
||||
}
|
||||
|
||||
|
||||
// add new file
|
||||
try
|
||||
{
|
||||
@@ -1027,7 +1027,7 @@ namespace BTCPayServer.Controllers
|
||||
settings.CustomThemeFileId = null;
|
||||
settingsChanged = true;
|
||||
}
|
||||
|
||||
|
||||
if (model.LogoFile != null)
|
||||
{
|
||||
if (model.LogoFile.ContentType.StartsWith("image/", StringComparison.InvariantCulture))
|
||||
@@ -1037,7 +1037,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
await _fileService.RemoveFile(settings.LogoFileId, userId);
|
||||
}
|
||||
|
||||
|
||||
// add new image
|
||||
try
|
||||
{
|
||||
@@ -1061,12 +1061,12 @@ namespace BTCPayServer.Controllers
|
||||
settings.LogoFileId = null;
|
||||
settingsChanged = true;
|
||||
}
|
||||
|
||||
|
||||
if (model.CustomTheme && !string.IsNullOrEmpty(model.CustomThemeCssUri) && !Uri.IsWellFormedUriString(model.CustomThemeCssUri, UriKind.RelativeOrAbsolute))
|
||||
{
|
||||
ModelState.AddModelError(nameof(settings.CustomThemeCssUri), "Please provide a non-empty theme URI");
|
||||
}
|
||||
|
||||
|
||||
if (settings.CustomThemeExtension != model.CustomThemeExtension)
|
||||
{
|
||||
// Require a custom theme to be defined in that case
|
||||
@@ -1080,7 +1080,7 @@ namespace BTCPayServer.Controllers
|
||||
settingsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (settings.CustomTheme != model.CustomTheme)
|
||||
{
|
||||
settings.CustomTheme = model.CustomTheme;
|
||||
|
||||
Reference in New Issue
Block a user