2024-05-09 02:18:02 +02:00
|
|
|
using System;
|
2018-11-17 12:43:11 +09:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
2024-05-09 02:18:02 +02:00
|
|
|
using BTCPayServer.JsonConverters;
|
2018-04-19 11:39:51 -05:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
2022-12-14 05:37:31 +01:00
|
|
|
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
|
2018-04-19 11:39:51 -05:00
|
|
|
{
|
2022-12-14 05:37:31 +01:00
|
|
|
[Display(Name = "Use custom theme")]
|
|
|
|
public bool CustomTheme { get; set; }
|
2023-01-06 14:18:07 +01:00
|
|
|
|
2022-12-14 05:37:31 +01:00
|
|
|
[Display(Name = "Custom Theme Extension Type")]
|
|
|
|
public ThemeExtension CustomThemeExtension { get; set; }
|
|
|
|
|
2024-05-09 02:18:02 +02:00
|
|
|
[JsonConverter(typeof(UnresolvedUriJsonConverter))]
|
|
|
|
public UnresolvedUri CustomThemeCssUrl { get; set; }
|
2022-12-14 05:37:31 +01:00
|
|
|
|
2024-05-09 02:18:02 +02:00
|
|
|
[JsonConverter(typeof(UnresolvedUriJsonConverter))]
|
|
|
|
public UnresolvedUri LogoUrl { get; set; }
|
2022-12-14 05:37:31 +01:00
|
|
|
|
2024-04-25 14:09:21 +09:00
|
|
|
public bool FirstRun { get; set; } = true;
|
2022-12-14 05:37:31 +01:00
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
{
|
|
|
|
// no logs
|
|
|
|
return string.Empty;
|
|
|
|
}
|
2018-04-19 11:39:51 -05:00
|
|
|
}
|