Fix missing shopify link

fixes #4945
This commit is contained in:
Kukks 2023-05-05 09:51:41 +02:00
parent 439ea20a89
commit eddd458744
No known key found for this signature in database
GPG key ID: 8E5530D9D1C93097
3 changed files with 21 additions and 12 deletions

View file

@ -15,6 +15,7 @@ namespace BTCPayServer.Plugins.Shopify
public override void Execute(IServiceCollection applicationBuilder)
{
applicationBuilder.AddSingleton<IHostedService, ShopifyOrderMarkerHostedService>();
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("Shopify/NavExtension", "header-nav"));
base.Execute(applicationBuilder);
}
}

View file

@ -0,0 +1,20 @@
@using BTCPayServer.Client
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Abstractions.TagHelpers
@using BTCPayServer.Views.Stores
@model BTCPayServer.Components.MainNav.MainNavViewModel
@{
var store = Context.GetStoreData();
}
@if (store != null)
{
<li class="nav-item" permission="@Policies.CanModifyStoreSettings">
<a asp-area="" asp-controller="UIShopify" asp-action="EditShopify" asp-route-storeId="@store.Id" class="nav-link @ViewData.IsActivePage("shopify", nameof(StoreNavPages))" id="StoreNav-Shopify">
<vc:icon symbol="shopify" />
<span>Shopify</span>
</a>
</li>
}

View file

@ -1,12 +0,0 @@
@using BTCPayServer.Views.Stores
@using BTCPayServer.Abstractions.Extensions
@{
var store = Context.GetStoreData();
}
<li class="nav-item">
<a asp-area="" asp-controller="UIShopify" asp-action="EditShopify" asp-route-storeId="@store.Id" class="nav-link @ViewData.IsActivePage("shopify", nameof(StoreNavPages))" id="StoreNav-Shopify">
<vc:icon symbol="shopify"/>
<span>Shopify</span>
</a>
</li>