Skip to content

Commit e184b0c

Browse files
committed
[refactoring] Move game event view to its own vue component
1 parent cf2a892 commit e184b0c

File tree

7 files changed

+42
-24
lines changed

7 files changed

+42
-24
lines changed

src/components/AutonomousControl.vue

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,26 @@
11
<template>
22
<div id="container">
3-
<ManualControl class="game-controller-view"/>
4-
<TeamOverview class="game-controller-view"/>
5-
<Events class="game-controller-view"/>
6-
<div class="game-controller-view">
7-
<h2>Game Events</h2>
8-
<div class="game-events">
9-
<CurrentEvents/>
10-
<hr>
11-
<EventProposals/>
12-
</div>
13-
</div>
3+
<ManualControl/>
4+
<TeamOverview/>
5+
<Events/>
6+
<GameEvents/>
147
</div>
158
</template>
169

1710
<script>
1811
import TeamOverview from "./team/TeamOverview";
1912
import ControlTeam from "./manual-control/ManualControlTeam";
2013
import Events from "./events/Events";
21-
import EventProposals from "./events/EventProposals";
22-
import CurrentEvents from "./events/CurrentEvents";
2314
import Settings from "./settings/Settings";
2415
import ManualControl from "./manual-control/ManualControl";
16+
import GameEvents from "./game-events/GameEvents";
2517
2618
export default {
2719
name: "AutonomousControl",
2820
components: {
21+
GameEvents,
2922
ManualControl,
3023
Settings,
31-
CurrentEvents,
32-
EventProposals,
3324
Events,
3425
ControlTeam,
3526
TeamOverview,
@@ -49,10 +40,4 @@
4940
flex-grow: 1;
5041
}
5142
52-
.game-events {
53-
text-align: left;
54-
overflow-y: auto;
55-
max-height: 85vh;
56-
}
57-
5843
</style>

src/components/events/Events.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="game-controller-view">
33
<h2>Game Protocol</h2>
44
<EventTable :current-page="currentPage" :per-page="perPage" :events="events"/>
55
<div class="event-controls-container">
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<template>
2+
<div class="game-controller-view">
3+
<h2>Game Events</h2>
4+
<div class="game-events">
5+
<CurrentEvents/>
6+
<hr>
7+
<EventProposals/>
8+
</div>
9+
</div>
10+
</template>
11+
12+
<script>
13+
import CurrentEvents from "./CurrentEvents";
14+
import EventProposals from "./EventProposals";
15+
16+
export default {
17+
name: "GameEvents",
18+
components: {
19+
EventProposals,
20+
CurrentEvents
21+
}
22+
}
23+
</script>
24+
25+
<style scoped>
26+
27+
.game-events {
28+
text-align: left;
29+
overflow-y: auto;
30+
max-height: 85vh;
31+
}
32+
33+
</style>

src/components/manual-control/ManualControl.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="game-controller-view">
33
<h2>Manual Control</h2>
44
<table>
55
<tr>

src/components/team/TeamOverview.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="game-controller-view">
33
<h2>Team Overview</h2>
44
<table>
55
<tr>

0 commit comments

Comments
 (0)