Dungeon Fixes
This commit is contained in:
@@ -186,6 +186,13 @@
|
||||
</svg>
|
||||
View
|
||||
</a>
|
||||
<form method="post" asp-page-handler="Archive" onsubmit="return confirm('Archive this dungeon now? It will be removed from active list.')">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="id" value="@dungeon.Id" />
|
||||
<button type="submit" class="btn btn-sm btn-secondary" disabled="@(dungeon.PlayerCount > 0)" title="@(dungeon.PlayerCount > 0 ? "Players must leave before archiving." : "Archive dungeon")">
|
||||
Archive
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" asp-page-handler="Delete" onsubmit="return confirm('Delete this dungeon? All players will be removed.')">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="id" value="@dungeon.Id" />
|
||||
@@ -209,6 +216,55 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<!-- Archived Dungeons -->
|
||||
<div class="space-y-4">
|
||||
<h2 class="text-xl font-semibold text-white">
|
||||
Archived Dungeons (@Model.ArchivedDungeons.Count)
|
||||
<span class="text-sm font-normal text-gray-500">(persisted in DB)</span>
|
||||
</h2>
|
||||
|
||||
@if (Model.ArchivedDungeons.Count > 0)
|
||||
{
|
||||
<div class="card p-4 overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="text-gray-400 text-xs uppercase">
|
||||
<tr>
|
||||
<th class="text-left py-2">Id</th>
|
||||
<th class="text-left py-2">Tier</th>
|
||||
<th class="text-left py-2">Bracket</th>
|
||||
<th class="text-left py-2">Creator</th>
|
||||
<th class="text-left py-2">Created</th>
|
||||
<th class="text-left py-2">Last Activity</th>
|
||||
<th class="text-left py-2">Persisted</th>
|
||||
<th class="text-left py-2">Boss</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-gray-300">
|
||||
@foreach (var dungeon in Model.ArchivedDungeons)
|
||||
{
|
||||
<tr class="border-t border-gray-800">
|
||||
<td class="py-2 font-mono">@dungeon.Id.ToString()[..8]...</td>
|
||||
<td class="py-2">T@dungeon.Tier</td>
|
||||
<td class="py-2">@dungeon.LevelBracketMin-@dungeon.LevelBracketMax</td>
|
||||
<td class="py-2">@dungeon.CreatorName</td>
|
||||
<td class="py-2">@dungeon.CreatedAt.ToString("u")</td>
|
||||
<td class="py-2">@dungeon.LastActivity.ToString("u")</td>
|
||||
<td class="py-2">@(dungeon.PersistedAt?.ToString("u") ?? "-")</td>
|
||||
<td class="py-2">@(dungeon.BossKilled ? "Yes" : "No")</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="card p-6 text-center text-gray-500">
|
||||
<p>No archived dungeons found.</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
|
||||
Reference in New Issue
Block a user