btcpayserver/BTCPayServer/Services/ThemesSettings.cs

37 lines
931 B
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Http;
2018-04-19 18:39:51 +02:00
using Newtonsoft.Json;
namespace BTCPayServer.Services
{
public class ThemeSettings
{
[Display(Name = "Use custom theme")]
public bool CustomTheme { get; set; }
2021-12-31 08:59:02 +01:00
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
[MaxLength(500)]
[Display(Name = "Custom Theme CSS URL")]
public string CustomThemeCssUri { get; set; }
public string CssUri
{
get => CustomTheme ? CustomThemeCssUri : "/main/themes/default.css";
}
2018-04-19 18:39:51 +02:00
public bool FirstRun { get; set; }
[Display(Name = "Logo")]
[JsonIgnore]
public IFormFile LogoFile { get; set; }
public string LogoFileId { get; set; }
public override string ToString()
{
// no logs
return string.Empty;
}
2018-04-19 18:39:51 +02:00
}
}