Skip to content

Commit 5b9b369

Browse files
committed
[ui] Move field between team info and control view
1 parent cbecdd8 commit 5b9b369

File tree

3 files changed

+71
-49
lines changed

3 files changed

+71
-49
lines changed

ui/src/App.vue

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
<template>
22
<div id="app">
3-
<div id="header">
4-
<ControlGeneral class="header-item"/>
5-
<GameState id="game-state" class="header-item"/>
3+
<div id="app-header">
4+
<ControlGeneral class="app-header-item"/>
5+
<GameState id="game-state" class="app-header-item"/>
66
</div>
77
<div id="main-elements">
8-
<TeamOverview class="team-views" team-color="Yellow"/>
9-
<TeamOverview class="team-views" team-color="Blue"/>
10-
<ControlTeam class="team-views" team-color="Yellow"/>
11-
<ControlTeam class="team-views" team-color="Blue"/>
8+
<div class="team-container">
9+
<TeamOverview class="team-views" team-color="Yellow"/>
10+
<ControlTeam class="team-views" team-color="Yellow"/>
11+
</div>
12+
<div id="field">
13+
<Field/>
14+
</div>
15+
<div class="team-container">
16+
<TeamOverview class="team-views" team-color="Blue"/>
17+
<ControlTeam class="team-views" team-color="Blue"/>
18+
</div>
1219
</div>
13-
<Field/>
1420
<ControlMatch id="match-controls"/>
1521
<Debug id="debug"/>
1622
</div>
@@ -48,7 +54,7 @@
4854
color: #2c3e50;
4955
}
5056
51-
#header {
57+
#app-header {
5258
display: flex;
5359
flex-direction: row;
5460
flex-wrap: wrap-reverse;
@@ -57,7 +63,7 @@
5763
align-content: flex-start;
5864
}
5965
60-
.header-item {
66+
.app-header-item {
6167
margin: 0.3em;
6268
}
6369
@@ -73,6 +79,16 @@
7379
justify-content: flex-start;
7480
align-items: flex-start;
7581
align-content: flex-start;
82+
flex-grow: 1;
83+
}
84+
85+
#field {
86+
flex-grow: 1;
87+
}
88+
89+
.team-container {
90+
display: flex;
91+
flex-direction: column;
7692
}
7793
7894
#match-controls {

ui/src/components/field/Field.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
field: {
7373
type: Object,
7474
default: function () {
75-
let fieldWidth = 2000;
76-
let fieldLength = 3000;
75+
let fieldWidth = 9000;
76+
let fieldLength = 12000;
7777
let centerCircleRadius = 500;
7878
return {
7979
fieldWidth: fieldWidth,
@@ -185,5 +185,9 @@
185185
</script>
186186

187187
<style scoped>
188-
188+
.field-canvas {
189+
width: 100%;
190+
height: 100%;
191+
display: table-row;
192+
}
189193
</style>
Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,42 @@
11
<template>
2-
<div class="team-overview">
2+
<div>
33
<h2 v-b-tooltip.hover title="Edit team data by double-clicking a value"> Team {{teamColor}}</h2>
4-
<div>
5-
<TeamName
6-
:team-color="teamColor"/>
7-
</div>
8-
<div>
9-
<TeamScore
10-
:team-color="teamColor"
11-
:score="team.goals"/>
12-
</div>
13-
<div>
14-
<TeamGoalie
15-
:team-color="teamColor"
16-
:goalie="team.goalie"/>
17-
</div>
18-
<div>
19-
<TeamHalf
20-
:team-color="teamColor"/>
21-
</div>
22-
<div>
23-
<TeamTimeouts
24-
:team-color="teamColor"
25-
:timeouts-left="team.timeoutsLeft"
26-
:timeout-time-left="team.timeoutTimeLeft"/>
27-
</div>
28-
<div>
29-
<TeamRedCards
30-
:team-color="teamColor"
31-
:red-cards="team.redCards"/>
32-
</div>
33-
<div>
34-
<TeamYellowCards
35-
:team-color="teamColor"
36-
:yellow-cards="team.yellowCards"
37-
:yellow-card-times="team.yellowCardTimes"/>
4+
<div class="content">
5+
<div>
6+
<TeamName
7+
:team-color="teamColor"/>
8+
</div>
9+
<div>
10+
<TeamScore
11+
:team-color="teamColor"
12+
:score="team.goals"/>
13+
</div>
14+
<div>
15+
<TeamGoalie
16+
:team-color="teamColor"
17+
:goalie="team.goalie"/>
18+
</div>
19+
<div>
20+
<TeamHalf
21+
:team-color="teamColor"/>
22+
</div>
23+
<div>
24+
<TeamTimeouts
25+
:team-color="teamColor"
26+
:timeouts-left="team.timeoutsLeft"
27+
:timeout-time-left="team.timeoutTimeLeft"/>
28+
</div>
29+
<div>
30+
<TeamRedCards
31+
:team-color="teamColor"
32+
:red-cards="team.redCards"/>
33+
</div>
34+
<div>
35+
<TeamYellowCards
36+
:team-color="teamColor"
37+
:yellow-cards="team.yellowCards"
38+
:yellow-card-times="team.yellowCardTimes"/>
39+
</div>
3840
</div>
3941
</div>
4042
</template>
@@ -68,7 +70,7 @@
6870
</script>
6971

7072
<style scoped>
71-
.team-overview {
73+
.content {
7274
text-align: left;
7375
}
7476
</style>

0 commit comments

Comments
 (0)