mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-19 00:24:25 +01:00
make prism support opensats
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
@using BTCPayServer.Abstractions.Extensions
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@{
|
||||
ViewData.SetActivePage("Bringin", "Bringin", "Bringin");
|
||||
}
|
||||
<partial name="Bringin/BringinDashboardWidget"/>
|
||||
@@ -1,28 +0,0 @@
|
||||
@model BTCPayServer.Abstractions.Form.Field
|
||||
@{
|
||||
var isInvalid = ViewContext.ModelState[Model.Name]?.ValidationState is Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState.Invalid;
|
||||
var errors = isInvalid ? ViewContext.ModelState[Model.Name].Errors : null;
|
||||
}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="@Model.Name"@(Model.Required ? " data-required" : "")>
|
||||
@Safe.Raw(Model.Label)
|
||||
</label>
|
||||
<input id="@Model.Name" type="password" class="form-control @(errors is null ? "" : "is-invalid")"
|
||||
name="@Model.Name" value="@Model.Value" data-val="true" readonly="@Model.Constant"
|
||||
@if (!string.IsNullOrEmpty(Model.HelpText))
|
||||
{
|
||||
@Safe.Raw($" aria-describedby=\"HelpText-{Model.Name}\"")
|
||||
}
|
||||
@if (Model.Required)
|
||||
{
|
||||
@Safe.Raw($" data-val-required=\"{Model.Label} is required.\" required")
|
||||
}
|
||||
/>
|
||||
<span class="text-danger" data-valmsg-for="@Model.Name" data-valmsg-replace="true">@(isInvalid && errors.Any() ? errors.First().ErrorMessage : string.Empty)</span>
|
||||
@if (!string.IsNullOrEmpty(Model.HelpText))
|
||||
{
|
||||
<div id="@($"HelpText-{Model.Name}")" class="form-text">
|
||||
@Safe.Raw(Model.HelpText)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
@using BTCPayServer.Plugins.Bringin.Components
|
||||
@using BTCPayServer.Abstractions.Contracts
|
||||
@model BTCPayServer.Models.StoreViewModels.StoreDashboardViewModel
|
||||
@inject IScopeProvider ScopeProvider
|
||||
|
||||
@(await Html.RenderComponentAsync<BringinWidget>(RenderMode.ServerPrerendered, new
|
||||
{
|
||||
StoreId = ScopeProvider.GetCurrentStoreId()
|
||||
}))
|
||||
@@ -0,0 +1,23 @@
|
||||
@using BTCPayServer.Abstractions.Contracts
|
||||
@using BTCPayServer.Abstractions.Extensions
|
||||
@using BTCPayServer.Client
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@inject IScopeProvider ScopeProvider
|
||||
@{
|
||||
var storeId = ScopeProvider.GetCurrentStoreId();
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(storeId))
|
||||
{
|
||||
<li class="nav-item">
|
||||
<a permission="@Policies.CanModifyStoreSettings" asp-controller="Bringin" asp-action="Edit" asp-route-storeId="@storeId" class="nav-link @ViewData.IsActivePage("Bringin")" id="Nav-Bringin">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="margin-right: 7px;" width="14.000000pt" height="14.000000pt" viewBox="0 0 32.000000 32.000000" preserveAspectRatio="xMidYMid meet">
|
||||
|
||||
<g transform="translate(0.000000,32.000000) scale(0.100000,-0.100000)" fill="currentColor" stroke="none">
|
||||
<path d="M92 304 c-18 -10 -45 -33 -60 -52 -22 -29 -27 -46 -27 -92 0 -47 5 -63 29 -94 87 -115 267 -67 283 76 7 57 -15 108 -61 143 -46 35 -116 43 -164 19z m101 -102 c33 -29 19 -78 -32 -107 -11 -6 -13 -4 -8 8 6 16 -11 41 -35 50 -9 3 -4 12 14 26 18 14 25 27 21 38 -7 18 8 12 40 -15z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<span>Bringin</span>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
Reference in New Issue
Block a user