Added moonlight resources. Optimised moonlight legacy html rendering
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using BlazorTable;
|
||||
using CurrieTechnologies.Razor.SweetAlert2;
|
||||
using Moonlight.App.Database;
|
||||
using Moonlight.App.Helpers;
|
||||
using Moonlight.App.Repositories;
|
||||
using Moonlight.App.Repositories.Servers;
|
||||
using Moonlight.App.Services;
|
||||
using Moonlight.App.Services.Interop;
|
||||
using Moonlight.App.Services.Sessions;
|
||||
|
||||
using Moonlight.Data;
|
||||
|
||||
namespace Company.WebApplication1
|
||||
namespace Moonlight
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
@@ -14,7 +19,36 @@ namespace Company.WebApplication1
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddServerSideBlazor();
|
||||
builder.Services.AddSingleton<WeatherForecastService>();
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
|
||||
// Databases
|
||||
builder.Services.AddDbContext<DataContext>();
|
||||
|
||||
// Repositories
|
||||
builder.Services.AddSingleton<SessionRepository>();
|
||||
builder.Services.AddScoped<UserRepository>();
|
||||
builder.Services.AddScoped<NodeRepository>();
|
||||
builder.Services.AddScoped<ServerRepository>();
|
||||
builder.Services.AddScoped<ServerBackupRepository>();
|
||||
|
||||
// Services
|
||||
builder.Services.AddScoped<TranslationService>();
|
||||
builder.Services.AddSingleton<ConfigService>();
|
||||
builder.Services.AddScoped<CookieService>();
|
||||
builder.Services.AddScoped<IdentityService>();
|
||||
builder.Services.AddScoped<IpLocateService>();
|
||||
builder.Services.AddScoped<SessionService>();
|
||||
builder.Services.AddScoped<TranslationService>();
|
||||
builder.Services.AddScoped<AlertService>();
|
||||
|
||||
// Helpers
|
||||
builder.Services.AddSingleton<TranslationHelper>();
|
||||
|
||||
// Third party services
|
||||
|
||||
builder.Services.AddBlazorTable();
|
||||
builder.Services.AddSweetAlert2(options => { options.Theme = SweetAlertTheme.Dark; });
|
||||
builder.Services.AddBlazorContextMenu();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user