@page "/admin/players/edit" @model Players.EditModel @using DataServer.Data @{ ViewData["Title"] = Model.IsNew ? "New Account" : $"Edit: {Model.Account.Username}"; }
← Back to Players

@(Model.IsNew ? "New Account" : Model.Account.Username)

@if (!Model.IsNew) {

Account ID: @Model.Account.Id • Created: @Model.Account.CreatedAt.ToString("yyyy-MM-dd HH:mm")

}
@if (!string.IsNullOrEmpty(Model.Message)) {
@Model.Message
}

Account Information

Username cannot be changed

Role Management

@Html.AntiForgeryToken()
@{ var roleColor = Model.Account.Role switch { AccountRole.SuperAdmin => "bg-red-600", AccountRole.Admin => "bg-orange-600", AccountRole.Moderator => "bg-yellow-600", AccountRole.Vip => "bg-purple-600", _ => "bg-gray-600" }; } @Model.Account.Role

Ban Management

@{ var isBanned = Model.Account.IsBanned || (Model.Account.BannedUntil.HasValue && Model.Account.BannedUntil > DateTime.UtcNow); }
@if (isBanned) {
BANNED @if (Model.Account.IsBanned) { (Permanent) } else if (Model.Account.BannedUntil.HasValue) { (Until @Model.Account.BannedUntil.Value.ToString("yyyy-MM-dd HH:mm UTC")) }
} else {
ACTIVE Account in good standing
}
@if (isBanned) {
@Html.AntiForgeryToken()
} else {
@Html.AntiForgeryToken()
}

Password Reset

@Html.AntiForgeryToken()

Minimum 6 characters

@if (Model.Characters.Any()) {

Characters (@Model.Characters.Count)

}
@section Scripts { }