Skip to content

Commit c0021b1

Browse files
committed
Added 'missing restrictions' legality variant
1 parent c8c9043 commit c0021b1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

controllers/manage-deck.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ func DeckManagerControllers(app *fiber.App){
129129
}
130130
}
131131
if !deckCards[i].IsLegal && !deckCards[i].InSideboard {
132-
println(deckCards[i].Name)
133132
deck.IsLegal = false
134133
}
135134
}
@@ -648,7 +647,6 @@ func DeckManagerControllers(app *fiber.App){
648647
}
649648
case "commander":
650649
if !cards[i].LegalCommander {
651-
println(cards[i].Name)
652650
metadata.IsLegal = false
653651
}
654652
case "oathbreaker":

views/partials/deck-manager/legality.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
{{ if and (not .Deck.IsLegal) (ne .Deck.Gamemode "") }}
1+
{{ if eq .Deck.Gamemode "" }}
2+
<span
3+
class="px-0.75 inline-block font-sm font-grey-300"
4+
style="background-color:hsl(var(--grey-400-hsl)/0.1);height:24px;line-height:24px;border-radius:12px;"
5+
hx-get="/partials/deck-manager/legality/{{ .Deck.Id }}"
6+
hx-trigger="deckUpdated from:body"
7+
hx-swap="outerHTML"
8+
>Missing restrictions</span>
9+
{{ else if not .Deck.IsLegal }}
210
<span
311
class="px-0.75 inline-block font-sm font-red-400"
412
style="background-color:hsl(var(--red-400-hsl)/0.05);height:24px;line-height:24px;border-radius:12px;"

0 commit comments

Comments
 (0)