diff --git a/BTCPayServer/Components/ThemeSwitch/Default.cshtml b/BTCPayServer/Components/ThemeSwitch/Default.cshtml new file mode 100644 index 000000000..dbfb27104 --- /dev/null +++ b/BTCPayServer/Components/ThemeSwitch/Default.cshtml @@ -0,0 +1,12 @@ +@model BTCPayServer.Components.ThemeSwitch.ThemeSwitchViewModel + + diff --git a/BTCPayServer/Components/ThemeSwitch/ThemeSwitch.cs b/BTCPayServer/Components/ThemeSwitch/ThemeSwitch.cs new file mode 100644 index 000000000..cf8f41ae9 --- /dev/null +++ b/BTCPayServer/Components/ThemeSwitch/ThemeSwitch.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BTCPayServer.Components.ThemeSwitch +{ + public class ThemeSwitch : ViewComponent + { + public IViewComponentResult Invoke(string cssClass = null, string responsive = null) + { + var vm = new ThemeSwitchViewModel + { + CssClass = cssClass, + Responsive = responsive + }; + return View(vm); + } + } +} diff --git a/BTCPayServer/Components/ThemeSwitch/ThemeSwitchViewModel.cs b/BTCPayServer/Components/ThemeSwitch/ThemeSwitchViewModel.cs new file mode 100644 index 000000000..6b4652e1b --- /dev/null +++ b/BTCPayServer/Components/ThemeSwitch/ThemeSwitchViewModel.cs @@ -0,0 +1,8 @@ +namespace BTCPayServer.Components.ThemeSwitch +{ + public class ThemeSwitchViewModel + { + public string CssClass { get; set; } + public string Responsive { get; set; } + } +} diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index 2b2b63a7a..805f7acd7 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -90,13 +90,7 @@ @if (!theme.CustomTheme) { }