Improve and unify page headers (#2412)

* Improve and unify page headers

* Altcoin test fixes

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fix missing store name in pairing view

* Fix CanUsePairing test

* Bump header navigation font size

* Use partial tag instead of Html.PartialAsync in views

As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper).

* Fix docs link

As in #2432.

* Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
This commit is contained in:
d11n
2021-04-08 15:32:42 +02:00
committed by GitHub
parent 6473da7114
commit b12c4c5fa0
147 changed files with 1434 additions and 1790 deletions

View File

@@ -857,6 +857,12 @@ namespace BTCPayServer.Controllers
if (string.IsNullOrWhiteSpace(userId))
return Challenge(AuthenticationSchemes.Cookie);
var storeId = CurrentStore?.Id;
if (storeId != null)
{
var store = await _Repo.FindStore(storeId, userId);
if (store != null)
HttpContext.SetStoreData(store);
}
var model = new CreateTokenViewModel();
ViewBag.HidePublicKey = true;
ViewBag.ShowStores = true;
@@ -913,6 +919,14 @@ namespace BTCPayServer.Controllers
return Challenge(AuthenticationSchemes.Cookie);
if (pairingCode == null)
return NotFound();
if (selectedStore != null)
{
var store = await _Repo.FindStore(selectedStore, userId);
if (store == null)
return NotFound();
HttpContext.SetStoreData(store);
ViewBag.ShowStores = false;
}
var pairing = await _TokenRepository.GetPairingAsync(pairingCode);
if (pairing == null)
{
@@ -922,7 +936,7 @@ namespace BTCPayServer.Controllers
else
{
var stores = await _Repo.GetStoresByUserId(userId);
return View(new PairingModel()
return View(new PairingModel
{
Id = pairing.Id,
Label = pairing.Label,
@@ -981,8 +995,6 @@ namespace BTCPayServer.Controllers
return _UserManager.GetUserId(User);
}
// TODO: Need to have talk about how architect default currency implementation
// For now we have also hardcoded USD for Store creation and then Invoice creation
const string DEFAULT_CURRENCY = "USD";