Admin Panel Addition

This commit is contained in:
dingo
2025-12-26 22:30:39 -05:00
parent 021d9b8230
commit 9b757bf5ff
3 changed files with 106 additions and 2 deletions
+19 -1
View File
@@ -10,12 +10,30 @@
<div class="flex items-center justify-between">
<div>
<a href="/admin/players" class="text-gray-400 hover:text-white text-sm">← Back to Players</a>
<h1 class="text-3xl font-bold text-white mt-2">@(Model.IsNew ? "New Account" : Model.Account.Username)</h1>
<h1 class="text-3xl font-bold text-white mt-2">
@(Model.IsNew ? "New Account" : Model.Account.Username)
@if (Model.IsOnline)
{
<span class="ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-900 text-green-300">
🟢 Online
</span>
}
</h1>
@if (!Model.IsNew)
{
<p class="text-gray-400 mt-1">Account ID: @Model.Account.Id • Created: @Model.Account.CreatedAt.ToString("yyyy-MM-dd HH:mm")</p>
}
</div>
@if (Model.IsOnline)
{
<form method="post" asp-page-handler="ForceLogout">
@Html.AntiForgeryToken()
<input type="hidden" name="accountId" value="@Model.Account.Id" />
<button type="submit" class="btn bg-orange-700 hover:bg-orange-600 text-white" onclick="return confirm('Force logout this user? They will be disconnected immediately.')">
⚡ Force Logout
</button>
</form>
}
</div>
@if (!string.IsNullOrEmpty(Model.Message))