Merge pull request #1939 from btcpayserver/fix/updateurl_ux

Showing CheckForNewVersions checkbox only if BTCPAY_UPDATEURL is set
This commit is contained in:
Nicolas Dorier
2020-10-05 19:37:03 +09:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -254,6 +254,7 @@ namespace BTCPayServer.Controllers
{
var data = (await _SettingsRepository.GetSettingAsync<PoliciesSettings>()) ?? new PoliciesSettings();
ViewBag.AppsList = await GetAppSelectList();
ViewBag.UpdateUrlPresent = _Options.UpdateUrl != null;
return View(data);
}

View File

@@ -1,4 +1,4 @@
@model BTCPayServer.Services.PoliciesSettings
@model BTCPayServer.Services.PoliciesSettings
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Policies);
}
@@ -42,11 +42,14 @@
<label asp-for="AllowHotWalletRPCImportForAll" class="form-check-label"></label>
<span asp-validation-for="AllowHotWalletRPCImportForAll" class="text-danger"></span>
</div>
@if (ViewBag.UpdateUrlPresent)
{
<div class="form-check">
<input asp-for="CheckForNewVersions" type="checkbox" class="form-check-input" />
<label asp-for="CheckForNewVersions" class="form-check-label"></label>
<span asp-validation-for="CheckForNewVersions" class="text-danger"></span>
</div>
}
</div>
<div class="form-group">
<label asp-for="RootAppId"></label>