inputs.scss refactor

Added upload date to media + sort by date
This commit is contained in:
2025-05-18 19:58:56 -04:00
parent 541cdd0b57
commit 3d4e269c21
14 changed files with 53 additions and 71 deletions

View File

@@ -36,7 +36,7 @@
<Protobuf Include="Proto\Auth.proto"></Protobuf>
</ItemGroup>
<Target Name="BuildDioxusClientDebug" BeforeTargets="Build" Condition="'$(Configuration)'=='DEBUG'">
<Target Name="BuildDioxusClientDebug" BeforeTargets="Build" Condition="'$(Configuration)'=='B'">
<Exec Command="dx build --platform web" WorkingDirectory="..\AobaClient" />
<Exec Command="rm -rf wwwroot/*" />
<Exec Command="cp -r target\dx\aoba-client\debug\web\public\* ../AobaServer/wwwroot/" WorkingDirectory="..\AobaClient" />

View File

@@ -42,4 +42,11 @@ public class MediaController(AobaService aobaService, ILogger<MediaController> l
return NotFound();
return LocalRedirectPermanent($"/m/{media.MediaId}/{rest}");
}
[HttpGet("thumb/{id}")]
public async Task<IActionResult> ThumbAsync(ObjectId id)
{
return NoContent();
}
}

View File

@@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Http.Features;
using Microsoft.IdentityModel.Tokens;
var builder = WebApplication.CreateBuilder(args);
var config = builder.Configuration;
// Add services to the container.
builder.Services.AddControllers(opt => opt.ModelBinderProviders.Add(new BsonIdModelBinderProvider()));
@@ -70,7 +70,7 @@ builder.Services.AddAuthentication(options =>
ctx.Token = ctx.Request.Headers.Authorization.FirstOrDefault()?.Replace("Bearer ", "");
#if DEBUG //allow cookie based auth when in debug mode
if(string.IsNullOrWhiteSpace(ctx.Token))
if (string.IsNullOrWhiteSpace(ctx.Token))
ctx.Token = ctx.Request.Cookies.FirstOrDefault(c => c.Key == "token").Value;
#endif
@@ -90,7 +90,8 @@ builder.Services.AddAuthentication(options =>
};
}).AddScheme<AuthenticationSchemeOptions, AobaAuthenticationHandler>("Aoba", null);
builder.Services.AddAoba();
var dbString = config["DB_STRING"];
builder.Services.AddAoba(dbString ?? "mongodb://localhost:27017");
builder.Services.Configure<FormOptions>(opt =>
{
opt.ValueLengthLimit = int.MaxValue;

View File

@@ -1,8 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"DB_STRING": "mongodb://NinoIna:27017"
}