mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 06:35:13 +01:00
Moves the `ViewsRazor` extension into Abstractions, so that it can be used by plugins. Separated out of #2701, prerequisite for the LNbank plugin integration.
66 lines
2.6 KiB
Text
66 lines
2.6 KiB
Text
|
|
@using BTCPayServer.Views.Stores
|
|
@using BTCPayServer.Abstractions.Extensions
|
|
@model BTCPayServer.Services.Altcoins.Ethereum.UI.ViewEthereumStoreOptionsViewModel
|
|
@inject SignInManager<ApplicationUser> SignInManager;
|
|
@inject BTCPayNetworkProvider BTCPayNetworkProvider;
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.ActivePage, "Ethereum Settings", Context.GetStoreData().StoreName);
|
|
ViewData["NavPartialName"] = "../Stores/_Nav";
|
|
}
|
|
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
<div class="form-group">
|
|
<table class="table table-sm table-responsive-md">
|
|
<thead>
|
|
<tr>
|
|
<th>Crypto</th>
|
|
<th>Root address</th>
|
|
<th class="text-center">Enabled</th>
|
|
<th class="text-right">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model.Items)
|
|
{
|
|
<tr>
|
|
<td>@item.CryptoCode</td>
|
|
<td>@item.RootAddress</td>
|
|
<td class="text-center">
|
|
@if (item.Enabled)
|
|
{
|
|
<span class="text-success fa fa-check"></span>
|
|
}
|
|
else
|
|
{
|
|
<span class="text-danger fa fa-times"></span>
|
|
}
|
|
</td>
|
|
<td class="text-right">
|
|
<a id="Modify@(item.CryptoCode)" asp-action="GetStoreEthereumLikePaymentMethod"
|
|
asp-route-storeId="@Context.GetRouteValue("storeId")"
|
|
asp-route-cryptoCode="@item.CryptoCode">
|
|
Modify
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if (SignInManager.IsSignedIn(User) && User.IsInRole(Roles.ServerAdmin))
|
|
{
|
|
var chains = BTCPayNetworkProvider.GetAll().OfType<EthereumBTCPayNetwork>().Select(network => network.ChainId).Distinct();
|
|
foreach (var chain in chains)
|
|
{
|
|
<a asp-action="UpdateChainConfig" asp-controller="EthereumConfig" asp-route-chainId="@chain">Configure Web3 for chain @chain</a>
|
|
}
|
|
}
|
|
@section PageFootContent {
|
|
@await Html.PartialAsync("_ValidationScriptsPartial")
|
|
}
|