Moves the plugins management page under the administrator area

This commit is contained in:
BinaryAlley committed 2026-08-21 00:58:09 -07:00
1 parent 932fe2be28
commit 74e5efdf74
18 files changed
+26 -206

No files matched your search

@@ -10,9 +10,9 @@ public static partial class WebRoutes
/// </summary>
public static class Plugins
{
public const string INDEX = "{culture}/plugins";
public const string GET_PLUGINS = "{culture}/plugins/api-get-plugins";
public const string GET_PLUGIN_SETTINGS = "{culture}/plugins/api-get-plugin-settings/{pluginId}";
public const string UPDATE_PLUGIN_SETTINGS = "{culture}/plugins/api-update-plugin-settings";
public const string INDEX = "{culture}/admin/manage-plugins";
public const string GET_PLUGINS = "{culture}/admin/manage-plugins/api-get-plugins";
public const string GET_PLUGIN_SETTINGS = "{culture}/admin/manage-plugins/api-get-plugin-settings/{pluginId}";
public const string UPDATE_PLUGIN_SETTINGS = "{culture}/admin/manage-plugins/api-update-plugin-settings";
}
}
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.GetPluginSettings;
/// <summary>
/// API endpoint for the <c>/{culture}/plugins/api-get-plugin-settings/{pluginId}</c> route.
/// API endpoint for the <c>/{culture}/admin/manage-plugins/api-get-plugin-settings/{pluginId}</c> route.
/// </summary>
public class GetPluginSettingsEndpoint : BaseEndpoint<GetPluginSettingsRequest, IResult>
{
@@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.GetPlugins;
/// <summary>
/// API endpoint for the <c>/{culture}/plugins/api-get-plugins</c> route.
/// API endpoint for the <c>/{culture}/admin/manage-plugins/api-get-plugins</c> route.
/// </summary>
public class GetPluginsEndpoint : BaseEndpoint<EmptyRequest, IResult>
{
@@ -16,7 +16,7 @@ using System.Threading.Tasks;
namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.Index;
/// <summary>
/// API endpoint for the <c>/{culture}/plugins</c> route.
/// API endpoint for the <c>/{culture}/admin/manage-plugins</c> route.
/// </summary>
public class PluginsIndexViewEndpoint : BaseEndpoint<EmptyRequest, IResult>
{
@@ -57,6 +57,6 @@ public class PluginsIndexViewEndpoint : BaseEndpoint<EmptyRequest, IResult>
if (plugin.LoadStatus == Lumina.Presentation.Web.Common.Enums.Plugins.PluginLoadStatus.Loaded)
settingsByPluginId[plugin.Id] = await _apiHttpClient.GetAsync<PluginSettingsDto>(ApiRoutes.Plugins.GET_PLUGIN_SETTINGS.Replace("{pluginId}", plugin.Id.ToString()), cancellationToken).ConfigureAwait(false);
Dictionary<string, object?> viewData = new() { ["pluginSettings"] = settingsByPluginId };
return View("/Core/Views/Plugins/Index.cshtml", plugins, viewData);
return View("/Core/Views/Admin/Plugins.cshtml", plugins, viewData);
}
}
@@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.UpdatePluginSettings;
/// <summary>
/// API endpoint for the <c>/{culture}/plugins/api-update-plugin-settings</c> route.
/// API endpoint for the <c>/{culture}/admin/manage-plugins/api-update-plugin-settings</c> route.
/// </summary>
public class UpdatePluginSettingsEndpoint : BaseEndpoint<UpdatePluginSettingsRequest, IResult>
{
@@ -1,180 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Lumina.Presentation.Web.Core.Resources.Views.Plugins {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Index {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Index() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lumina.Presentation.Web.Core.Resources.Views.Plugins.Index", typeof(Index).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Author.
/// </summary>
public static string Author {
get {
return ResourceManager.GetString("Author", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Description.
/// </summary>
public static string Description {
get {
return ResourceManager.GetString("Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed to load.
/// </summary>
public static string FailedToLoad {
get {
return ResourceManager.GetString("FailedToLoad", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Loaded.
/// </summary>
public static string Loaded {
get {
return ResourceManager.GetString("Loaded", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Load error.
/// </summary>
public static string LoadError {
get {
return ResourceManager.GetString("LoadError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Load status.
/// </summary>
public static string LoadStatus {
get {
return ResourceManager.GetString("LoadStatus", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Name.
/// </summary>
public static string Name {
get {
return ResourceManager.GetString("Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No plugins have been detected..
/// </summary>
public static string NoPlugins {
get {
return ResourceManager.GetString("NoPlugins", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Plugins.
/// </summary>
public static string Plugins {
get {
return ResourceManager.GetString("Plugins", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Save.
/// </summary>
public static string Save {
get {
return ResourceManager.GetString("Save", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Settings.
/// </summary>
public static string Settings {
get {
return ResourceManager.GetString("Settings", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Settings saved.
/// </summary>
public static string SettingsSaved {
get {
return ResourceManager.GetString("SettingsSaved", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Version.
/// </summary>
public static string Version {
get {
return ResourceManager.GetString("Version", resourceCulture);
}
}
}
}
@@ -1,5 +1,5 @@
@*
/plugins
/admin/manage-plugins
*@
@using Lumina.Presentation.Web.Common.DTO.Plugins
@@ -35,6 +35,11 @@
</ItemGroup>
<ItemGroup>
<Compile Update="Core\Resources\Views\Admin\Plugins.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Plugins.resx</DependentUpon>
</Compile>
<Compile Update="Core\Resources\Views\Auth\ChangePassword.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
@@ -60,11 +65,6 @@
<AutoGen>True</AutoGen>
<DependentUpon>Item.resx</DependentUpon>
</Compile>
<Compile Update="Core\Resources\Views\Plugins\Index.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Index.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
@@ -331,35 +331,35 @@
<EmbeddedResource Update="Core\Resources\Views\Shared\_NavMenu.zh-CN.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.de-DE.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.de-DE.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.en-US.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.en-US.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.es-ES.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.es-ES.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.fr-FR.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.fr-FR.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.it-IT.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.it-IT.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.ja-JP.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.ja-JP.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Index.Designer.cs</LastGenOutput>
<LastGenOutput>Plugins.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.ro-RO.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.ro-RO.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.ru-RU.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.ru-RU.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Core\Resources\Views\Plugins\Index.zh-CN.resx">
<EmbeddedResource Update="Core\Resources\Views\Admin\Plugins.zh-CN.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>