mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 14:40:36 +01:00
Resolve logo and CSS URLs
This commit is contained in:
parent
8224c84556
commit
afa3c46ce3
1 changed files with 3 additions and 2 deletions
|
@ -45,6 +45,7 @@ public class BtcPayAppController(
|
||||||
PaymentMethodHandlerDictionary handlers,
|
PaymentMethodHandlerDictionary handlers,
|
||||||
IFileService fileService,
|
IFileService fileService,
|
||||||
ISettingsRepository settingsRepository,
|
ISettingsRepository settingsRepository,
|
||||||
|
UriResolver uriResolver,
|
||||||
IOptionsMonitor<BearerTokenOptions> bearerTokenOptions)
|
IOptionsMonitor<BearerTokenOptions> bearerTokenOptions)
|
||||||
: Controller
|
: Controller
|
||||||
{
|
{
|
||||||
|
@ -64,10 +65,10 @@ public class BtcPayAppController(
|
||||||
RegistrationEnabled = policiesSettings.EnableRegistration,
|
RegistrationEnabled = policiesSettings.EnableRegistration,
|
||||||
CustomThemeExtension = themeSettings.CustomTheme ? themeSettings.CustomThemeExtension.ToString() : null,
|
CustomThemeExtension = themeSettings.CustomTheme ? themeSettings.CustomThemeExtension.ToString() : null,
|
||||||
CustomThemeCssUrl = themeSettings.CustomTheme && !string.IsNullOrEmpty(themeSettings.CustomThemeCssUrl?.ToString())
|
CustomThemeCssUrl = themeSettings.CustomTheme && !string.IsNullOrEmpty(themeSettings.CustomThemeCssUrl?.ToString())
|
||||||
? themeSettings.CustomThemeCssUrl.ToString()
|
? await uriResolver.Resolve(Request.GetAbsoluteRootUri(), themeSettings.CustomThemeCssUrl)
|
||||||
: null,
|
: null,
|
||||||
LogoUrl = !string.IsNullOrEmpty(themeSettings.LogoUrl?.ToString())
|
LogoUrl = !string.IsNullOrEmpty(themeSettings.LogoUrl?.ToString())
|
||||||
? themeSettings.LogoUrl.ToString()
|
? await uriResolver.Resolve(Request.GetAbsoluteRootUri(), themeSettings.LogoUrl)
|
||||||
: null
|
: null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue