Skip to content

Commit 146c7cd

Browse files
committed
Reorder ball placement view components
1 parent a785d51 commit 146c7cd

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

frontend/src/views/PlaceBallView.vue

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,19 @@ const placeBall = (team: Team) => {
4646
4747
const disable = computed(() => {
4848
return store.matchState.command?.type !== Command_Type.STOP
49-
|| !store.matchState.stage
50-
|| isPausedStage(store.matchState.stage)
49+
|| !store.matchState.stage
50+
|| isPausedStage(store.matchState.stage)
5151
})
5252
</script>
5353

5454
<template>
55-
<div class="row">
56-
<ControlButton class="col-grow" label="Place ball"
57-
v-for="team in [Team.YELLOW, Team.BLUE]"
58-
:key="team"
59-
:disable="disable"
60-
:action="() => placeBall(team)"
61-
:team="team"
62-
/>
55+
<div class="row justify-evenly q-mt-md">
56+
<ControlButton label="Reset sliders to current ball position"
57+
:disable="false"
58+
:action="resetBallPos"/>
6359
</div>
6460

65-
<div class="row wrap justify-evenly q-mt-md">
61+
<div class="row justify-evenly q-mt-md">
6662
<q-input
6763
input-class="text-center"
6864
dense
@@ -87,14 +83,14 @@ const disable = computed(() => {
8783
</q-item-section>
8884
<q-item-section>
8985
<q-slider
90-
v-model="newBallPos.x"
91-
:min="-minMaxX"
92-
:max="minMaxX"
93-
:step="0.1"
94-
selection-color="transparent"
95-
label
96-
:label-value="newBallPos.x + ' m'"
97-
label-always
86+
v-model="newBallPos.x"
87+
:min="-minMaxX"
88+
:max="minMaxX"
89+
:step="0.1"
90+
selection-color="transparent"
91+
label
92+
:label-value="newBallPos.x + ' m'"
93+
label-always
9894
/>
9995
<q-slider class="slider-current"
10096

@@ -118,34 +114,38 @@ const disable = computed(() => {
118114
</q-item-section>
119115
<q-item-section>
120116
<q-slider
121-
v-model="curBallPos.y"
122-
:min="-minMaxY"
123-
:max="minMaxY"
124-
:step="0.1"
125-
selection-color="transparent"
126-
color="info"
127-
disable
117+
v-model="curBallPos.y"
118+
:min="-minMaxY"
119+
:max="minMaxY"
120+
:step="0.1"
121+
selection-color="transparent"
122+
color="info"
123+
disable
128124
/>
129125
<q-slider
130-
v-model="newBallPos.y"
131-
:min="-minMaxY"
132-
:max="minMaxY"
133-
:step="0.1"
134-
selection-color="transparent"
135-
label
136-
:label-value="newBallPos.y + ' m'"
137-
label-always
138-
switch-label-side
126+
v-model="newBallPos.y"
127+
:min="-minMaxY"
128+
:max="minMaxY"
129+
:step="0.1"
130+
selection-color="transparent"
131+
label
132+
:label-value="newBallPos.y + ' m'"
133+
label-always
134+
switch-label-side
139135
/>
140136
</q-item-section>
141137
<q-item-section avatar/>
142138
</q-item>
143139
</div>
140+
</div>
144141

145-
<div class="row wrap justify-evenly q-mt-md">
146-
<ControlButton label="Reset placement position"
147-
:disable="false"
148-
:action="resetBallPos"/>
149-
</div>
142+
<div class="row justify-evenly q-mt-md">
143+
<ControlButton class="col-grow" label="Place ball"
144+
v-for="team in [Team.YELLOW, Team.BLUE]"
145+
:key="team"
146+
:disable="disable"
147+
:action="() => placeBall(team)"
148+
:team="team"
149+
/>
150150
</div>
151151
</template>

0 commit comments

Comments
 (0)