mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Refactor themes (#2794)
* Remove Bootstrap/Creative CSS file customizability Customizations should be done using themes * Remove deprecated Casa and Classic themes They are still available in the design system repo and should be added as custom theme CSS file * Use either standard or custom theme * Remove deprecated themes * Improve theme select UI * Finish and refactor theme switching * updates theme copy * Update BTCPayServer/Views/Server/Theme.cshtml Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com> * Combine creative.css and site.css Co-authored-by: dstrukt <gfxdsign@gmail.com> Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
This commit is contained in:
@@ -8,16 +8,11 @@ namespace BTCPayServer
|
||||
{
|
||||
public static async Task<PoliciesSettings> GetPolicies(this ISettingsRepository settingsRepository)
|
||||
{
|
||||
return (await settingsRepository.GetSettingAsync<PoliciesSettings>()) ?? new PoliciesSettings();
|
||||
return await settingsRepository.GetSettingAsync<PoliciesSettings>() ?? new PoliciesSettings();
|
||||
}
|
||||
public static async Task<ThemeSettings> GetTheme(this ISettingsRepository settingsRepository)
|
||||
{
|
||||
var result = await settingsRepository.GetSettingAsync<ThemeSettings>() ?? new ThemeSettings();
|
||||
result.ThemeCssUri = string.IsNullOrWhiteSpace(result.ThemeCssUri) ? "/main/themes/default.css" : result.ThemeCssUri;
|
||||
result.CustomThemeCssUri = string.IsNullOrWhiteSpace(result.CustomThemeCssUri) ? null : result.CustomThemeCssUri;
|
||||
result.BootstrapCssUri = string.IsNullOrWhiteSpace(result.BootstrapCssUri) ? "/main/bootstrap/bootstrap.css" : result.BootstrapCssUri;
|
||||
result.CreativeStartCssUri = string.IsNullOrWhiteSpace(result.CreativeStartCssUri) ? "/main/bootstrap/creative.css" : result.CreativeStartCssUri;
|
||||
return result;
|
||||
return await settingsRepository.GetSettingAsync<ThemeSettings>() ?? new ThemeSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user