- abortGame: function(event) {
- let modalBox = document.getElementById("modalAbort");
- if (!event)
- {
- // First call show options:
- modalBox.checked = true;
- }
- else
- {
- modalBox.checked = false; //decision made: box disappear
- const message = event.target.innerText;
- // Next line will trigger a "gameover" event, bubbling up till here
- this.$refs["basegame"].endGame("?", "Abort: " + message);
- const oppsid = this.getOppSid();
- if (!!oppsid)
+ abortGame: function() {
+ if (!confirm(this.st.tr["Terminate game?"]))
+ return;
+ // Next line will trigger a "gameover" event, bubbling up till here
+ this.$refs["basegame"].endGame("?", "Abort");
+ this.people.forEach(p => {
+ if (p.sid != this.st.user.sid)