AdminPanel

This commit is contained in:
dingo
2025-12-24 20:34:48 -05:00
parent ddf9a4b8c5
commit ef3ce84aec
23 changed files with 1782 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
@page "/admin/recipes"
@model VoidScavengers.Admin.Pages.Recipes.IndexModel
@{
ViewData["Title"] = "Recipes";
}
<div class="space-y-6">
<div class="flex items-center justify-between">
<div>
<h1 class="text-3xl font-bold text-white">Recipes</h1>
<p class="text-gray-400 mt-1">Manage crafting recipes</p>
</div>
<a href="/admin/recipes/edit" class="btn btn-primary flex items-center gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
</svg>
Create Recipe
</a>
</div>
<div class="card p-8 text-center">
<p class="text-gray-400">@Model.RecipeCount recipes defined</p>
<p class="text-gray-500 mt-2">Full recipe editor coming soon...</p>
</div>
</div>
@@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using Server.Data;
namespace VoidScavengers.Admin.Pages.Recipes;
public class IndexModel : AdminPageModel
{
private readonly GameDbContext _db;
public IndexModel(GameDbContext db)
{
_db = db;
}
public int RecipeCount { get; set; }
public async Task OnGetAsync()
{
RecipeCount = await _db.DungeonCraftingRecipes.CountAsync();
}
}