mirror of
https://github.com/aljazceru/btcpayserver-breez-nodeless-spark.git
synced 2025-12-17 01:14:19 +01:00
- Fixed controller action references in Info.cshtml - Updated partial view path in Payments.cshtml - Fixed all SetActivePage calls to use BreezSpark - Updated BreezPaymentsTable to BreezSparkPaymentsTable - Fixed CSS IDs and selectors throughout views - All navigation now correctly references BreezSpark controller
60 lines
5.6 KiB
Plaintext
60 lines
5.6 KiB
Plaintext
@using Breez.Sdk
|
|
@using BTCPayServer.Abstractions.Contracts
|
|
@using BTCPayServer.Abstractions.Extensions
|
|
@using BTCPayServer.Client
|
|
@using BTCPayServer.Models.StoreViewModels
|
|
@using BTCPayServer.Plugins.BreezSpark
|
|
@using BTCPayServer.Security
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@inject IScopeProvider ScopeProvider
|
|
@inject BreezSparkService BreezService
|
|
@{
|
|
var storeId = Model switch
|
|
{
|
|
string s => s,
|
|
StoreDashboardViewModel dashboardModel => dashboardModel.StoreId,
|
|
_ => Context.GetImplicitStoreId()
|
|
};
|
|
var active = @ViewData.IsActivePage("BreezSpark");
|
|
var client = string.IsNullOrEmpty(active) ? null : BreezService.GetClient(storeId);
|
|
var sdk = client?.Sdk;
|
|
}
|
|
@if (!string.IsNullOrEmpty(storeId))
|
|
{
|
|
<li class="nav-item">
|
|
<a permission="@Policies.CanViewStoreSettings" asp-controller="BreezSpark" asp-action="Index" asp-route-storeId="@storeId" class="nav-link @active" id="Nav-BreezSpark">
|
|
|
|
<svg style="width: 15px; margin-left: 3px; margin-right: 7px;" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<g id="favicon-64-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
<g id="Group" transform="translate(3.000000, 2.000000)" fill-rule="nonzero">
|
|
<path d="M35.4723926,39.8214286 C35.4723926,37.9541367 33.9340883,36.4285714 32.0236136,36.4285714 L10.3260796,36.4285714 C8.42801059,36.4285714 6.87730061,37.9419322 6.87730061,39.8214286 C6.87730061,41.6887205 8.41560491,43.2142857 10.3260796,43.2142857 L32.0236136,43.2142857 C33.9216827,43.2020812 35.4723926,41.6887205 35.4723926,39.8214286 Z" id="Shape" fill="currentColor"></path>
|
|
<path d="M49.7395693,25.9068425 C51.3370507,23.7180544 52.2855553,21.0346249 52.2855553,18.1162407 C52.2855553,10.7460841 46.257559,4.77328937 38.819286,4.77328937 L36.9721981,4.77328937 L36.9721981,3.32646331 C36.9721981,1.48392415 35.462079,0 33.614991,0 C31.7554228,0 30.257784,1.49629019 30.257784,3.32646331 L30.257784,4.77328937 L26.8381753,4.77328937 L26.8381753,4.7856554 L24.6790793,4.7856554 C22.8819126,4.7856554 21.4341951,6.23248145 21.4341951,8.0008244 C21.4341951,9.78153339 22.894393,11.2159934 24.6790793,11.2159934 L26.8381753,11.2159934 L26.8381753,11.2283594 L38.7693647,11.2283594 C42.5009815,11.2283594 45.5212199,14.2209398 45.5212199,17.9183842 L45.5212199,17.9307502 C45.5212199,21.5292663 42.6507454,24.5342127 39.0439319,24.6084089 C38.3824747,24.6207749 36.3856229,24.6084089 36.3856229,24.6084089 C36.3731426,24.6084089 36.3481819,24.6084089 36.3357016,24.6084089 L36.310741,24.6084089 C34.3263695,24.657873 32.7413684,26.3520198 32.9535339,28.3800495 C33.1407387,30.1483924 34.7382202,31.4468261 36.5353868,31.4468261 L43.3496435,31.4468261 C44.0485417,31.4468261 44.7599201,31.4962902 45.4338576,31.6694147 C49.0905925,32.6215993 51.7988227,35.9109646 51.7988227,39.8433636 C51.7988227,44.5053586 47.9798437,48.2893652 43.2747616,48.2893652 L22.7071881,48.2893652 L18.8382878,48.2893652 C17.0161605,48.2893652 15.3937184,49.6125309 15.2189939,51.4056059 C15.0193087,53.4583677 16.6542311,55.1896125 18.6885239,55.1896125 L30.257784,55.1896125 L30.257784,56.6735367 C30.257784,58.5160758 31.7679031,60 33.614991,60 C35.4745593,60 36.9721981,58.5037098 36.9721981,56.6735367 L36.9721981,55.1896125 L39.8925939,55.1896125 C39.8925939,55.1896125 39.8925939,55.1896125 39.9050742,55.1896125 L43.5742894,55.1896125 C52.0983505,55.1896125 58.9999695,48.3388293 58.9999695,39.9051937 C59.0124498,33.6479802 55.1934708,28.2563891 49.7395693,25.9068425 Z" id="Shape" fill="currentColor"></path>
|
|
<path d="M22.4417178,28.0357143 C22.4417178,26.1684224 20.8948734,24.6428571 18.9737925,24.6428571 L3.46792526,24.6428571 C1.55931891,24.6428571 0,26.1562179 0,28.0357143 C0,29.9030062 1.54684436,31.4285714 3.46792526,31.4285714 L18.9737925,31.4285714 C20.8948734,31.4285714 22.4417178,29.9030062 22.4417178,28.0357143 Z" id="Shape" fill="currentColor"></path>
|
|
<path d="M15.7746737,21.4285714 L31.280541,21.4285714 C33.1891473,21.4285714 34.7484663,19.9152107 34.7484663,18.0357143 C34.7484663,16.1684224 33.2016219,14.6428571 31.280541,14.6428571 L15.7746737,14.6428571 C13.8660674,14.6428571 12.3067485,16.1562179 12.3067485,18.0357143 C12.3067485,19.9030062 13.8535928,21.4285714 15.7746737,21.4285714 Z" id="Shape" fill="currentColor"></path>
|
|
</g>
|
|
</g>
|
|
</svg>
|
|
<span>BreezSpark</span>
|
|
</a>
|
|
</li>
|
|
|
|
@if (sdk is not null)
|
|
{
|
|
<li class="nav-item nav-item-sub">
|
|
|
|
<a permission="@Policies.CanViewStoreSettings" asp-action="Info" asp-route-storeId="@storeId" class="nav-link @ViewData.IsActivePage("BreezSpark", null, "Info")">Info</a>
|
|
</li>
|
|
<li class="nav-item nav-item-sub">
|
|
<a permission="@Policies.CanViewStoreSettings" asp-action="Payments" asp-route-storeId="@storeId" class="nav-link @ViewData.IsActivePage("BreezSpark", null, "Payments")">Payments</a>
|
|
</li>
|
|
<li class="nav-item nav-item-sub">
|
|
<a permission="@Policies.CanModifyStoreSettings" asp-action="Configure" asp-route-storeId="@storeId" class="nav-link @ViewData.IsActivePage("BreezSpark", null, "Configure")">Configuration</a>
|
|
</li>
|
|
@if (client.Events.Any())
|
|
{
|
|
<li class="nav-item nav-item-sub">
|
|
<a permission="@Policies.CanViewStoreSettings" asp-action="Logs" asp-route-storeId="@storeId" class="nav-link @ViewData.IsActivePage("BreezSpark", null, "Logs")">Logs</a>
|
|
</li>
|
|
}
|
|
}
|
|
} |