mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-13 11:35:51 +01:00
parent
439ea20a89
commit
eddd458744
3 changed files with 21 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
20
BTCPayServer/Views/Shared/Shopify/NavExtension.cshtml
Normal file
20
BTCPayServer/Views/Shared/Shopify/NavExtension.cshtml
Normal 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>
|
||||
}
|
|
@ -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>
|
Loading…
Add table
Reference in a new issue