X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=8f86f4c4a84e3d1a95345412f12e9bc964584453;hp=eb8464ae4f15339c22863cd424aa64ec81eed592;hb=f1c9d7072d253ba55a941f97a99eee7e394577ed;hpb=68e19a449db7a12e0a168e99cd750d985c983ba1 diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index eb8464ae..8f86f4c4 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -120,7 +120,7 @@ main @click="challenge(sid)" ) | {{ st.tr["Challenge"] }} - p.anonymous @nonymous ({{ anonymousCount }}) + p.anonymous @nonymous ({{ anonymousCount() }}) #chat Chat( :newChat="newChat" @@ -266,16 +266,6 @@ export default { this.loadNewchallVariant(); } }, - computed: { - anonymousCount: function() { - let count = 0; - Object.values(this.people).forEach(p => { - // Do not cound people who did not send their identity yet: - count += (!p.name && p.id === 0) ? 1 : 0; - }); - return count; - } - }, created: function() { if (this.st.variants.length > 0 && this.newchallenge.vid > 0) this.loadNewchallVariant(); @@ -436,6 +426,14 @@ export default { ["random-" + pc.randomness]: true }; }, + anonymousCount: function() { + let count = 0; + Object.values(this.people).forEach(p => { + // Do not cound people who did not send their identity yet: + count += (!p.name && p.id === 0) ? 1 : 0; + }); + return count; + }, visibilityChange: function() { // TODO: Use document.hidden? https://webplatform.news/issues/2019-03-27 this.send(