Updating game data to mid season patch and made card gallery nicer
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@page "/"
|
||||
@page "/cards"
|
||||
@using Model
|
||||
@using Chrono.Components
|
||||
@using Shared.Services
|
||||
@inject AnalyticsService AnalyticsService
|
||||
|
||||
@@ -28,7 +29,8 @@
|
||||
<i class="bi bi-person-fill"></i> Immortalized
|
||||
</button>
|
||||
|
||||
<div class="tab link-toggle @(agentLink ? "active" : "")" @onclick="ToggleAgentLink" title="Link Agents and Immortalized cards">
|
||||
<div class="tab link-toggle @(agentLink ? "active" : "")" @onclick="ToggleAgentLink"
|
||||
title="Link Agents and Immortalized cards">
|
||||
<i class="bi bi-link-45deg"></i>
|
||||
<span>Linked</span>
|
||||
<span class="toggle-switch @(agentLink ? "on" : "off")"></span>
|
||||
@@ -272,6 +274,7 @@
|
||||
seen.Add(card.Name);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/deck-builder"
|
||||
@page "/deck-builder/{Id:guid}"
|
||||
@using Model
|
||||
@rendermode InteractiveServer
|
||||
@inject NavigationManager Nav
|
||||
@inject AppDbContext Db
|
||||
@@ -11,8 +10,10 @@
|
||||
<a href="/my-decks" class="btn btn-sm btn-outline-secondary">
|
||||
<i class="bi bi-arrow-left"></i> My Decks
|
||||
</a>
|
||||
<input @bind="deckName" @bind:event="oninput" class="form-control deck-name-input" placeholder="Deck name..." maxlength="80"/>
|
||||
<input @bind="deckSeason" @bind:event="oninput" class="form-control season-input" placeholder="Season (e.g. S1)" maxlength="20"/>
|
||||
<input @bind="deckName" @bind:event="oninput" class="form-control deck-name-input" placeholder="Deck name..."
|
||||
maxlength="80"/>
|
||||
<input @bind="deckSeason" @bind:event="oninput" class="form-control season-input" placeholder="Season (e.g. S1)"
|
||||
maxlength="20"/>
|
||||
<span class="validity-badge @(IsValid ? "badge-valid" : "badge-invalid")">
|
||||
<i class="bi @(IsValid ? "bi-check-circle-fill" : "bi-exclamation-circle-fill")"></i>
|
||||
@ValidationMessage
|
||||
@@ -42,13 +43,16 @@
|
||||
<button class="tab @(categoryFilter == "" ? "active" : "")" @onclick='() => categoryFilter = ""'>
|
||||
<i class="bi bi-grid-3x3-gap-fill"></i> All
|
||||
</button>
|
||||
<button class="tab agent @(categoryFilter == "Agent" ? "active" : "")" @onclick='() => categoryFilter = "Agent"'>
|
||||
<button class="tab agent @(categoryFilter == "Agent" ? "active" : "")"
|
||||
@onclick='() => categoryFilter = "Agent"'>
|
||||
<i class="bi bi-person-fill"></i> Agents
|
||||
</button>
|
||||
<button class="tab agent @(categoryFilter == "Immortalized" ? "active" : "")" @onclick='() => categoryFilter = "Immortalized"'>
|
||||
<button class="tab agent @(categoryFilter == "Immortalized" ? "active" : "")"
|
||||
@onclick='() => categoryFilter = "Immortalized"'>
|
||||
<i class="bi bi-star-fill"></i> Immortalized
|
||||
</button>
|
||||
<button class="tab spell @(categoryFilter == "Spell" ? "active" : "")" @onclick='() => categoryFilter = "Spell"'>
|
||||
<button class="tab spell @(categoryFilter == "Spell" ? "active" : "")"
|
||||
@onclick='() => categoryFilter = "Spell"'>
|
||||
<i class="bi bi-wand"></i> Spells
|
||||
</button>
|
||||
</div>
|
||||
@@ -56,7 +60,8 @@
|
||||
<div class="filter-bar">
|
||||
<div class="search-wrapper">
|
||||
<i class="bi bi-search search-icon"></i>
|
||||
<input @bind="search" @bind:event="oninput" class="form-control search-input" placeholder="Search cards..."/>
|
||||
<input @bind="search" @bind:event="oninput" class="form-control search-input"
|
||||
placeholder="Search cards..."/>
|
||||
@if (search.Length > 0)
|
||||
{
|
||||
<button class="search-clear" @onclick='() => search = ""'><i class="bi bi-x-lg"></i></button>
|
||||
@@ -73,7 +78,8 @@
|
||||
@for (var c = 1; c <= 6; c++)
|
||||
{
|
||||
var cols = c;
|
||||
<button class="col-btn @(gridColumns == cols ? "active" : "")" @onclick="() => gridColumns = cols">@cols</button>
|
||||
<button class="col-btn @(gridColumns == cols ? "active" : "")"
|
||||
@onclick="() => gridColumns = cols">@cols</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,7 +114,8 @@
|
||||
<div class="deck-panel">
|
||||
|
||||
<div class="deck-status-bar">
|
||||
<span class="card-count @(deckCards.Count == 40 ? "count-ok" : deckCards.Count > 40 ? "count-over" : "count-under")">
|
||||
<span
|
||||
class="card-count @(deckCards.Count == 40 ? "count-ok" : deckCards.Count > 40 ? "count-over" : "count-under")">
|
||||
<i class="bi bi-stack"></i> @deckCards.Count<span class="count-denom">/40</span>
|
||||
</span>
|
||||
<button class="btn btn-sm btn-outline-danger ms-auto" @onclick="ClearDeck" title="Clear deck">
|
||||
@@ -158,7 +165,8 @@
|
||||
<div class="deck-row-controls">
|
||||
<button class="count-btn" @onclick="() => RemoveCard(cardData.Name)">−</button>
|
||||
<span class="count-display">@group.Count</span>
|
||||
<button class="count-btn" @onclick="() => AddCard(cardData)" disabled="@(group.Count >= 3)">+</button>
|
||||
<button class="count-btn" @onclick="() => AddCard(cardData)" disabled="@(group.Count >= 3)">+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -182,6 +190,7 @@
|
||||
<img src="@diverCard.ImagePath" class="diver-thumb" alt="@diver"
|
||||
onerror="this.style.display='none'"/>
|
||||
}
|
||||
|
||||
<span class="diver-name">@diver</span>
|
||||
<button class="diver-remove" @onclick:stopPropagation="true" @onclick="() => RemoveDiver(idx)">
|
||||
<i class="bi bi-x"></i>
|
||||
@@ -216,7 +225,8 @@
|
||||
<div class="filter-bar mb-2">
|
||||
<div class="search-wrapper">
|
||||
<i class="bi bi-search search-icon"></i>
|
||||
<input @bind="diverSearch" @bind:event="oninput" class="form-control search-input" placeholder="Search..."/>
|
||||
<input @bind="diverSearch" @bind:event="oninput" class="form-control search-input"
|
||||
placeholder="Search..."/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diver-picker-grid">
|
||||
@@ -287,8 +297,8 @@
|
||||
{
|
||||
var inDeck = deckCards.ToHashSet();
|
||||
var otherDiverSlot = activeDiverSlot == 0
|
||||
? (divers.Count > 1 ? divers[1] : null)
|
||||
: (divers.Count > 0 ? divers[0] : null);
|
||||
? divers.Count > 1 ? divers[1] : null
|
||||
: divers.Count > 0 ? divers[0] : null;
|
||||
|
||||
return AllCards
|
||||
.Where(c => c.Category is "Agent" or "Spell" or "Immortalized")
|
||||
@@ -310,17 +320,22 @@
|
||||
var bucket = Math.Min(card.Cost ?? 0, 10);
|
||||
result[bucket] = result.GetValueOrDefault(bucket) + 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private Dictionary<string, int> _deckCounts = new();
|
||||
|
||||
private void RebuildDeckCounts() =>
|
||||
private void RebuildDeckCounts()
|
||||
{
|
||||
_deckCounts = deckCards.GroupBy(n => n).ToDictionary(g => g.Key, g => g.Count());
|
||||
}
|
||||
|
||||
private int CountInDeck(string name) =>
|
||||
_deckCounts.TryGetValue(name, out var c) ? c : 0;
|
||||
private int CountInDeck(string name)
|
||||
{
|
||||
return _deckCounts.TryGetValue(name, out var c) ? c : 0;
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
@@ -375,7 +390,10 @@
|
||||
showDiverPicker = true;
|
||||
}
|
||||
|
||||
private void CloseDiverPicker() => showDiverPicker = false;
|
||||
private void CloseDiverPicker()
|
||||
{
|
||||
showDiverPicker = false;
|
||||
}
|
||||
|
||||
private void SelectDiver(string name)
|
||||
{
|
||||
@@ -449,4 +467,5 @@
|
||||
isSaving = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.25);
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.deck-name-input {
|
||||
@@ -79,8 +79,13 @@
|
||||
animation: fade-in 0.2s ease-out;
|
||||
}
|
||||
|
||||
.save-ok { color: #66bb6a; }
|
||||
.save-error { color: #ef5350; }
|
||||
.save-ok {
|
||||
color: #66bb6a;
|
||||
}
|
||||
|
||||
.save-error {
|
||||
color: #ef5350;
|
||||
}
|
||||
|
||||
/* ── Main Layout ── */
|
||||
.builder-layout {
|
||||
@@ -193,7 +198,9 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-clear:hover { color: var(--text-primary); }
|
||||
.search-clear:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.filter-select {
|
||||
width: 130px;
|
||||
@@ -239,8 +246,15 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.col-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
|
||||
.col-btn.active { background: var(--accent); color: #fff; }
|
||||
.col-btn:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.col-btn.active {
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* ── Browser Grid ── */
|
||||
.browser-grid {
|
||||
@@ -322,19 +336,19 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1.5px solid rgba(255,255,255,0.25);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.4);
|
||||
border: 1.5px solid rgba(255, 255, 255, 0.25);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.maxed-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.4rem;
|
||||
color: rgba(255,255,255,0.45);
|
||||
color: rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
|
||||
.browser-card-name {
|
||||
@@ -368,7 +382,7 @@
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.card-count {
|
||||
@@ -379,10 +393,23 @@
|
||||
gap: 0.15rem;
|
||||
}
|
||||
|
||||
.count-denom { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); }
|
||||
.count-ok { color: #66bb6a; }
|
||||
.count-over { color: #ef5350; }
|
||||
.count-under { color: var(--text-secondary); }
|
||||
.count-denom {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 400;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.count-ok {
|
||||
color: #66bb6a;
|
||||
}
|
||||
|
||||
.count-over {
|
||||
color: #ef5350;
|
||||
}
|
||||
|
||||
.count-under {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* ── Mana Curve ── */
|
||||
.mana-curve {
|
||||
@@ -451,18 +478,22 @@
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.deck-empty i { font-size: 2rem; }
|
||||
.deck-empty i {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.deck-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.3rem 0.75rem;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.04);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
|
||||
transition: background 0.12s ease;
|
||||
}
|
||||
|
||||
.deck-row:hover { background: var(--bg-hover); }
|
||||
.deck-row:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.deck-row-img {
|
||||
width: 26px;
|
||||
@@ -523,7 +554,10 @@
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.count-btn:disabled { opacity: 0.3; cursor: not-allowed; }
|
||||
.count-btn:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.count-display {
|
||||
font-size: 0.82rem;
|
||||
@@ -556,7 +590,9 @@
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.divers-section { padding-bottom: 0.5rem; }
|
||||
.divers-section {
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.diver-slot {
|
||||
display: flex;
|
||||
@@ -621,10 +657,15 @@
|
||||
transition: all 0.12s ease;
|
||||
}
|
||||
|
||||
.diver-remove:hover { color: #ef5350; background: rgba(239, 83, 80, 0.1); }
|
||||
.diver-remove:hover {
|
||||
color: #ef5350;
|
||||
background: rgba(239, 83, 80, 0.1);
|
||||
}
|
||||
|
||||
/* ── Notes Section ── */
|
||||
.notes-section { padding-bottom: 1rem; }
|
||||
.notes-section {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.notes-input {
|
||||
margin: 0 0.75rem;
|
||||
@@ -648,7 +689,7 @@
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.6);
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
z-index: 1040;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
@@ -669,13 +710,19 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(108, 99, 255, 0.1);
|
||||
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(108, 99, 255, 0.1);
|
||||
animation: modal-enter 0.18s ease-out;
|
||||
}
|
||||
|
||||
@keyframes modal-enter {
|
||||
from { opacity: 0; transform: translate(-50%, -52%) scale(0.97); }
|
||||
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -52%) scale(0.97);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.diver-modal-header {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/login"
|
||||
@rendermode InteractiveServer
|
||||
@attribute [Microsoft.AspNetCore.Authorization.AllowAnonymous]
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@attribute [AllowAnonymous]
|
||||
@inject IJSRuntime JS
|
||||
@inject NavigationManager Nav
|
||||
@inject AuthenticationStateProvider AuthStateProvider
|
||||
@@ -75,7 +74,7 @@
|
||||
try
|
||||
{
|
||||
await JS.InvokeVoidAsync("passkeyLogin");
|
||||
Nav.NavigateTo("/", forceLoad: true);
|
||||
Nav.NavigateTo("/", true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -94,7 +93,7 @@
|
||||
try
|
||||
{
|
||||
await JS.InvokeVoidAsync("passkeyEnroll");
|
||||
Nav.NavigateTo("/", forceLoad: true);
|
||||
Nav.NavigateTo("/", true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -107,4 +106,5 @@
|
||||
}
|
||||
|
||||
private record StatusResponse(bool Enrolled, bool Authenticated);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
.login-card {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.10);
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
|
||||
padding: 2.5rem 2rem;
|
||||
width: 100%;
|
||||
max-width: 380px;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@page "/my-decks"
|
||||
@rendermode InteractiveServer
|
||||
@using Cloud.Models
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@rendermode InteractiveServer
|
||||
@inject AppDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
|
||||
@@ -100,11 +99,15 @@
|
||||
<div class="modal-backdrop" @onclick="CancelDelete"></div>
|
||||
<div class="confirm-modal">
|
||||
<h5>Delete Deck</h5>
|
||||
<p>Delete <strong>@(string.IsNullOrEmpty(deckToDelete.Name) ? "Untitled Deck" : deckToDelete.Name)</strong>? This cannot be undone.</p>
|
||||
<p>Delete <strong>@(string.IsNullOrEmpty(deckToDelete.Name) ? "Untitled Deck" : deckToDelete.Name)</strong>?
|
||||
This cannot be undone.</p>
|
||||
<div class="d-flex gap-2 justify-content-end">
|
||||
<button class="btn btn-outline-secondary" @onclick="CancelDelete">Cancel</button>
|
||||
<button class="btn btn-danger" @onclick="DeleteDeck" disabled="@deleting">
|
||||
@if (deleting) { <span class="spinner-border spinner-border-sm me-1"></span> }
|
||||
@if (deleting)
|
||||
{
|
||||
<span class="spinner-border spinner-border-sm me-1"></span>
|
||||
}
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
@@ -179,4 +182,5 @@
|
||||
await LoadDecks();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user