feat: Light mode default, auth, Posts rename, display scaling, TinyMCE improvements

This commit is contained in:
Jess Rogerson
2026-05-21 14:22:46 +10:00
parent 51d086dab9
commit 39fcd9ec6e
154 changed files with 12897 additions and 133 deletions
+8 -5
View File
@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NoticeBoard.Data;
using Ical.Net;
@@ -6,6 +7,7 @@ using Ical.Net.DataTypes;
namespace NoticeBoard.Controllers;
[Authorize]
public class ApiController : Controller
{
private readonly IWebHostEnvironment _env;
@@ -78,18 +80,18 @@ public class ApiController : Controller
if (!Directory.Exists(uploadsPath))
return Json(new { files = Array.Empty<object>() });
var imageExts = new[] { ".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".bmp", ".ico" };
var files = Directory.GetFiles(uploadsPath)
.Select(f => new FileInfo(f))
.Where(f => imageExts.Contains(f.Extension.ToLower()))
.OrderByDescending(f => f.CreationTimeUtc)
.Select(f => new
{
name = f.Name,
url = $"/uploads/{f.Name}",
size = f.Length,
created = f.CreationTimeUtc
title = f.Name,
value = $"/uploads/{f.Name}"
});
return Json(new { files });
return Json(files);
}
[HttpPost]
@@ -107,6 +109,7 @@ public class ApiController : Controller
return NotFound();
}
[AllowAnonymous]
[HttpGet]
public async Task<IActionResult> ParseIcs(string url)
{