projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes
[vchess.git]
/
client
/
src
/
views
/
Game.vue
diff --git
a/client/src/views/Game.vue
b/client/src/views/Game.vue
index
7b14055
..
2f33bc5
100644
(file)
--- a/
client/src/views/Game.vue
+++ b/
client/src/views/Game.vue
@@
-2,7
+2,8
@@
main
.row
#chat.col-sm-12.col-md-4.col-md-offset-4
main
.row
#chat.col-sm-12.col-md-4.col-md-offset-4
- Chat(:players="game.players" @newchat="processChat")
+ Chat(:players="game.players" :pastChats="game.chats"
+ @newchat="processChat")
.row
.col-sm-12
#actions(v-if="game.mode!='analyze' && game.score=='*'")
.row
.col-sm-12
#actions(v-if="game.mode!='analyze' && game.score=='*'")
@@
-364,6
+365,8
@@
export default {
end: s.end,
};
});
end: s.end,
};
});
+ // Also sort chat messages (if any)
+ game.chats.sort( (c1,c2) => { return c2.added - c1.added; });
}
const myIdx = game.players.findIndex(p => {
return p.sid == this.st.user.sid || p.uid == this.st.user.id;
}
const myIdx = game.players.findIndex(p => {
return p.sid == this.st.user.sid || p.uid == this.st.user.id;