Skip to content

Commit 80e026e

Browse files
authored
Merge branch 'master' into cardcount
2 parents 10177ad + c3d63c7 commit 80e026e

File tree

6 files changed

+21
-2
lines changed

6 files changed

+21
-2
lines changed

src/nussschale/leafs/endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_param_as(self, x: str, type: Type[T]) -> T:
100100
if type == int:
101101
if not isinstance(val, str):
102102
raise ValueError()
103-
val = int(val)
103+
return cast(T, int(val))
104104
elif type == str:
105105
if not isinstance(val, str):
106106
raise ValueError()

src/pages/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ def api_status(ctx: EndpointContext) -> None:
359359
"allowChoose": allow_choose,
360360
"allowPick": allow_pick,
361361
"isSpectator": part.spectator,
362+
"isPicker": part.picking,
362363
"gaps": match.count_gaps()}
363364

364365
# Add the card text to the output, if possible

src/res/css/common/deck.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,7 @@
9191
text-decoration: none !important;
9292
cursor: pointer;
9393
}
94+
95+
.grey-card {
96+
transform: unset !important;
97+
}

src/res/css/dark/deck.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@
4747
.knob-verb {
4848
background-color: #D90;
4949
}
50+
51+
.grey-card {
52+
filter: grayscale(50%);
53+
opacity: 0.5;
54+
}

src/res/css/light/deck.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@
4242
.knob-verb {
4343
background-color: #FB0;
4444
}
45+
46+
.grey-card {
47+
filter: grayscale(50%);
48+
opacity: 0.5;
49+
}

src/res/js/match/match.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*
44
* MIT License
55
* Copyright (c) 2017-2018 LordKorea
6+
* Copyright (c) 2018 Arc676/Alessandro Vinciguerra
67
*
78
* Permission is hereby granted, free of charge, to any person obtaining a copy
89
* of this software and associated documentation files (the "Software"), to
@@ -30,6 +31,7 @@
3031
let allowChoose = false
3132
let allowPick = false
3233
let isSpectator = false
34+
let isPicker = false
3335
let externalUpdateAllowed = true
3436
let handResolver = new Map([
3537
["OBJECT", new Map()],
@@ -64,12 +66,12 @@
6466
allowChoose = data.allowChoose
6567
allowPick = data.allowPick
6668
isSpectator = data.isSpectator
67-
6869
$("#cardcount").html("Selected: " + numSelected + "/" + numGaps);
6970

7071
if (isSpectator) {
7172
$(".match-hand").addClass("invisible")
7273
}
74+
isPicker = data.isPicker
7375

7476
updateMatchStatement(data.hasCard, data.cardText || "Waiting...")
7577

@@ -267,6 +269,8 @@
267269
} else {
268270
container.empty().append(createSystemCard())
269271
}
272+
273+
$(".hand-set").find(".card-base").toggleClass("grey-card", isPicker)
270274
}
271275

272276
/**

0 commit comments

Comments
 (0)