Files
BTCPayServerPlugins/Plugins/BTCPayServer.Plugins.LiquidPlus/Views/Shared/LiquidNav.cshtml
2023-12-20 09:29:32 +01:00

27 lines
1.2 KiB
Plaintext

@using BTCPayServer
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client
@using BTCPayServer.Plugins.Altcoins
@using BTCPayServer.Plugins.LiquidPlus.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using Microsoft.AspNetCore.Routing
@inject BTCPayNetworkProvider BTCPayNetworkProvider;
@inject IScopeProvider ScopeProvider
@{
var storeId = ScopeProvider.GetCurrentStoreId();
var isActive = !string.IsNullOrEmpty(storeId) && ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null &&
nameof(StoreLiquidController).StartsWith(controller?.ToString(), StringComparison.InvariantCultureIgnoreCase);
}
@if (!string.IsNullOrEmpty(storeId) && (BTCPayNetworkProvider.GetAll().OfType<ElementsBTCPayNetwork>().Any()))
{
<li class="nav-item" permission="@Policies.CanModifyStoreSettings">
<a asp-route-storeId="@storeId" asp-action="GenerateLiquidScript" asp-controller="StoreLiquid" class="nav-link js-scroll-trigger @(isActive ? "active" : string.Empty)">
<svg role="img" class="icon">
</svg>
<span >Liquid+</span>
</a>
</li>
}