Files
2025-12-24 21:05:32 -05:00

133 lines
6.5 KiB
Plaintext

@page "/admin"
@model IndexModel
@{
ViewData["Title"] = "Dashboard";
}
<div class="space-y-8">
<!-- Header -->
<div>
<h1 class="text-3xl font-bold text-white">Dashboard</h1>
<p class="text-gray-400 mt-1">Welcome back, @ViewData["AdminUsername"]</p>
</div>
<!-- Stats Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<!-- Items -->
<div class="card p-6">
<div class="flex items-center gap-4">
<div class="p-3 bg-indigo-600/20 rounded-lg">
<svg class="w-8 h-8 text-indigo-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"/>
</svg>
</div>
<div>
<p class="text-2xl font-bold text-white">@Model.ItemCount</p>
<p class="text-sm text-gray-400">Items</p>
</div>
</div>
<a href="/admin/items" class="mt-4 block text-sm text-indigo-400 hover:text-indigo-300">
Manage items →
</a>
</div>
<!-- Mobs -->
<div class="card p-6">
<div class="flex items-center gap-4">
<div class="p-3 bg-red-600/20 rounded-lg">
<svg class="w-8 h-8 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"/>
</svg>
</div>
<div>
<p class="text-2xl font-bold text-white">@Model.MobCount</p>
<p class="text-sm text-gray-400">Mobs</p>
</div>
</div>
<a href="/admin/mobs" class="mt-4 block text-sm text-red-400 hover:text-red-300">
Manage mobs →
</a>
</div>
<!-- Recipes -->
<div class="card p-6">
<div class="flex items-center gap-4">
<div class="p-3 bg-green-600/20 rounded-lg">
<svg class="w-8 h-8 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"/>
</svg>
</div>
<div>
<p class="text-2xl font-bold text-white">@Model.RecipeCount</p>
<p class="text-sm text-gray-400">Recipes</p>
</div>
</div>
<a href="/admin/recipes" class="mt-4 block text-sm text-green-400 hover:text-green-300">
Manage recipes →
</a>
</div>
<!-- Players -->
<div class="card p-6">
<div class="flex items-center gap-4">
<div class="p-3 bg-yellow-600/20 rounded-lg">
<svg class="w-8 h-8 text-yellow-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"/>
</svg>
</div>
<div>
<p class="text-2xl font-bold text-white">@Model.PlayerCount</p>
<p class="text-sm text-gray-400">Players</p>
</div>
</div>
<a href="/admin/players" class="mt-4 block text-sm text-yellow-400 hover:text-yellow-300">
Manage players →
</a>
</div>
</div>
<!-- Quick Actions -->
<div class="card">
<div class="p-6 border-b border-gray-700">
<h2 class="text-lg font-semibold text-white">Quick Actions</h2>
</div>
<div class="p-6 grid grid-cols-1 md:grid-cols-3 gap-4">
<a href="/admin/items/edit" class="flex items-center gap-3 p-4 bg-gray-700/50 rounded-lg hover:bg-gray-700 transition-colors">
<div class="p-2 bg-indigo-600 rounded-lg">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
</svg>
</div>
<div>
<p class="font-medium text-white">Create Item</p>
<p class="text-sm text-gray-400">Add a new item definition</p>
</div>
</a>
<a href="/admin/mobs/edit" class="flex items-center gap-3 p-4 bg-gray-700/50 rounded-lg hover:bg-gray-700 transition-colors">
<div class="p-2 bg-red-600 rounded-lg">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
</svg>
</div>
<div>
<p class="font-medium text-white">Create Mob</p>
<p class="text-sm text-gray-400">Add a new mob definition</p>
</div>
</a>
<a href="/admin/recipes/edit" class="flex items-center gap-3 p-4 bg-gray-700/50 rounded-lg hover:bg-gray-700 transition-colors">
<div class="p-2 bg-green-600 rounded-lg">
<svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
</svg>
</div>
<div>
<p class="font-medium text-white">Create Recipe</p>
<p class="text-sm text-gray-400">Add a new crafting recipe</p>
</div>
</a>
</div>
</div>
</div>