Skip to content

Commit 3aff9e8

Browse files
committed
[refactoring] Remove and reorganize buttons and texts
1 parent 51425dc commit 3aff9e8

File tree

4 files changed

+11
-23
lines changed

4 files changed

+11
-23
lines changed

src/components/control/ControlTeam.vue

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@
3838
<br/>
3939

4040
<ControlTeamTimeout :team-color="teamColor"/>
41-
<b-button v-on:click="addGoal">
42-
Goal
43-
</b-button>
44-
<b-button v-on:click="addYellowCard">
45-
Yellow Card
46-
</b-button>
47-
48-
<br/>
4941

5042
<b-button v-on:click="revokeYellowCard"
5143
v-bind:disabled="teamState.yellowCardTimes.length===0">
@@ -70,15 +62,9 @@
7062
'command': {'forTeam': this.teamColor, 'commandType': command}
7163
})
7264
},
73-
addYellowCard: function () {
74-
this.$socket.sendObj({'card': {'forTeam': this.teamColor, 'cardType': 'yellow', 'operation': 'add'}})
75-
},
7665
revokeYellowCard: function () {
7766
this.$socket.sendObj({'card': {'forTeam': this.teamColor, 'cardType': 'yellow', 'operation': 'revoke'}})
7867
},
79-
addGoal: function () {
80-
this.$socket.sendObj({'modify': {'forTeam': this.teamColor, 'goals': this.teamState.goals + 1}})
81-
},
8268
sendKickoff() {
8369
if (!this.$refs.btnKickoff.disabled) {
8470
this.send('kickoff')
@@ -147,6 +133,6 @@
147133

148134
<style scoped>
149135
button {
150-
margin: 0.5em;
136+
margin: 0.25em;
151137
}
152138
</style>

src/components/control/ControlTeamTimeout.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@
4444
</script>
4545

4646
<style scoped>
47-
47+
button {
48+
margin: 0.25em;
49+
}
4850
</style>

src/components/team/TeamHalf.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<span>
3-
<label v-show="teamState.onPositiveHalf">On positive half</label>
4-
<label v-show="!teamState.onPositiveHalf">On negative half</label>
3+
<label v-show="teamState.onPositiveHalf">Goal is on positive half.</label>
4+
<label v-show="!teamState.onPositiveHalf">Goal is on negative half.</label>
55
</span>
66
</template>
77

src/components/team/TeamOverview.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
:team-color="teamColor"
2525
:goalie="team.goalie"/>
2626
</div>
27-
<div>
28-
<TeamHalf
29-
:team-color="teamColor"/>
30-
</div>
3127
<div>
3228
<TeamTimeouts
3329
:team-color="teamColor"
@@ -58,7 +54,11 @@
5854
:team-color="teamColor"/>
5955
</div>
6056
<div>
61-
Max <b>{{maxAllowedBots}}</b> bots allowed on the field
57+
<TeamHalf
58+
:team-color="teamColor"/>
59+
</div>
60+
<div>
61+
At most <b>{{maxAllowedBots}}</b> bots allowed on the field.
6262
</div>
6363
</div>
6464
</div>

0 commit comments

Comments
 (0)