Branding updates for 2.0 (#5947)

* Remove deprecated CSS options

Closes #5945.

* Greenfield: Add brandColor to store APIs

Closes #5946.

* Migrate file IDs to URLs

Closes #5953.

* Greenfield: Add CSS and logo URL to store settings API

Closes #5945.

* Add migration test

* Store and Server branding can reference file's via fileid:ID

* Add PaymentSoundUrl to Store API

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
d11n
2024-05-09 02:18:02 +02:00
committed by GitHub
parent eba3475a1b
commit 4c303d358b
66 changed files with 526 additions and 605 deletions

View File

@@ -8,6 +8,7 @@ using BTCPayServer.Lightning;
using BTCPayServer.Models;
using BTCPayServer.Payments;
using BTCPayServer.Payments.Lightning;
using BTCPayServer.Services;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
@@ -21,16 +22,19 @@ namespace BTCPayServer.Controllers
{
private readonly BTCPayNetworkProvider _BtcPayNetworkProvider;
private readonly Dictionary<PaymentMethodId, IPaymentModelExtension> _paymentModelExtensions;
private readonly UriResolver _uriResolver;
private readonly PaymentMethodHandlerDictionary _handlers;
private readonly StoreRepository _StoreRepository;
public UIPublicLightningNodeInfoController(BTCPayNetworkProvider btcPayNetworkProvider,
Dictionary<PaymentMethodId, IPaymentModelExtension> paymentModelExtensions,
UriResolver uriResolver,
PaymentMethodHandlerDictionary handlers,
StoreRepository storeRepository)
{
_BtcPayNetworkProvider = btcPayNetworkProvider;
_paymentModelExtensions = paymentModelExtensions;
_uriResolver = uriResolver;
_handlers = handlers;
_StoreRepository = storeRepository;
}
@@ -49,7 +53,7 @@ namespace BTCPayServer.Controllers
{
CryptoCode = cryptoCode,
StoreName = store.StoreName,
StoreBranding = new StoreBrandingViewModel(storeBlob)
StoreBranding = await StoreBrandingViewModel.CreateAsync(Request, _uriResolver, storeBlob)
};
try
{