Updated admin page to be more streamlined and added the beginning of the blogging features

This commit is contained in:
Vincent Allen
2025-10-21 13:32:39 -04:00
parent 0e24ce2073
commit b34449808f
224 changed files with 27064 additions and 396 deletions

View File

@@ -1,3 +1,7 @@
///TODO:
/// - Refine the home page/about page editor to use the API instead of embeding images
/// - Add auth back to the admin pages
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
@@ -8,6 +12,7 @@ using OpenArchival.DataAccess;
using MyAppName.WebApp.Components.Account;
using Microsoft.Extensions.DependencyInjection;
using OpenArchival.Blazor.AdminPages;
using OpenArchival.Blazor.Config;
using OpenArchival.Blazor.CustomComponents;
var builder = WebApplication.CreateBuilder(args);
@@ -53,6 +58,8 @@ builder.Services.AddAuthentication(options =>
// --- File Upload Configuration ---
builder.Services.AddOptions<FileUploadOptions>().Bind(builder.Configuration.GetSection(FileUploadOptions.Key));
builder.Services.AddOptions<ApplicationOptions>().Bind(builder.Configuration.GetSection(ApplicationOptions.Key));
var uploadSettings = builder.Configuration.GetSection(FileUploadOptions.Key).Get<FileUploadOptions>() ?? throw new ArgumentNullException("FileUploadOptions");
builder.Services.AddServerSideBlazor().AddHubOptions(options =>
{
@@ -125,10 +132,10 @@ app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddAdditionalAssemblies(typeof(OpenArchival.Blazor.AdminPages.ArchiveConfiguration).Assembly,
.AddAdditionalAssemblies(typeof(OpenArchival.Blazor.AdminPages.ArchiveManagement).Assembly,
typeof(OpenArchival.Blazor.ArtifactGroupingDisplay.ArchiveGroupingDisplay).Assembly,
typeof(OpenArchival.Blazor.ArchiveSearch.SearchArchive).Assembly)
typeof(OpenArchival.Blazor.ArchiveSearch.SearchArchive).Assembly,
typeof(OpenArchival.Blazor.Blog.BlogEditor).Assembly)
.AddInteractiveServerRenderMode();
app.MapAdditionalIdentityEndpoints();