mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
4c303d358b
* 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>
40 lines
1008 B
C#
40 lines
1008 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using BTCPayServer.JsonConverters;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Services;
|
|
|
|
public enum ThemeExtension
|
|
{
|
|
[Display(Name = "Does not extend a BTCPay Server theme, fully custom")]
|
|
Custom,
|
|
[Display(Name = "Extends the BTCPay Server Light theme")]
|
|
Light,
|
|
[Display(Name = "Extends the BTCPay Server Dark theme")]
|
|
Dark
|
|
}
|
|
|
|
public class ThemeSettings
|
|
{
|
|
[Display(Name = "Use custom theme")]
|
|
public bool CustomTheme { get; set; }
|
|
|
|
[Display(Name = "Custom Theme Extension Type")]
|
|
public ThemeExtension CustomThemeExtension { get; set; }
|
|
|
|
[JsonConverter(typeof(UnresolvedUriJsonConverter))]
|
|
public UnresolvedUri CustomThemeCssUrl { get; set; }
|
|
|
|
[JsonConverter(typeof(UnresolvedUriJsonConverter))]
|
|
public UnresolvedUri LogoUrl { get; set; }
|
|
|
|
public bool FirstRun { get; set; } = true;
|
|
|
|
public override string ToString()
|
|
{
|
|
// no logs
|
|
return string.Empty;
|
|
}
|
|
}
|