mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-03 06:04:24 +01:00
Also detects if the checkout page is shown within an iframe and hides the back to store link in that case.
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
@using BTCPayServer.Services
|
|
@inject ThemeSettings Theme
|
|
@inject UriResolver UriResolver
|
|
|
|
<script>
|
|
if (window.localStorage.getItem('btcpay-hide-sensitive-info') === 'true') { document.documentElement.setAttribute('data-hide-sensitive-info', 'true')}
|
|
if (window.location !== window.parent.location) { document.documentElement.setAttribute('data-within-iframe', 'true')}
|
|
</script>
|
|
@if (Theme.CustomTheme && Theme.CustomThemeCssUrl is not null)
|
|
{ // new customization uses theme file id provided by upload
|
|
@if (Theme.CustomThemeExtension != ThemeExtension.Custom)
|
|
{ // needs to be added for light and dark, because dark extends light
|
|
<link href="~/main/themes/default.css" rel="stylesheet" asp-append-version="true" />
|
|
}
|
|
@if (Theme.CustomThemeExtension == ThemeExtension.Dark)
|
|
{
|
|
<link href="~/main/themes/default-dark.css" rel="stylesheet" asp-append-version="true" />
|
|
}
|
|
var themeUrl = await UriResolver.Resolve(this.Context.Request.GetAbsoluteRootUri(), Theme.CustomThemeCssUrl);
|
|
<link href="@themeUrl" rel="stylesheet" asp-append-version="true" />
|
|
}
|
|
else
|
|
{
|
|
<link href="~/main/themes/default.css" asp-append-version="true" rel="stylesheet" />
|
|
<link href="~/main/themes/default-dark.css" asp-append-version="true" rel="stylesheet" id="DarkThemeLinkTag" />
|
|
<script src="~/js/theme-switch.js" asp-append-version="true"></script>
|
|
<noscript><style>.btcpay-theme-switch { display: none !important; }</style></noscript>
|
|
}
|
|
|