fixed latency ranges for connection component
This commit is contained in:
parent
9ed4c32061
commit
3b8e866e74
|
@ -4,13 +4,13 @@
|
|||
<div v-if="latency == 0" class="grayed_bar" style='height: 20%'></div>
|
||||
<div v-else class="bar" style='height: 20%'></div>
|
||||
|
||||
<div v-if="latency <= 30" class="grayed_bar" style='height: 40%'></div>
|
||||
<div v-if="latency >= 70 || latency == 0" class="grayed_bar" style='height: 40%'></div>
|
||||
<div v-else class="bar" style='height: 40%'></div>
|
||||
|
||||
<div v-if="latency <= 50" class="grayed_bar" style='height: 60%'></div>
|
||||
<div v-if="latency >= 60 || latency == 0" class="grayed_bar" style='height: 60%'></div>
|
||||
<div v-else class="bar" style='height: 60%'></div>
|
||||
|
||||
<div v-if="latency <= 70" 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>
|
||||
<span class="connection_number">{{ latency }} ms</span>
|
||||
|
|
|
@ -8,13 +8,13 @@ import Connection from './components/VehicleStatus/Connection.vue';
|
|||
<template>
|
||||
<h2>Below is the Connection component</h2>
|
||||
<div class="border_div">
|
||||
<Connection :latency=100 /> <!-- pass in latency into latency prop !-->
|
||||
<Connection :latency=56 /> <!-- pass in latency into latency prop !-->
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Below is the Battery component</h2>
|
||||
<div class="border_div">
|
||||
<Battery :percentage=6 :charging="false"/> <!-- pass in the current percentage into percentage prop. charging is a boolean !-->
|
||||
<Battery :percentage=12 :charging="false"/> <!-- pass in the current percentage into percentage prop. charging is a boolean !-->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue