|
18 | 18 | v-on:click="triggerContinue"
|
19 | 19 | v-bind:disabled="continueDisabled">
|
20 | 20 | Continue
|
21 |
| - <span v-if="nextCommand && nextCommand.type">with</span> |
22 |
| - <span v-if="nextCommand" |
23 |
| - :class="teamColorClass"> |
24 |
| - {{ nextCommand.type }} |
25 |
| - </span> |
| 21 | + <template v-if="botSubstitutionRequested && timeoutRequested"> with timeout and bot substitution</template> |
| 22 | + <template v-else-if="botSubstitutionRequested"> with bot substitution</template> |
| 23 | + <template v-else-if="timeoutRequested"> with timeout</template> |
| 24 | + <template v-else-if="nextCommand && nextCommand.type">with |
| 25 | + <span :class="teamColorClass">{{ nextCommand.type }}</span> |
| 26 | + </template> |
26 | 27 | <span v-for="issue of continuationIssues" v-bind:key="issue">
|
27 | 28 | <br>
|
28 | 29 | - {{issue}}
|
@@ -68,11 +69,32 @@ export default {
|
68 | 69 | halted() {
|
69 | 70 | return this.$store.state.matchState.command.type === 'HALT';
|
70 | 71 | },
|
| 72 | + gameRunning() { |
| 73 | + switch (this.$store.state.matchState.command.type) { |
| 74 | + case 'FORCE_START': |
| 75 | + case 'NORMAL_START': |
| 76 | + case 'DIRECT': |
| 77 | + case 'INDIRECT': |
| 78 | + case 'KICKOFF': |
| 79 | + case 'PENALTY': |
| 80 | + case 'BALL_PLACEMENT': |
| 81 | + return true; |
| 82 | + } |
| 83 | + return false; |
| 84 | + }, |
71 | 85 | timeoutActive() {
|
72 | 86 | return this.$store.state.matchState.command.type === 'TIMEOUT';
|
73 | 87 | },
|
| 88 | + timeoutRequested() { |
| 89 | + return this.$store.state.matchState.teamState[TEAM_YELLOW].requestsTimeoutSince !== null |
| 90 | + || this.$store.state.matchState.teamState[TEAM_BLUE].requestsTimeoutSince !== null; |
| 91 | + }, |
| 92 | + botSubstitutionRequested() { |
| 93 | + return this.$store.state.matchState.teamState[TEAM_YELLOW].requestsBotSubstitutionSince !== null |
| 94 | + || this.$store.state.matchState.teamState[TEAM_BLUE].requestsBotSubstitutionSince !== null; |
| 95 | + }, |
74 | 96 | continueDisabled() {
|
75 |
| - return !this.nextCommand; |
| 97 | + return this.gameRunning || (!this.nextCommand && !this.timeoutRequested && !this.botSubstitutionRequested); |
76 | 98 | },
|
77 | 99 | stopAllowed() {
|
78 | 100 | return isNonPausedStage(this.$store.state.matchState)
|
|
0 commit comments