projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First draft of S-chess variant + a few fixes
[vchess.git]
/
client
/
src
/
views
/
Hall.vue
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
d0cabb4
..
2863546
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-73,10
+73,14
@@
main
)
fieldset(v-if="st.user.id > 0")
label(for="selectPlayers") {{ st.tr["Play with"] }}
)
fieldset(v-if="st.user.id > 0")
label(for="selectPlayers") {{ st.tr["Play with"] }}
- select#selectPlayersInList(v-model="newchallenge.to")
+ select#selectPlayersInList(
+ v-model="newchallenge.to"
+ @change="changeChallTarget()"
+ )
option(value="")
option(
v-for="p in Object.values(people)"
option(value="")
option(
v-for="p in Object.values(people)"
+ v-if="!!p.name"
:value="p.name"
)
| {{ p.name }}
:value="p.name"
)
| {{ p.name }}
@@
-453,6
+457,13
@@
export default {
if (!!this.curChallToAccept.fen) return { "margin-top": "10px" };
return {};
},
if (!!this.curChallToAccept.fen) return { "margin-top": "10px" };
return {};
},
+ changeChallTarget: function() {
+ if (!this.newchallenge.to) {
+ // Reset potential FEN + diagram
+ this.newchallenge.fen = "";
+ this.newchallenge.diag = "";
+ }
+ },
cadenceFocusIfOpened: function() {
if (event.target.checked)
document.getElementById("cadence").focus();
cadenceFocusIfOpened: function() {
if (event.target.checked)
document.getElementById("cadence").focus();
@@
-903,7
+914,7
@@
export default {
position: parsedFen.position,
orientation: parsedFen.turn
});
position: parsedFen.position,
orientation: parsedFen.turn
});
- }
+ }
else this.newchallenge.diag = "";
},
newChallFromPreset(pchall) {
this.partialResetNewchallenge();
},
newChallFromPreset(pchall) {
this.partialResetNewchallenge();