mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Store Branding: Refactoring and logo as favicon (#5519)
* Store Branding: Refactoring and logo as favicon - Encapsulates store branding properties into their own view model - Uses the logo as favicon on public pages * Refactorings * Updates
This commit is contained in:
@@ -5,6 +5,7 @@ using BTCPayServer.Data;
|
||||
using BTCPayServer.Filters;
|
||||
using BTCPayServer.Lightning;
|
||||
using BTCPayServer.Logging;
|
||||
using BTCPayServer.Models;
|
||||
using BTCPayServer.Payments;
|
||||
using BTCPayServer.Payments.Lightning;
|
||||
using BTCPayServer.Services.Stores;
|
||||
@@ -42,9 +43,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
CryptoCode = cryptoCode,
|
||||
StoreName = store.StoreName,
|
||||
BrandColor = storeBlob.BrandColor,
|
||||
LogoFileId = storeBlob.LogoFileId,
|
||||
CssFileId = storeBlob.CssFileId
|
||||
StoreBranding = new StoreBrandingViewModel(storeBlob)
|
||||
};
|
||||
try
|
||||
{
|
||||
@@ -74,7 +73,6 @@ namespace BTCPayServer.Controllers
|
||||
return existing;
|
||||
}
|
||||
|
||||
|
||||
private string GetImage(PaymentMethodId paymentMethodId, BTCPayNetwork network)
|
||||
{
|
||||
var res = paymentMethodId.PaymentType == PaymentTypes.BTCLike
|
||||
@@ -84,7 +82,6 @@ namespace BTCPayServer.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ShowLightningNodeInfoViewModel
|
||||
{
|
||||
public class NodeData
|
||||
@@ -103,13 +100,11 @@ namespace BTCPayServer.Controllers
|
||||
return _connection;
|
||||
}
|
||||
}
|
||||
public StoreBrandingViewModel StoreBranding { get; set; }
|
||||
public NodeData[] NodeInfo { get; set; }
|
||||
public bool Available { get; set; }
|
||||
public string CryptoCode { get; set; }
|
||||
public string CryptoImage { get; set; }
|
||||
public string StoreName { get; set; }
|
||||
public string LogoFileId { get; set; }
|
||||
public string CssFileId { get; set; }
|
||||
public string BrandColor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user