Do not show set up wallet link in dashboard

fixes #4116
This commit is contained in:
Kukks 2022-09-13 16:14:46 +02:00
parent 75689c665d
commit 8a7470500a
No known key found for this signature in database
GPG Key ID: 8E5530D9D1C93097
3 changed files with 22 additions and 16 deletions

View File

@ -33,6 +33,7 @@ namespace BTCPayServer.Controllers
StoreId = CurrentStore.Id,
StoreName = CurrentStore.StoreName,
CryptoCode = cryptoCode,
Network = _NetworkProvider.DefaultNetwork,
IsSetUp = walletEnabled || lightningEnabled
};

View File

@ -13,4 +13,5 @@ public class StoreDashboardViewModel
public bool LightningSupported { get; set; }
public bool IsSetUp { get; set; }
public List<AppData> Apps { get; set; } = new();
public BTCPayNetworkBase Network { get; set; }
}

View File

@ -145,24 +145,28 @@ else
<h5 class="mb-0 text-success">Create your store</h5>
</div>
</div>
@if (!Model.WalletEnabled)
@if (Model.Network is BTCPayNetwork)
{
<a asp-controller="UIStores" asp-action="SetupWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@Model.CryptoCode" id="SetupGuide-Wallet" class="list-group-item list-group-item-action d-flex align-items-center order-1">
<vc:icon symbol="new-wallet"/>
<div class="content">
<h5 class="mb-0">Set up a wallet</h5>
@if (!Model.WalletEnabled)
{
<a asp-controller="UIStores" asp-action="SetupWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@Model.CryptoCode" id="SetupGuide-Wallet" class="list-group-item list-group-item-action d-flex align-items-center order-1">
<vc:icon symbol="new-wallet"/>
<div class="content">
<h5 class="mb-0">Set up a wallet</h5>
</div>
<vc:icon symbol="caret-right"/>
</a>
}
else
{
<div class="list-group-item d-flex align-items-center" id="SetupGuide-WalletDone">
<vc:icon symbol="done"/>
<div class="content">
<h5 class="mb-0 text-success">Set up a wallet</h5>
</div>
</div>
<vc:icon symbol="caret-right"/>
</a>
}
else
{
<div class="list-group-item d-flex align-items-center" id="SetupGuide-WalletDone">
<vc:icon symbol="done"/>
<div class="content">
<h5 class="mb-0 text-success">Set up a wallet</h5>
</div>
</div>
}
}
@if (Model.LightningSupported) {
if (!Model.LightningEnabled)