<template lang="pug">
main
input#modalInfo.modal(type="checkbox")
- div#infoDiv(role="dialog" data-checkbox="modalInfo" aria-labelledby="infoMessage")
- .card.smallpad.small-modal.text-center
+ div#infoDiv(role="dialog" data-checkbox="modalInfo")
+ .card.text-center
label.modal-close(for="modalInfo")
- h3#infoMessage.section
- p(v-html="infoMessage")
+ p(v-html="infoMessage")
input#modalNewgame.modal(type="checkbox")
- div#newgameDiv(role="dialog" data-checkbox="modalNewgame"
- aria-labelledby="titleFenedit")
- .card.smallpad(@keyup.enter="newChallenge")
+ div#newgameDiv(role="dialog" data-checkbox="modalNewgame")
+ .card(@keyup.enter="newChallenge()")
label#closeNewgame.modal-close(for="modalNewgame")
fieldset
label(for="selectVariant") {{ st.tr["Variant"] }} *
fieldset(v-if="st.user.id > 0 && newchallenge.to.length > 0")
label(for="inputFen") FEN
input#inputFen(type="text" v-model="newchallenge.fen")
- button(@click="newChallenge") {{ st.tr["Send challenge"] }}
+ button(@click="newChallenge()") {{ st.tr["Send challenge"] }}
.row
.col-sm-12
button#newGame(onClick="doClick('modalNewgame')") {{ st.tr["New game"] }}
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
div
.button-group
- button(@click="(e) => setDisplay('c','live',e)" class="active")
+ button(@click="setDisplay('c','live',$event)" class="active")
| {{ st.tr["Live challenges"] }}
- button(@click="(e) => setDisplay('c','corr',e)")
+ button(@click="setDisplay('c','corr',$event)")
| {{ st.tr["Correspondance challenges"] }}
ChallengeList(v-show="cdisplay=='live'"
:challenges="filterChallenges('live')" @click-challenge="clickChallenge")
| {{ getActionLabel(sid) }}
p.anonymous @nonymous ({{ anonymousCount }})
#chat
- Chat(:newChat="newChat" @mychat="processChat")
+ Chat(:newChat="newChat" @mychat="processChat" :pastChats="[]")
.clearer
div
.button-group
- button(@click="(e) => setDisplay('g','live',e)" class="active")
+ button(@click="setDisplay('g','live',$event)" class="active")
| {{ st.tr["Live games"] }}
- button(@click="(e) => setDisplay('g','corr',e)")
+ button(@click="setDisplay('g','corr',$event)")
| {{ st.tr["Correspondance games"] }}
GameList(v-show="gdisplay=='live'" :games="filterGames('live')"
@show-game="showGame")
if (s.sid != this.st.user.sid && !identityAsked[s.sid])
{
identityAsked[s.sid] = true;
- this.send("askidentity", {target:s.sid});
+ this.send("askidentity", {target:s.sid, page:s.page || "/"});
}
if (!this.people[s.sid])
this.$set(this.people, s.sid, {id:0, name:"", pages:[s.page || "/"]});
if (!s.page) //peer is in Hall
this.send("askchallenge", {target:s.sid});
else //peer is in Game
- this.send("askgame", {target:s.sid});
+ this.send("askgame", {target:s.sid, page:s.page});
});
break;
}
if (data.code == "connect")
this.send("askchallenge", {target:data.from});
else
- this.send("askgame", {target:data.from});
+ this.send("askgame", {target:data.from, page:data.page});
}
else
{
if (this.people[data.from].id == 0)
{
this.newConnect[data.from] = true; //for self multi-connects tests
- this.send("askidentity", {target:data.from});
+ this.send("askidentity", {target:data.from, page:data.page || "/"});
}
break;
case "disconnect":
"#/game/" + gameInfo.id + "</a>";
let modalBox = document.getElementById("modalInfo");
modalBox.checked = true;
- setTimeout(() => { modalBox.checked = false; }, 3000);
}
break;
}
#newGame
display: block
margin: 10px auto 5px auto
+
+#infoDiv > .card
+ padding: 15px 0
+ max-width: 430px
+
+#newgameDiv > .card
+ max-width: 767px
+ max-height: 100%
+
#people
width: 100%
#players