btcpayserver/BTCPayServer/Services/ThemesSettings.cs
d11n 17f3b4125b
Add option to customize the instance logo (#4258)
* Add option to customize the instance logo


Custom logo for BTCPay instances

* Incorporate SVGUse helper
2022-11-14 22:29:23 +09:00

37 lines
931 B
C#

using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
namespace BTCPayServer.Services
{
public class ThemeSettings
{
[Display(Name = "Use custom theme")]
public bool CustomTheme { get; set; }
[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";
}
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;
}
}
}