readjust sizes of components in vehicle status component
This commit is contained in:
parent
1cf724e933
commit
4298176dab
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
|
@ -13,7 +13,7 @@
|
||||||
<div v-if="latency >= 40 || latency == 0" class="grayed_bar" style='height: 80%'></div>
|
<div v-if="latency >= 40 || latency == 0" class="grayed_bar" style='height: 80%'></div>
|
||||||
<div v-else class="bar" style='height: 80%'></div>
|
<div v-else class="bar" style='height: 80%'></div>
|
||||||
</div>
|
</div>
|
||||||
<span class="connection_number">{{ latency }} ms</span>
|
<!-- <span class="connection_number">{{ latency }} ms</span> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: rgb(255, 57, 57);
|
background-color: rgb(255, 57, 57);
|
||||||
font-size: 1em;
|
font-size: 0.96em;
|
||||||
|
transition: background-color 0.20s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emergency-button:hover {
|
.emergency-button:hover {
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- <div class="open-button-div">
|
|
||||||
<button class="open-button">OPEN</button>
|
<button class="open-button">OPEN</button>
|
||||||
</div> -->
|
|
||||||
<button class="test-open-button">OPEN</button>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -20,31 +17,19 @@
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.open-button-div {
|
|
||||||
position: relative;
|
|
||||||
height: 25%;
|
|
||||||
width: 35%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.open-button {
|
.open-button {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: flex;
|
||||||
width: 100%;
|
justify-content: center;
|
||||||
height: 100%;
|
|
||||||
background-color: #011949;
|
|
||||||
font-size: 1.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.test-open-button {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
width: 30%;
|
width: 30%;
|
||||||
height: 20%;
|
height: 20%;
|
||||||
background-color: #011949;
|
background-color: #011949;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
transition: background-color 0.20s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.test-open-button:hover {
|
.open-button:hover {
|
||||||
background-color: #03369b;
|
background-color: #194398;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,7 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="vehicle-title-container">
|
<div class="vehicle-title-container">
|
||||||
<div class="vehicle-name-div"> {{ vehicleName }} </div>
|
<div class="vehicle-name-div">
|
||||||
|
{{ vehicleName }}
|
||||||
|
<!-- <img src="../../assets/MEA.png" class="vehicle-icon"></img>-->
|
||||||
|
</div>
|
||||||
<div class="vehicle-status-div">Status: {{ vehicleStatus }}</div>
|
<div class="vehicle-status-div">Status: {{ vehicleStatus }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -28,22 +30,26 @@
|
||||||
padding-left: 6%;
|
padding-left: 6%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* .vehicle-name-div {
|
||||||
|
position: relative;
|
||||||
|
font-size: 2.3em;
|
||||||
|
} */
|
||||||
|
|
||||||
.vehicle-name-div {
|
.vehicle-name-div {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
font-size: 2.3em;
|
font-size: 2.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vehicle-status-div {
|
.vehicle-status-div {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 1.6em;
|
font-size: 1.4em;
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vehicle-icon {
|
.vehicle-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 12%;
|
width: 22%;
|
||||||
height: 12%;
|
|
||||||
/* vertical-align: middle; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
|
@ -31,10 +31,15 @@
|
||||||
<!-- Left side of container (Name, Status, Battery, Connection)-->
|
<!-- Left side of container (Name, Status, Battery, Connection)-->
|
||||||
<div class="left-container">
|
<div class="left-container">
|
||||||
<VehicleTitle :vehicleName="vehicleName" :vehicleStatus="vehicleStatus"/>
|
<VehicleTitle :vehicleName="vehicleName" :vehicleStatus="vehicleStatus"/>
|
||||||
|
<!-- <Battery :percentage = "batteryPct" :charging="false" class="adjust-battery"/> -->
|
||||||
|
<div class="battery-status-container">
|
||||||
<Battery :percentage = "batteryPct" :charging="false" class="adjust-battery"/>
|
<Battery :percentage = "batteryPct" :charging="false" class="adjust-battery"/>
|
||||||
|
<span style="margin-top: 4%; font-size: 1.4em;">{{ batteryPct }}%</span>
|
||||||
|
</div>
|
||||||
<Connection :latency="latency" class="adjust-connection"/>
|
<Connection :latency="latency" class="adjust-connection"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Right side of container (Open button, Coordinates, Emergency Stop)-->
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
<Open class="adjust-open-button"></Open>
|
<Open class="adjust-open-button"></Open>
|
||||||
<Coordinate :coordinates="coordinates" class="adjust-coordinates"></Coordinate>
|
<Coordinate :coordinates="coordinates" class="adjust-coordinates"></Coordinate>
|
||||||
|
@ -48,7 +53,7 @@
|
||||||
.status_container {
|
.status_container {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 200px;
|
height: 100%;
|
||||||
|
|
||||||
/* width: 25%; */
|
/* width: 25%; */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -58,12 +63,21 @@
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.battery-status-container {
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 20%;
|
||||||
|
gap: 6%;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.left-container {
|
.left-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 40%;
|
width: 37%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-container {
|
.right-container {
|
||||||
|
@ -71,14 +85,21 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 60%;
|
width: 63%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.adjust-battery {
|
/* below is CSS adjustment for battery by itself */
|
||||||
|
/* .adjust-battery {
|
||||||
height: 17%;
|
height: 17%;
|
||||||
width: 34.5%;
|
width: 36%;
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
margin-left: 8%;
|
margin-left: 8%;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.adjust-battery {
|
||||||
|
height: 84%;
|
||||||
|
width: 38%;
|
||||||
|
margin-left: 8%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.adjust-connection {
|
.adjust-connection {
|
||||||
|
|
|
@ -2,5 +2,6 @@ import { createApp } from "vue";
|
||||||
import "./styles.css";
|
import "./styles.css";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
|
import yuh from "./views/testMapScreen.vue"
|
||||||
|
|
||||||
createApp(App).use(router).mount("#app");
|
createApp(yuh).use(router).mount("#app");
|
||||||
|
|
|
@ -7,16 +7,22 @@ let testCoordinateObject = {
|
||||||
longitude: -177.9325790,
|
longitude: -177.9325790,
|
||||||
latitude: 33.9325790
|
latitude: 33.9325790
|
||||||
}
|
}
|
||||||
|
let testCoordinateObject2 = {
|
||||||
|
longitude: 40.748440,
|
||||||
|
latitude: -73.984559
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<NavBar></NavBar>
|
<NavBar></NavBar>
|
||||||
<div class="screen_div">
|
<div class="screen_div">
|
||||||
|
<!-- Map component will be placed below -->
|
||||||
<div class="map_div"></div>
|
<div class="map_div"></div>
|
||||||
|
|
||||||
<div class="status_rightside">
|
<div class="status_rightside">
|
||||||
<Status :batteryPct=100 :latency=54 :coordinates="testCoordinateObject" :vehicleName="'ERU'" :vehicleStatus="'In Use'"/>
|
<Status :batteryPct=100 :latency=50 :coordinates="testCoordinateObject2" :vehicleName="'ERU'" :vehicleStatus="'In Use'"/>
|
||||||
<Status :batteryPct=48 :latency=30 :coordinates="testCoordinateObject" :vehicleName="'MEA'" :vehicleStatus="'Standby'"/>
|
<Status :batteryPct=48 :latency=30 :coordinates="testCoordinateObject" :vehicleName="'MEA'" :vehicleStatus="'Standby'"/>
|
||||||
<Status :batteryPct=0 :latency=97 :coordinates="testCoordinateObject" :vehicleName="'MRA'" :vehicleStatus="'Offline'"/>
|
<Status :batteryPct=0 :latency=97 :coordinates="testCoordinateObject2" :vehicleName="'MRA'" :vehicleStatus="'Offline'"/>
|
||||||
<Status :batteryPct=10 :latency=0 :coordinates="testCoordinateObject" :vehicleName="'FRA'" :vehicleStatus="'Offline'"/>
|
<Status :batteryPct=10 :latency=0 :coordinates="testCoordinateObject" :vehicleName="'FRA'" :vehicleStatus="'Offline'"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +47,7 @@ let testCoordinateObject = {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 0.003em solid black;
|
border: 0.003em solid black;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 25%;
|
width: 23%;
|
||||||
margin-left: auto
|
margin-left: auto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue