Skip to content

Commit edba4b5

Browse files
committed
[refactoring] Unify button margins
1 parent 08c9e1f commit edba4b5

File tree

11 files changed

+28
-33
lines changed

11 files changed

+28
-33
lines changed

src/assets/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@
1515
.team-blue {
1616
color: blue;
1717
}
18+
19+
button, .btn-group {
20+
margin: 0.25em;
21+
}

src/components/common/DualSwitch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
<style scoped>
4848
49-
button, .switch {
49+
.switch {
5050
margin: 0.25em;
5151
}
5252

src/components/control/ControlFlowBar.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,4 @@
7676
</script>
7777

7878
<style scoped>
79-
button {
80-
margin-right: 0.5em;
81-
margin-bottom: 0.5em;
82-
}
8379
</style>

src/components/control/MatchSettingsBar.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@
108108
</script>
109109

110110
<style scoped>
111-
button, .btn-group {
112-
margin-right: 0.5em;
113-
margin-bottom: 0.5em;
114-
}
115111
116112
.btn-active {
117113
background-color: green;

src/components/events/Events.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
<b-pagination size="sm"
77
:total-rows="events.length"
88
v-model="currentPage"
9-
:per-page="perPage">
10-
</b-pagination>
9+
:per-page="perPage"/>
1110

1211
<input v-model.number="perPage"
1312
title="Rows per page"
@@ -61,12 +60,9 @@
6160
justify-content: center;
6261
}
6362
64-
.event-controls-container button, input {
65-
margin-bottom: 1rem;
66-
margin-left: 1rem;
67-
}
68-
6963
input {
7064
text-align: center;
65+
margin-bottom: 1rem;
66+
margin-left: 1rem;
7167
}
7268
</style>

src/components/manual-control/ControlTeamTimeout.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<b-button v-on:click="toggleTimeout"
3+
class="manual-control-button"
34
v-bind:disabled="disableTimeoutButton">
45
{{timeoutRunning ? 'Stop' : 'Start'}} Timeout
56
</b-button>

src/components/manual-control/ManualControl.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@
8787

8888
<style scoped>
8989
</style>
90+
91+
<style>
92+
.manual-control-button {
93+
width: 90%;
94+
}
95+
</style>

src/components/manual-control/ManualControlCommon.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:title="'Immediately stop all robots (' + Object.keys(keymapHalt)[0] + ')'">
77
<b-button v-hotkey="keymapHalt"
88
ref="btnHalt"
9+
class="manual-control-button"
910
v-on:click="send('halt')"
1011
v-bind:disabled="halted">
1112
Halt
@@ -17,6 +18,7 @@
1718
:title="'Robots have to keep distance to the ball (' + Object.keys(keymapStop)[0] + ')'">
1819
<b-button v-hotkey="keymapStop"
1920
ref="btnStop"
21+
class="manual-control-button"
2022
v-on:click="send('stop')"
2123
v-bind:disabled="stopped || !stopAllowed">
2224
Stop
@@ -30,6 +32,7 @@
3032
:title="'Restart the game in draw situations (' + Object.keys(keymapForceStart)[0] + ')'">
3133
<b-button v-hotkey="keymapForceStart"
3234
ref="btnForceStart"
35+
class="manual-control-button"
3336
v-on:click="send('forceStart')"
3437
v-bind:disabled="!stopped || !forceStartAllowed">
3538
Force Start
@@ -41,6 +44,7 @@
4144
:title="'Continue game after a prepare state (' + Object.keys(keymapNormalStart)[0] + ')'">
4245
<b-button v-hotkey="keymapNormalStart"
4346
ref="btnNormalStart"
47+
class="manual-control-button"
4448
v-on:click="send('normalStart')"
4549
v-bind:disabled="!prepareSth || !normalStartAllowed">
4650
Normal Start
@@ -125,11 +129,6 @@
125129
</script>
126130

127131
<style scoped>
128-
button {
129-
margin: 0.5em;
130-
width: 90%;
131-
}
132-
133132
table {
134133
width: 100%;
135134
}

src/components/manual-control/ManualControlTeam.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
<template>
22
<div class="container">
33
<b-button v-on:click="addYellowCard"
4+
class="manual-control-button"
45
v-bind:disabled="running || preparing">
56
Add Yellow Card
67
</b-button>
78

89
<b-button v-on:click="revokeYellowCard"
10+
class="manual-control-button"
911
v-bind:disabled="teamState.yellowCardTimes.length===0">
1012
Revoke Yellow Card
1113
</b-button>
1214

1315
<b-button v-on:click="addRedCard"
16+
class="manual-control-button"
1417
v-bind:disabled="running || preparing">
1518
Add Red Card
1619
</b-button>
1720

18-
<b-button v-on:click="addGoal">
21+
<b-button v-on:click="addGoal"
22+
class="manual-control-button">
1923
Goal
2024
</b-button>
2125

@@ -116,9 +120,4 @@
116120
padding-left: 0;
117121
padding-right: 0;
118122
}
119-
120-
button {
121-
margin: 0.5em;
122-
width: 90%;
123-
}
124123
</style>

src/components/manual-control/ManualControlTeamMatchCommands.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
:title="'Perform direct kick (corner and goal kicks) (' + Object.keys(keymapDirect)[0] + ')'">
55
<b-button v-hotkey="keymapDirect"
66
ref="btnDirect"
7+
class="manual-control-button"
78
v-on:click="sendDirect"
89
v-bind:disabled="halted || running || preparing || !nonPausedStage">
910
Direct
@@ -13,6 +14,7 @@
1314
:title="'Perform indirect kick (throw-in) (' + Object.keys(keymapIndirect)[0] + ')'">
1415
<b-button v-hotkey="keymapIndirect"
1516
ref="btnIndirect"
17+
class="manual-control-button"
1618
v-on:click="sendIndirect"
1719
v-bind:disabled="halted || running || preparing || !nonPausedStage">
1820
Indirect
@@ -22,6 +24,7 @@
2224
:title="'Prepare for a kickoff (' + Object.keys(keymapKickoff)[0] + ')'">
2325
<b-button v-hotkey="keymapKickoff"
2426
ref="btnKickoff"
27+
class="manual-control-button"
2528
v-on:click="sendKickoff"
2629
v-bind:disabled="halted || running || preparing">
2730
Kickoff
@@ -30,6 +33,7 @@
3033
<div v-b-tooltip.hover
3134
title="Prepare for a penalty kick">
3235
<b-button v-on:click="sendPenalty"
36+
class="manual-control-button"
3337
v-bind:disabled="halted || running || preparing || !nonPausedStage">
3438
Penalty
3539
</b-button>
@@ -127,9 +131,4 @@
127131
padding-left: 0;
128132
padding-right: 0;
129133
}
130-
131-
button {
132-
margin: 0.5em;
133-
width: 90%;
134-
}
135134
</style>

0 commit comments

Comments
 (0)