Skip to content

Commit 8141357

Browse files
committed
[refactoring] Reorganize styling
1 parent ec828d9 commit 8141357

File tree

10 files changed

+37
-45
lines changed

10 files changed

+37
-45
lines changed

src/App.vue

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
<div id="app">
33
<div id="app-header">
44
<MatchSettingsBar class="app-header-item"/>
5-
<GameState id="game-state" class="app-header-item"/>
5+
<GameStateBar class="app-header-item"/>
66
</div>
7+
78
<router-view></router-view>
9+
810
<ControlFlowBar id="match-controls"/>
911
</div>
1012
</template>
1113

1214
<script>
1315
import MatchSettingsBar from "./components/control/MatchSettingsBar";
14-
import GameState from './components/GameState.vue'
16+
import GameStateBar from './components/GameStateBar.vue'
1517
import ControlFlowBar from "./components/control/ControlFlowBar";
16-
import AutonomousControl from "./components/AutonomousControl";
1718
1819
export default {
1920
name: 'app',
2021
components: {
21-
AutonomousControl,
2222
MatchSettingsBar,
23-
GameState,
23+
GameStateBar,
2424
ControlFlowBar,
2525
},
2626
}
@@ -51,19 +51,4 @@
5151
.app-header-item {
5252
margin: 0.3em;
5353
}
54-
55-
#game-state {
56-
font-size: 1.2em;
57-
font-weight: bold;
58-
}
59-
60-
#match-controls {
61-
width: 100%;
62-
position: fixed;
63-
bottom: 0;
64-
text-align: center;
65-
}
66-
67-
.view {
68-
}
6954
</style>

src/components/AutonomousControl.vue

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
<template>
22
<div id="container">
3-
<ManualControl/>
4-
<TeamOverview/>
5-
<Events/>
6-
<GameEvents/>
3+
<ManualControlView/>
4+
<TeamOverviewView/>
5+
<ProtocolView/>
6+
<GameEventsView/>
77
</div>
88
</template>
99

1010
<script>
11-
import TeamOverview from "./team/TeamOverview";
12-
import ControlTeam from "./manual-control/ManualControlTeam";
13-
import Events from "./protocol/Events";
14-
import Settings from "./settings/Settings";
15-
import ManualControl from "./manual-control/ManualControl";
16-
import GameEvents from "./game-events/GameEvents";
11+
import ManualControlView from "./manual-control/ManualControlView";
12+
import TeamOverviewView from "./team/TeamOverviewView";
13+
import ProtocolView from "./protocol/ProtocolView";
14+
import GameEventsView from "./game-events/GameEventsView";
1715
1816
export default {
1917
name: "AutonomousControl",
2018
components: {
21-
GameEvents,
22-
ManualControl,
23-
Settings,
24-
Events,
25-
ControlTeam,
26-
TeamOverview,
19+
ManualControlView,
20+
TeamOverviewView,
21+
ProtocolView,
22+
GameEventsView,
2723
}
2824
}
2925
</script>

src/components/GameState.vue renamed to src/components/GameStateBar.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="game-state-bar">
33
<span v-if="state.currentActionTimeRemaining >= 0">
44
<span v-format-ns-duration="state.currentActionTimeRemaining"
55
v-b-tooltip.hover
@@ -56,7 +56,7 @@
5656

5757
<script>
5858
export default {
59-
name: 'GameState',
59+
name: 'GameStateBar',
6060
computed: {
6161
state() {
6262
return this.$store.state.refBoxState
@@ -66,4 +66,8 @@
6666
</script>
6767

6868
<style scoped>
69+
.game-state-bar {
70+
font-size: 1.2em;
71+
font-weight: bold;
72+
}
6973
</style>

src/components/control/ControlFlowBar.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div class="control-flaw-bar">
33
<span v-b-tooltip.hover
44
:title="'Immediately stop all robots (' + Object.keys(keymapHalt)[0] + ')'">
55
<b-button v-hotkey="keymapHalt"
@@ -76,4 +76,11 @@
7676
</script>
7777

7878
<style scoped>
79+
80+
.control-flaw-bar {
81+
width: 100%;
82+
position: fixed;
83+
bottom: 0;
84+
text-align: center;
85+
}
7986
</style>

src/components/game-events/GameEvents.vue renamed to src/components/game-events/GameEventsView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import EventProposals from "./EventProposals";
1515
1616
export default {
17-
name: "GameEvents",
17+
name: "GameEventsView",
1818
components: {
1919
EventProposals,
2020
CurrentEvents

src/components/manual-control/ManualControl.vue renamed to src/components/manual-control/ManualControlView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
import PlaceBall from "./PlaceBall";
7272
7373
export default {
74-
name: "ManualControl",
74+
name: "ManualControlView",
7575
components: {
7676
PlaceBall,
7777
ManualControlTeamMatchCommands,

src/components/protocol/Events.vue renamed to src/components/protocol/ProtocolView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</template>
2121

2222
<script>
23-
import EventTable from "./EventTable";
23+
import EventTable from "./ProtocolTable";
2424
2525
export default {
2626
name: "Events",

src/components/team/TeamOverview.vue renamed to src/components/team/TeamOverviewView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
import TeamYellowCardsActive from "./TeamYellowCardsActive";
120120
121121
export default {
122-
name: "TeamOverview",
122+
name: "TeamOverviewView",
123123
components: {
124124
TeamYellowCardsActive,
125125
TeamYellowCardTimes,

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import VueNativeSock from 'vue-native-websocket'
3939

4040
import './assets/css/style.css'
4141
import AutonomousControl from "./components/AutonomousControl";
42-
import ManualControl from "./components/manual-control/ManualControl";
42+
import ManualControlView from "./components/manual-control/ManualControlView";
4343
import Field from "./components/Field";
4444

4545
Vue.use(TimestampFormatter);
@@ -94,7 +94,7 @@ Vue.use(VueNativeSock, wsAddress, {
9494
const routes = [
9595
{path: '/autonomous', component: AutonomousControl},
9696
{path: '/field', component: Field},
97-
{path: '/manual', component: ManualControl},
97+
{path: '/manual', component: ManualControlView},
9898
{path: '/', component: AutonomousControl},
9999
];
100100
const router = new VueRouter({

0 commit comments

Comments
 (0)