|
|
|
@ -9,6 +9,15 @@ import { GaugeLinear } from 'components/widgets/gauge-linear';
|
|
|
|
|
import { GaugeCircular } from 'components/widgets/gauge-circular'; |
|
|
|
|
import { GaugeBattery } from 'components/widgets/gauge-battery'; |
|
|
|
|
|
|
|
|
|
import AltitudeIcon from 'assets/icons/altitude.png'; |
|
|
|
|
import AscendingElevationIcon from 'assets/icons/ascending-elevation.png'; |
|
|
|
|
import AverageIcon from 'assets/icons/average.png'; |
|
|
|
|
import DistanceIcon from 'assets/icons/distance.png'; |
|
|
|
|
import ElectricityIcon from 'assets/icons/electricity.png'; |
|
|
|
|
import DistanceElectricityIcon from 'assets/icons/distance-electricity.png'; |
|
|
|
|
import TemperatureIcon from 'assets/icons/temperature.png'; |
|
|
|
|
import TimeIcon from 'assets/icons/time.png'; |
|
|
|
|
|
|
|
|
|
require('./dashboard-page.css'); |
|
|
|
|
|
|
|
|
|
export class DashboardPage extends Page { |
|
|
|
@ -67,6 +76,7 @@ export class DashboardPage extends Page {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
view() { |
|
|
|
|
console.log(DistanceIcon); |
|
|
|
|
return this.status |
|
|
|
|
? <div class="dashboard-page"> |
|
|
|
|
<div class="widgets-row"> |
|
|
|
@ -80,20 +90,20 @@ export class DashboardPage extends Page {
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="widgets-row"> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.tripDistance} decimals={1} unit="km" /> |
|
|
|
|
<NumericValue icon={DistanceIcon} widgetWidth={0.5} value={this.tripDistance} decimals={1} unit="km" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="widgets-row"> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.tripAverageSpeed} decimals={1} unit="km/h" /> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.tripAscendingElevation} decimals={1} unit="m" /> |
|
|
|
|
<NumericValue icon={AverageIcon} widgetWidth={0.5} value={this.tripAverageSpeed} decimals={1} unit="km/h" /> |
|
|
|
|
<NumericValue icon={AscendingElevationIcon} widgetWidth={0.5} value={this.tripAscendingElevation} decimals={1} unit="m" /> |
|
|
|
|
</div> |
|
|
|
|
<div class="widgets-row"> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.tripAverageConsumption} decimals={1} unit="Wh/km" /> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.tripEnergy} decimals={1} unit="Wh" /> |
|
|
|
|
<NumericValue icon={ElectricityIcon} widgetWidth={0.5} value={this.tripAverageConsumption} decimals={1} unit="Wh/km" /> |
|
|
|
|
<NumericValue icon={DistanceElectricityIcon} widgetWidth={0.5} value={this.tripEnergy} decimals={1} unit="Wh" /> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="widgets-row"> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.temperature} decimals={1} unit="°C" /> |
|
|
|
|
<NumericValue widgetWidth={0.5} value={this.altitude} decimals={1} unit="m" /> |
|
|
|
|
<NumericValue icon={TemperatureIcon} widgetWidth={0.5} value={this.temperature} decimals={1} unit="°C" /> |
|
|
|
|
<NumericValue icon={AltitudeIcon} widgetWidth={0.5} value={this.altitude} decimals={1} unit="m" /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
: <p>Chargement...</p>; |
|
|
|
|