Admin portal: dark mode, account management, chat fixes, ability builder
• Light/dark mode toggle: Bootstrap 5.3 data-bs-theme, theme persisted to
localStorage via admin.js, Moon/Sun icon button in sidebar, flash-free
inline <script> in App.razor applies saved theme before first render.
• Account management: Add "Create Account" button + new /accounts/new page
(email, display name, password, role checkboxes). AccountDetail now has
interactive role assignment (Add/Remove Admin/SuperAdmin — SuperAdmin
actions gated with <AuthorizeView Roles="SuperAdmin">) and a force-reset
password section (RemovePasswordAsync + AddPasswordAsync, no current
password required).
• Chat fixes: stat card labels changed from text-muted → text-white-50 for
readability on bg-dark; card-headers now have border-bottom border-secondary
to visually separate from card bodies; "View" button relabeled "View & Post"
to surface the hidden compose feature.
• Ability builder (AbilityBuilder.razor): structured UI replacing the raw
textarea in CardEditor. Supports all 4 ability types (Active/Passive/Aura/
Triggered) with type-specific fields (range, uses/turn, aura range, trigger
dropdown). Each ability holds structured actions (scope/type/ownership/count
dropdowns) and effects (59 types in 11 grouped optgroups; each auto-populates
a JSON fields template on type selection). Description field stores plain-
English text in the JSON. Raw JSON toggle + Apply for power users. Live
compiled JSON preview.
• AbilitySystem: added JsonStringEnumConverter so JSONB enums serialize as
human-readable strings ("Active" vs 0, "Battlefield" vs 3, etc.).
• AbilityDefinition: added optional Description property (admin-only metadata).
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -40,7 +40,7 @@ else
|
||||
@if (_channel.ChannelType != SOR.Database.Enums.ChatChannelType.Match)
|
||||
{
|
||||
<div class="card bg-dark text-white border-secondary mb-4">
|
||||
<div class="card-header fw-semibold text-danger">
|
||||
<div class="card-header fw-semibold text-danger border-bottom border-secondary">
|
||||
<i class="bi bi-megaphone me-1"></i>Post System Message
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -65,9 +65,9 @@ else
|
||||
|
||||
<!-- Message history -->
|
||||
<div class="card bg-dark text-white border-secondary">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<div class="card-header d-flex justify-content-between align-items-center border-bottom border-secondary">
|
||||
<span class="fw-semibold">Messages (newest first)</span>
|
||||
<span class="text-muted small">@_messages.Count shown</span>
|
||||
<span class="text-white-50 small">@_messages.Count shown</span>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-dark table-hover mb-0 small">
|
||||
|
||||
@@ -21,7 +21,7 @@ else
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-dark text-white border-secondary h-100">
|
||||
<div class="card-body">
|
||||
<div class="text-muted small">Total Channels</div>
|
||||
<div class="text-white-50 small">Total Channels</div>
|
||||
<div class="fs-3 fw-bold">@_totalChannels</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -29,7 +29,7 @@ else
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-dark text-white border-secondary h-100">
|
||||
<div class="card-body">
|
||||
<div class="text-muted small">Total Messages</div>
|
||||
<div class="text-white-50 small">Total Messages</div>
|
||||
<div class="fs-3 fw-bold">@_totalMessages</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@ else
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-dark text-white border-secondary h-100">
|
||||
<div class="card-body">
|
||||
<div class="text-muted small">Friendships</div>
|
||||
<div class="text-white-50 small">Friendships</div>
|
||||
<div class="fs-3 fw-bold">@_friendships</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@ else
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-dark text-white border-secondary h-100">
|
||||
<div class="card-body">
|
||||
<div class="text-muted small">Blocked Pairs</div>
|
||||
<div class="text-white-50 small">Blocked Pairs</div>
|
||||
<div class="fs-3 fw-bold">@_blockedPairs</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,7 +54,7 @@ else
|
||||
|
||||
<!-- Channel list with type filter -->
|
||||
<div class="card bg-dark text-white border-secondary">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<div class="card-header d-flex justify-content-between align-items-center border-bottom border-secondary">
|
||||
<span class="fw-semibold">Channels</span>
|
||||
<select class="form-select form-select-sm bg-dark text-white border-secondary w-auto"
|
||||
@bind="_typeFilter">
|
||||
@@ -90,7 +90,9 @@ else
|
||||
<td>@ch.MessageCount</td>
|
||||
<td class="text-muted small">@ch.CreatedAt.ToString("yyyy-MM-dd HH:mm")</td>
|
||||
<td>
|
||||
<a href="/chat/channel/@ch.Id" class="btn btn-sm btn-outline-secondary">View</a>
|
||||
<a href="/chat/channel/@ch.Id" class="btn btn-sm btn-outline-secondary">
|
||||
<i class="bi bi-chat-text me-1"></i>View & Post
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user