)
span {{ people[sid].name }}
button.player-action(
- v-if="sid!=st.user.sid || isGamer(sid)"
+ v-if="isGamer(sid) || (st.user.id > 0 && sid!=st.user.sid)"
@click="challOrWatch(sid)"
)
| {{ getActionLabel(sid) }}
.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
.button-group
button#peopleBtn(onClick="window.doClick('modalPeople')")
- | {{ st.tr["Social"] }}
+ | {{ st.tr["Who's there?"] }}
button(onClick="window.doClick('modalNewgame')")
| {{ st.tr["New game"] }}
.row
this.newchallenge.cadence = b.innerHTML;
});
});
- const showCtype = localStorage.getItem("type-challenges") || "live";
- const showGtype = localStorage.getItem("type-games") || "live";
+ const dispCorr = this.$route.query["disp"];
+ const showCtype =
+ dispCorr || localStorage.getItem("type-challenges") || "live";
+ const showGtype =
+ dispCorr || localStorage.getItem("type-games") || "live";
this.setDisplay("c", showCtype);
this.setDisplay("g", showGtype);
},
if (matchGid) gids.push(matchGid[0]);
});
const gid = gids[Math.floor(Math.random() * gids.length)];
- this.showGame(this.games.find(g => g.id == gid));
+ const game = this.games.find(g => g.id == gid);
+ if (game) this.showGame(game);
+ else this.$router.push("/game/" + gid); //game vs. me
}
},
showGame: function(g) {