diff --git a/.idea/.idea.Moonlight/.idea/discord.xml b/.idea/.idea.Moonlight/.idea/discord.xml index d8e9561..3aef922 100644 --- a/.idea/.idea.Moonlight/.idea/discord.xml +++ b/.idea/.idea.Moonlight/.idea/discord.xml @@ -3,5 +3,10 @@ \ No newline at end of file diff --git a/Moonlight/Core/CoreFeature.cs b/Moonlight/Core/CoreFeature.cs index ae4bc9c..ad86ba8 100644 --- a/Moonlight/Core/CoreFeature.cs +++ b/Moonlight/Core/CoreFeature.cs @@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Components; using MoonCore.Abstractions; using MoonCore.Helpers; using MoonCore.Services; +using MoonCoreUI.Extensions; using MoonCoreUI.Services; using Moonlight.Core.Configuration; using Moonlight.Core.Database; @@ -57,12 +58,14 @@ public class CoreFeature : MoonlightFeature builder.Services.AddScoped(); builder.Services.AddScoped(); - // Configure interop - ToastService.Prefix = "moonlight.toasts"; - ModalService.Prefix = "moonlight.modals"; - AlertService.Prefix = "moonlight.alerts"; - ClipboardService.Prefix = "moonlight.clipboard"; - FileDownloadService.Prefix = "moonlight.utils"; + builder.Services.AddMoonCoreUi(configuration => + { + configuration.ToastJavascriptPrefix = "moonlight.toasts"; + configuration.ModalJavascriptPrefix = "moonlight.modals"; + configuration.AlertJavascriptPrefix = "moonlight.alerts"; + configuration.ClipboardJavascriptPrefix = "moonlight.clipboard"; + configuration.FileDownloadJavascriptPrefix = "moonlight.utils"; + }); // Add external services and blazor/asp.net stuff builder.Services.AddRazorPages(); diff --git a/Moonlight/Moonlight.csproj b/Moonlight/Moonlight.csproj index 34bbe64..818be3a 100644 --- a/Moonlight/Moonlight.csproj +++ b/Moonlight/Moonlight.csproj @@ -90,31 +90,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - - - <_ContentIncludedByDefault Remove="wwwroot\fonts\boxicons.eot" /> - <_ContentIncludedByDefault Remove="wwwroot\fonts\boxicons.svg" /> - <_ContentIncludedByDefault Remove="wwwroot\fonts\boxicons.ttf" /> - <_ContentIncludedByDefault Remove="wwwroot\fonts\boxicons.woff" /> - <_ContentIncludedByDefault Remove="wwwroot\fonts\boxicons.woff2" /> - <_ContentIncludedByDefault Remove="wwwroot\fonts\Inter.woff2" /> - <_ContentIncludedByDefault Remove="Features\ScheduleDesigner\UI\Components\ScheduleEditor.razor" /> - <_ContentIncludedByDefault Remove="Features\ScheduleDesigner\UI\Components\ScheduleLinkItem.razor" /> - <_ContentIncludedByDefault Remove="Features\ScheduleDesigner\UI\Components\ScheduleNodeItem.razor" /> - <_ContentIncludedByDefault Remove="wwwroot\svg\logo.svg" /> - <_ContentIncludedByDefault Remove="Features\FileManager\UI\Components\Editor.razor" /> - <_ContentIncludedByDefault Remove="Features\FileManager\UI\Components\FileEditor.razor" /> - <_ContentIncludedByDefault Remove="Features\FileManager\UI\Components\FileManager.razor" /> - <_ContentIncludedByDefault Remove="Features\FileManager\UI\Components\FileUploader.razor" /> - <_ContentIncludedByDefault Remove="Features\FileManager\UI\Components\FileView.razor" /> - <_ContentIncludedByDefault Remove="storage\configs\core.json" /> - -