mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-23 15:14:49 +01:00
Plugins: Allow payout processors to signal they cannot be removed through common UI
This commit is contained in:
@@ -14,4 +14,5 @@ public interface IPayoutProcessorFactory
|
||||
public string ConfigureLink(string storeId, PaymentMethodId paymentMethodId, HttpRequest request);
|
||||
public IEnumerable<PaymentMethodId> GetSupportedPaymentMethods();
|
||||
public Task<IHostedService> ConstructProcessor(PayoutProcessorData settings);
|
||||
public Task<bool> CanRemove() => Task.FromResult(true);
|
||||
}
|
||||
|
||||
@@ -43,8 +43,12 @@
|
||||
else
|
||||
{
|
||||
<a href="@processorsView.Factory.ConfigureLink(storeId, conf.Key, Context.Request)">Modify</a>
|
||||
<span>-</span>
|
||||
<a asp-action="Remove" asp-route-storeId="@storeId" asp-route-id="@conf.Value.Id" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="The @Html.Encode(processorsView.Factory.FriendlyName) for @Html.Encode(conf.Key.CryptoCode) will be removed from your store.">Remove</a>
|
||||
|
||||
@if (await processorsView.Factory.CanRemove())
|
||||
{
|
||||
<span>-</span>
|
||||
<a asp-action="Remove" asp-route-storeId="@storeId" asp-route-id="@conf.Value.Id" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="The @Html.Encode(processorsView.Factory.FriendlyName) for @Html.Encode(conf.Key.CryptoCode) will be removed from your store.">Remove</a>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user