mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 08:32:18 -05:00
add pages for new UI, fix issues
This commit is contained in:
1 parent
9a9424f1af
commit
4ed670c01b
159 files changed
+18672
-9709
No files matched your search
@@ -1,10 +1,11 @@
|
||||
using ColorControl.Shared.Contracts;
|
||||
using ColorControl.Shared.Services;
|
||||
|
||||
namespace ColorControl.UI;
|
||||
|
||||
public static class Blazor
|
||||
{
|
||||
public static void Start()
|
||||
public static void Start(Config? config = null)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder();
|
||||
|
||||
@@ -12,8 +13,9 @@ public static class Blazor
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
|
||||
builder.Services.AddSingleton<AppState>();
|
||||
builder.Services.AddSingleton<OptionsService>();
|
||||
builder.Services.AddSingleton<AppState>(new AppState { SelectedTheme = (config?.UseDarkMode ?? true) ? "dark" : "light" });
|
||||
builder.Services.AddTransient<RpcUiClientService>();
|
||||
builder.WebHost.ConfigureKestrel(o => o.ListenAnyIP(config?.UiPort > 0 ? config.UiPort : 5000));
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
Reference in new issue
Block a user