2022-11-14 14:29:23 +01:00
|
|
|
@using BTCPayServer.Abstractions.Contracts
|
|
|
|
@model BTCPayServer.Services.ThemeSettings
|
|
|
|
@inject IFileService FileService
|
2018-04-19 11:39:51 -05:00
|
|
|
@{
|
2021-12-16 11:17:02 +01:00
|
|
|
ViewData.SetActivePage(ServerNavPages.Theme, "Theme");
|
2022-11-14 14:29:23 +01:00
|
|
|
var canUpload = await FileService.IsAvailable();
|
2018-04-19 11:39:51 -05:00
|
|
|
}
|
|
|
|
|
2021-09-03 09:16:36 +02:00
|
|
|
@section PageFootContent {
|
|
|
|
<partial name="_ValidationScriptsPartial" />
|
|
|
|
}
|
|
|
|
|
2022-01-17 17:19:27 -08:00
|
|
|
<h3 class="mb-4">@ViewData["Title"]</h3>
|
2018-04-19 11:39:51 -05:00
|
|
|
|
|
|
|
<div class="row">
|
2022-01-27 03:56:46 +01:00
|
|
|
<div class="col-xl-8 col-xxl-constrain">
|
2022-11-14 14:29:23 +01:00
|
|
|
<form method="post" enctype="multipart/form-data">
|
2021-09-03 09:16:36 +02:00
|
|
|
<p>Use the default Light or Dark Themes, or provide a CSS theme file below.</p>
|
2022-11-14 14:29:23 +01:00
|
|
|
|
2021-09-03 09:16:36 +02:00
|
|
|
<div class="form-group d-flex align-items-center">
|
2022-04-13 21:09:37 -07:00
|
|
|
<input asp-for="CustomTheme" type="checkbox" class="btcpay-toggle me-3" data-bs-toggle="collapse" data-bs-target="#CustomThemeSettings" aria-expanded="@Model.CustomTheme" aria-controls="CustomThemeSettings" />
|
2021-09-03 09:16:36 +02:00
|
|
|
<label asp-for="CustomTheme" class="form-label mb-0"></label>
|
2018-04-19 11:39:51 -05:00
|
|
|
</div>
|
2021-09-03 09:16:36 +02:00
|
|
|
<div class="collapse @(Model.CustomTheme ? "show" : "")" id="CustomThemeSettings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="CustomThemeCssUri" class="form-label"></label>
|
2021-10-01 18:18:54 +02:00
|
|
|
<a href="https://docs.btcpayserver.org/Development/Theme/#1-custom-themes" target="_blank" rel="noreferrer noopener">
|
2021-09-03 09:16:36 +02:00
|
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
|
|
</a>
|
|
|
|
<input asp-for="CustomThemeCssUri" class="form-control" />
|
|
|
|
<span asp-validation-for="CustomThemeCssUri" class="text-danger"></span>
|
2022-11-14 14:29:23 +01:00
|
|
|
<span asp-validation-for="CustomTheme" class="text-danger"></span>
|
2021-09-03 09:16:36 +02:00
|
|
|
</div>
|
2018-04-19 11:39:51 -05:00
|
|
|
</div>
|
2021-09-03 09:16:36 +02:00
|
|
|
|
2022-11-14 14:29:23 +01:00
|
|
|
<h3 class="mt-5 mb-3">Branding</h3>
|
|
|
|
<div class="form-group">
|
2022-11-24 00:53:32 +01:00
|
|
|
<div class="d-flex align-items-center justify-content-between gap-2">
|
|
|
|
<label asp-for="LogoFile" class="form-label"></label>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.LogoFileId))
|
|
|
|
{
|
|
|
|
<button type="submit" class="btn btn-link p-0 text-danger" name="RemoveLogoFile" value="true">
|
|
|
|
<span class="fa fa-times"></span> Remove
|
|
|
|
</button>
|
|
|
|
}
|
|
|
|
</div>
|
2022-11-14 14:29:23 +01:00
|
|
|
@if (canUpload)
|
|
|
|
{
|
2022-11-24 00:53:32 +01:00
|
|
|
<div class="d-flex align-items-center gap-3">
|
2022-11-14 14:29:23 +01:00
|
|
|
<input asp-for="LogoFile" type="file" class="form-control flex-grow">
|
|
|
|
@if (!string.IsNullOrEmpty(Model.LogoFileId))
|
|
|
|
{
|
|
|
|
<img src="@(await FileService.GetFileUrl(Context.Request.GetAbsoluteRootUri(), Model.LogoFileId))" alt="Logo" style="height:2.1rem;max-width:10.5rem;"/>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
<span asp-validation-for="LogoFile" class="text-danger"></span>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<input asp-for="LogoFile" type="file" class="form-control" disabled>
|
|
|
|
<p class="form-text text-muted">In order to upload a logo, a <a asp-controller="UIServer" asp-action="Files">file storage</a> must be configured.</p>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
2021-11-24 00:59:19 -08:00
|
|
|
<button type="submit" class="btn btn-primary mt-2" name="command" value="Save">Save</button>
|
2018-04-19 11:39:51 -05:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|