Store branding: Unify public pages (#4568)

Closes #3842.
This commit is contained in:
d11n
2023-01-30 09:23:49 +01:00
committed by GitHub
parent 14313291d5
commit f821e35cb0
30 changed files with 611 additions and 646 deletions

View File

@@ -180,14 +180,25 @@ namespace BTCPayServer.Controllers
[AllowAnonymous]
public async Task<IActionResult> ViewPaymentRequest(string payReqId)
{
var result = await _PaymentRequestService.GetPaymentRequest(payReqId, GetUserId());
if (result == null)
var vm = await _PaymentRequestService.GetPaymentRequest(payReqId, GetUserId());
if (vm == null)
{
return NotFound();
}
result.HubPath = PaymentRequestHub.GetHubPath(Request);
return View(result);
var store = await _storeRepository.FindStore(vm.StoreId);
if (store == null)
{
return NotFound();
}
var storeBlob = store.GetStoreBlob();
vm.StoreName = store.StoreName;
vm.BrandColor = storeBlob.BrandColor;
vm.LogoFileId = storeBlob.LogoFileId;
vm.CssFileId = storeBlob.CssFileId;
vm.HubPath = PaymentRequestHub.GetHubPath(Request);
return View(vm);
}
[HttpGet("{payReqId}/form")]