mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-12 10:30:47 +01:00
Add tooltip for store deriv + show "Not set" + "show end piece of string" (#1507)
* Add tooltip for store deriv + show "Not set" + "show end piece of string" fixes #1506 * use regex witchraft * adjust with regex
This commit is contained in:
parent
e49074d797
commit
b600e5777e
2 changed files with 23 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
@model StoreViewModel
|
@using System.Text.RegularExpressions
|
||||||
|
@model StoreViewModel
|
||||||
@{
|
@{
|
||||||
Layout = "../Shared/_NavLayout.cshtml";
|
Layout = "../Shared/_NavLayout.cshtml";
|
||||||
ViewData.SetActivePageAndTitle(StoreNavPages.Index, "Profile");
|
ViewData.SetActivePageAndTitle(StoreNavPages.Index, "Profile");
|
||||||
|
@ -107,7 +108,25 @@
|
||||||
{
|
{
|
||||||
<tr class="@(@scheme.Collapsed? "collapsed": "")">
|
<tr class="@(@scheme.Collapsed? "collapsed": "")">
|
||||||
<td>@scheme.Crypto</td>
|
<td>@scheme.Crypto</td>
|
||||||
<td class="smMaxWidth text-truncate">@scheme.Value</td>
|
<td title="@scheme.Value" data-toggle="tooltip">
|
||||||
|
@if (string.IsNullOrEmpty(scheme.Value))
|
||||||
|
{
|
||||||
|
<span class="smMaxWidth">Not set</span>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="d-inline-flex justify-content-between smMaxWidth">
|
||||||
|
<span class="text-truncate ">
|
||||||
|
@scheme.Value
|
||||||
|
</span>
|
||||||
|
@if (scheme.Value.Length > 20)
|
||||||
|
{
|
||||||
|
var match =Regex.Match(scheme.Value, @"((?:-\[(?:[^\]])+\])+|\S{6})$");
|
||||||
|
@match.Value;
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
<td style="text-align:center;">
|
<td style="text-align:center;">
|
||||||
@if(scheme.Enabled)
|
@if(scheme.Enabled)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
function handleInputGroupClearButtonDisplay(element) {
|
function handleInputGroupClearButtonDisplay(element) {
|
||||||
var inputs = $(element).parents(".input-group").find("input");
|
var inputs = $(element).parents(".input-group").find("input");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue