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