Finished switching to mooncore
This commit is contained in:
parent
64bcfe74e7
commit
8d75b30ae4
3 changed files with 20 additions and 46 deletions
|
@ -3,8 +3,7 @@
|
|||
@using Microsoft.EntityFrameworkCore
|
||||
@using MoonCore.Abstractions
|
||||
@using MoonCoreUI.Helpers
|
||||
|
||||
|
||||
@using Moonlight.Features.ServiceManagement.UI.Components
|
||||
@using Moonlight.Core.Services
|
||||
@using Moonlight.Features.ServiceManagement.Entities
|
||||
@using Moonlight.Features.ServiceManagement.Models.Abstractions
|
||||
|
|
|
@ -52,7 +52,8 @@
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MoonCoreUI" Version="1.0.0" />
|
||||
<PackageReference Include="MoonCore" Version="1.0.2" />
|
||||
<PackageReference Include="MoonCoreUI" Version="1.0.1" />
|
||||
<PackageReference Include="Otp.NET" Version="1.3.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.4.3" />
|
||||
<PackageReference Include="XtermBlazor" Version="1.10.0" />
|
||||
|
@ -90,43 +91,4 @@
|
|||
<AdditionalFiles Include="Core\UI\Views\Admin\Users\Sessions.razor" />
|
||||
<AdditionalFiles Include="Core\UI\Views\Admin\Users\View.razor" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\AutoCrud.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\AutoForm.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\AutoProperty.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\ChatFileSelect.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\ConfirmButton.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\DynamicTypedAutoForm.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartCustomFileSelect.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartDropdown.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartEnumSelect.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartFileSelect.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartForm.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\SmartSelect.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\TextEditor.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Forms\WButton.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Layouts\DefaultLayout.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Layouts\MainLayout.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Layouts\OverlayLayout.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Auth\ChangePassword.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Auth\Login.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Auth\MailVerify.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Auth\PasswordReset.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Auth\Register.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Alerts\NotFoundAlert.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Alerts\RestartAlert.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Navigations\AccountNavigation.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Navigations\AdminSysNavigation.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Components\Navigations\AdminUsersNavigation.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Index.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Services\Index.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Services\View.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Sys\Diagnose.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Sys\Index.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Sys\Settings.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Users\Index.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Users\Sessions.razor" />
|
||||
<_ContentIncludedByDefault Remove="Shared\Views\Admin\Users\View.razor" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
using BlazorTable;
|
||||
using MoonCore.Abstractions;
|
||||
using MoonCore.Helpers;
|
||||
using MoonCore.Extensions;
|
||||
using MoonCore.Services;
|
||||
using MoonCoreUI.Services;
|
||||
using Moonlight.Core.Configuration;
|
||||
using Moonlight.Core.Database;
|
||||
using Moonlight.Core.Repositories;
|
||||
using Moonlight.Core.Services;
|
||||
using Moonlight.Features.Servers.Actions;
|
||||
using Moonlight.Features.Servers.Http.Middleware;
|
||||
|
@ -38,15 +41,25 @@ builder.Services.AddSingleton(pluginService);
|
|||
await pluginService.Load(builder);
|
||||
await pluginService.RunPreInit();
|
||||
|
||||
// TODO: Add automatic assembly scanning
|
||||
// dependency injection registration
|
||||
// using attributes
|
||||
|
||||
builder.Services.AddDbContext<DataContext>();
|
||||
|
||||
// Services
|
||||
builder.Services.AddScoped(typeof(Repository<>), typeof(GenericRepository<>));
|
||||
builder.Services.AddScoped<CookieService>();
|
||||
builder.Services.AddScoped<FileDownloadService>();
|
||||
builder.Services.AddScoped<AlertService>();
|
||||
builder.Services.AddScoped<ToastService>();
|
||||
builder.Services.AddScoped<ClipboardService>();
|
||||
builder.Services.AddScoped<ModalService>();
|
||||
builder.Services.AddSingleton(configService);
|
||||
|
||||
// Configure interop
|
||||
ToastService.Prefix = "moonlight.toasts";
|
||||
ModalService.Prefix = "moonlight.modals";
|
||||
AlertService.Prefix = "moonlight.alerts";
|
||||
ClipboardService.Prefix = "moonlight.clipboard";
|
||||
FileDownloadService.Prefix = "moonlight.utils";
|
||||
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddServerSideBlazor();
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
|
|
Loading…
Reference in a new issue