projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjustments. Still issues with arrows out of board
[vchess.git]
/
client
/
src
/
views
/
Hall.vue
diff --git
a/client/src/views/Hall.vue
b/client/src/views/Hall.vue
index
133a5f9
..
71d7764
100644
(file)
--- a/
client/src/views/Hall.vue
+++ b/
client/src/views/Hall.vue
@@
-572,14
+572,12
@@
export default {
}
});
const gid = gids[Math.floor(Math.random() * gids.length)];
}
});
const gid = gids[Math.floor(Math.random() * gids.length)];
- const game = this.games.find(g => g.id == gid);
- if (!!game) this.showGame(game);
- else this.$router.push("/game/" + gid); //game vs. me
+ window.open("/#/game/" + gid, "_blank");
},
showGame: function(g) {
// NOTE: we are an observer, since only games I don't play are shown here
// ==> Moves sent by connected remote player(s) if live game
},
showGame: function(g) {
// NOTE: we are an observer, since only games I don't play are shown here
// ==> Moves sent by connected remote player(s) if live game
-
this.$router.push("/game/" + g.id
);
+
window.open("/#/game/" + g.id, "_blank"
);
},
toggleSocialColor: function(action) {
if (!action && document.getElementById("modalPeople").checked)
},
toggleSocialColor: function(action) {
if (!action && document.getElementById("modalPeople").checked)
@@
-822,12
+820,13
@@
export default {
// Ignore games where I play (will go in MyGames page),
// and also games that I already received.
if (
// Ignore games where I play (will go in MyGames page),
// and also games that I already received.
if (
+ this.games.findIndex(g => g.id == game.id) == -1 &&
game.players.every(p => {
return (
p.sid != this.st.user.sid &&
(p.id == 0 || p.id != this.st.user.id)
);
game.players.every(p => {
return (
p.sid != this.st.user.sid &&
(p.id == 0 || p.id != this.st.user.id)
);
- })
&& this.games.findIndex(g => g.id == game.id) == -1
+ })
) {
let newGame = game;
newGame.type = this.classifyObject(game);
) {
let newGame = game;
newGame.type = this.classifyObject(game);
@@
-837,6
+836,7
@@
export default {
newGame.score = "*";
this.games.push(newGame);
if (
newGame.score = "*";
this.games.push(newGame);
if (
+ newGame.score == '*' &&
(newGame.type == "live" && this.gdisplay == "corr") ||
(newGame.type == "corr" && this.gdisplay == "live")
) {
(newGame.type == "live" && this.gdisplay == "corr") ||
(newGame.type == "corr" && this.gdisplay == "live")
) {
@@
-888,7
+888,8
@@
export default {
if (
this.cursor == Number.MAX_SAFE_INTEGER &&
this.games.length == 0 &&
if (
this.cursor == Number.MAX_SAFE_INTEGER &&
this.games.length == 0 &&
- this.gdisplay == "live"
+ this.gdisplay == "live" &&
+ res.games.some(g => g.score == '*')
) {
// First loading: show indicators
document
) {
// First loading: show indicators
document
@@
-1299,7
+1300,8
@@
export default {
{ body: "vs " + game.players[1-myIdx].name || "@nonymous" }
);
}
{ body: "vs " + game.players[1-myIdx].name || "@nonymous" }
);
}
- this.$router.push("/game/" + gameInfo.id);
+ this.$router.push(
+ "/game/" + gameInfo.id + "/?focus=" + this.focus);
});
},
this.focus ? 500 + 1000 * Math.random() : 0
});
},
this.focus ? 500 + 1000 * Math.random() : 0
@@
-1311,7
+1313,7
@@
export default {
<style lang="sass" scoped>
.active
<style lang="sass" scoped>
.active
- color: #
42a983
+ color: #
388e3c
#infoDiv > .card
padding: 15px 0
#infoDiv > .card
padding: 15px 0
@@
-1365,7
+1367,7
@@
button.player-action
margin-left: 32px
.somethingnew
margin-left: 32px
.somethingnew
- background-color: #
c5fefe
!important
+ background-color: #
90C4EC
!important
.tabbtn
background-color: #f9faee
.tabbtn
background-color: #f9faee