Vibe deck UI and hiding notes UI for now

This commit is contained in:
2026-06-18 21:07:28 -04:00
parent eefbb62eb7
commit add734b522
29 changed files with 503 additions and 180 deletions
+10
View File
@@ -31,4 +31,14 @@ public class CardData
public bool HasImmortalize => ImmortalizeTo is { Count: > 0 };
public bool IsImmortalized => ImmortalizeFrom != null;
public string ImagePath => $"cards/{ImageFile ?? "placeholder.png"}";
public bool MatchesSearch(string query)
{
if (string.IsNullOrWhiteSpace(query)) return true;
var q = query.Trim().ToLowerInvariant();
return Name.ToLowerInvariant().Contains(q) ||
(Description?.ToLowerInvariant().Contains(q) ?? false) ||
(Faction?.ToLowerInvariant().Contains(q) ?? false) ||
Archetypes.Any(a => a.ToLowerInvariant().Contains(q));
}
}
+1 -1
View File
@@ -4,4 +4,4 @@ public class CardNote
{
public string CardName { get; set; } = "";
public string Note { get; set; } = "";
}
}
+11 -1
View File
@@ -9,4 +9,14 @@ public class DeckData
public string? Description { get; init; }
public List<string> Factions { get; init; } = [];
public bool IsVisible { get; init; }
}
public bool IsValid => Cards.Count == 40 && Divers.Count <= 2;
public string ValidationMessage => (Cards.Count, Divers.Count) switch
{
(< 40, _) => $"Deck needs {40 - Cards.Count} more cards.",
(> 40, _) => $"Deck has {Cards.Count - 40} too many cards.",
(_, > 2) => "Deck can only have 2 Divers.",
_ => "Deck is valid."
};
}