|
12 | 12 | </template>
|
13 | 13 | <template v-slot:cell(type)="data">
|
14 | 14 | <span v-b-tooltip.hover.d500 :title="protocolType(data.item)">
|
15 |
| - <font-awesome-icon class="fa-sm" :icon="iconForType(protocolType(data.item))"/> |
| 15 | + <font-awesome-icon :class="{'fa-sm': true, foul: isFoul(data.item)}" :icon="iconForType(protocolType(data.item))" /> |
16 | 16 | </span>
|
17 | 17 | </template>
|
18 | 18 | <template v-slot:cell(time)="data">
|
|
124 | 124 | return undefined;
|
125 | 125 | }
|
126 | 126 | },
|
| 127 | + isFoul(entry) { |
| 128 | + let protocolType = this.protocolType(entry); |
| 129 | + let gameEventType; |
| 130 | + if (protocolType === 'addGameEvent') { |
| 131 | + gameEventType = entry.change.addGameEvent.gameEvent.type; |
| 132 | + } else if (protocolType === 'addProposal') { |
| 133 | + gameEventType = entry.change.addProposal.proposal.gameEvent.type; |
| 134 | + } else if (protocolType === 'addPassiveGameEvent') { |
| 135 | + gameEventType = entry.change.addPassiveGameEvent.gameEvent.type; |
| 136 | + } else { |
| 137 | + return false; |
| 138 | + } |
| 139 | + switch(gameEventType) { |
| 140 | + case 'ATTACKER_TOO_CLOSE_TO_DEFENSE_AREA': |
| 141 | + case 'DEFENDER_IN_DEFENSE_AREA': |
| 142 | + case 'BOUNDARY_CROSSING': |
| 143 | + case 'KEEPER_HELD_BALL': |
| 144 | + case 'BOT_DRIBBLED_BALL_TOO_FAR': |
| 145 | + case 'BOT_PUSHED_BOT': |
| 146 | + case 'BOT_HELD_BALL_DELIBERATELY': |
| 147 | + case 'BOT_TIPPED_OVER': |
| 148 | + case 'ATTACKER_TOUCHED_BALL_IN_DEFENSE_AREA': |
| 149 | + case 'BOT_KICKED_BALL_TOO_FAST': |
| 150 | + case 'BOT_CRASH_UNIQUE': |
| 151 | + case 'BOT_CRASH_DRAWN': |
| 152 | + case 'DEFENDER_TOO_CLOSE_TO_KICK_POINT': |
| 153 | + case 'BOT_TOO_FAST_IN_STOP': |
| 154 | + case 'BOT_INTERFERED_PLACEMENT': |
| 155 | + return true; |
| 156 | + } |
| 157 | + return false; |
| 158 | + }, |
127 | 159 | iconForType(type) {
|
128 | 160 | switch (type) {
|
129 | 161 | case 'newCommand':
|
|
214 | 246 | text-align: left;
|
215 | 247 | margin-left: 50px;
|
216 | 248 | }
|
| 249 | + |
| 250 | + .foul { |
| 251 | + color: Tomato; |
| 252 | + } |
217 | 253 | </style>
|
0 commit comments