Skip to content

Commit

Permalink
🐛 [feat/rework-scania] #78 finalizing somme adjustment on skins
Browse files Browse the repository at this point in the history
  • Loading branch information
JAGFx committed Mar 13, 2022
1 parent 8d1ca8c commit cdc115e
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 113 deletions.
4 changes: 2 additions & 2 deletions lib/config/config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"general_refresh_rate" : 100,
"general_skin_on_load" : "Scania",
"general_skin_on_load" : "Map",
"general_h-shift-layout" : "h-shifter",
"general_skin_locale" : "fr-FR",
"general_skin_locale" : "en-EN",
"general_job_remaining" : "due_date",
"general_port": 3000,
"general_damage_accurate": "damage-diagnostic"
Expand Down
44 changes: 15 additions & 29 deletions src/assets/scss/dashboard/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -332,35 +332,21 @@
// color: coral;
//}

._truckWearInfo {
font-family: Arial, Helvetica, sans-serif;
font-size: 26px;
position: absolute;
left: 1600px;
top: 1066px;
width: 330px;
height: 30px;
text-align: left;
color: #aaa;
line-height: 90%;
}

._trailerWearInfo {
font-family: Arial, Helvetica, sans-serif;
font-size: 26px;
.wears {
position: absolute;
left: 1600px;
top: 1066px;
width: 330px;
height: 30px;
text-align: left;
color: #aaa;
line-height: 90%;
left: 1810px;
}

.truck-wearSum, .trailer-wear {
font-size: 44px;
color: orangered;
right: 0;
bottom: 0;
width: 43rem;

.info {
font-family: Arial, Helvetica, sans-serif;
font-size: 26px;
color: #aaa;
}

.wear {
font-size: 2.3rem;
color: orangered;
}
}
}
2 changes: 1 addition & 1 deletion src/assets/scss/dashboard/scania/_display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
> i { line-height: 0; }
}

.value{ font-size: 2rem; line-height: 2rem; font-weight: bold;}
.value{ font-size: 2.7rem; line-height: 2rem;}
.value { color: $cGreen; }
.unit{ font-size: 1.5rem; line-height: 1.5rem;}
}
Expand Down
19 changes: 10 additions & 9 deletions src/assets/scss/dashboard/shared/_map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
justify-content: center;
align-items: center;
outline: 0;
font-size: 1.1rem;
font-size: 1.9rem;

border: 2px solid $cRed;
border-width: 0 0 2px 0;
Expand Down Expand Up @@ -95,8 +95,8 @@
border-left-color: transparent !important;
}

&.fuel { min-width: 5rem !important; }
&.cruise-control { min-width: 8rem !important; }
&.fuel { min-width: 10rem !important; }
&.cruise-control { min-width: 13rem !important; }

&.menuControl {
border-width: 0 2px 2px 0;
Expand All @@ -122,7 +122,8 @@
justify-content: center;
align-items: center;
outline: 0;
font-size: 1.1rem;
font-size: 1.9rem;
font-size: 1.9rem;

border-right: 2px solid $cRed;

Expand Down Expand Up @@ -150,7 +151,7 @@
height: auto;
width: auto;
z-index: 2;
margin-bottom: 2.2rem;
margin-bottom: 3rem;

#ol-zoom-wrapper {
width: 100%;
Expand All @@ -168,7 +169,7 @@
justify-content: center;
align-items: center;
outline: 0;
font-size: 1.1rem;
font-size: 1.9rem;

border-right: 2px solid $cRed;

Expand All @@ -187,7 +188,7 @@
left: 0;
width: auto;
bottom: 0;
margin-bottom: 2.2rem;
margin-bottom: 3rem;

.button{
border-left: 2px solid $cRed;
Expand Down Expand Up @@ -266,7 +267,7 @@
height: auto;
padding: .3rem;
z-index: 1;
width: 9.5rem;
width: 11rem;
border-right: 0;
}

Expand All @@ -291,7 +292,7 @@
height: inherit;
font-weight: bold;
font-size: 1.5rem;
width: 3.3rem;
width: 3.5rem;

&.hshifter {
&:first-letter{
Expand Down
2 changes: 2 additions & 0 deletions src/assets/scss/menu/_menu-tab-about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
z-index: 0;
width: 100vw;
height: 100vh;
max-width: inherit;
min-width: inherit;

@include prefixer(object-fit, cover, ("webkit", "moz", "o"));
}
Expand Down
20 changes: 9 additions & 11 deletions src/components/dashboards/DefaultDashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,16 @@
</td>
</tr>
</table>
<div class="d-flex">
<div class="_truckWearInfo">
{{ $t('Truck wear') }}:<br />
<span class="truck-wearSum"
>{{ telemetry.truck.averageDamage }}%</span
>
<div class="d-flex wears flex-column">
<div class="info w-100 d-flex justify-content-around">
<span>{{ $t('Truck wear') }}:</span>
<span class="wear">{{ telemetry2.truck.averageDamage }}%</span>
</div>
<div class="_trailerWearInfo">
{{ $t('Trailer damage') }}:<br />
<span class="trailer-wear"
>{{ telemetry2.trailer.chassisDamage.toFixed(0) }}%</span
>
<div class="info w-100 d-flex justify-content-around">
<span>{{ $t('Trailer damage') }}:</span>
<span class="wear">
{{ telemetry2.trailer.chassisDamage.toFixed(0) }}%
</span>
</div>
</div>
</div>
Expand Down
18 changes: 12 additions & 6 deletions src/components/dashboards/jagfx/Zone/JagfxJob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<div class="round from">
<i class="icon-startpoint" />
</div>
<span v-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-if="!telemetry2.truck.ignitionIsTurnedOn" />
<span v-else-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-else>
<span>{{ telemetry2.job.departureCityName }}</span>
<small
Expand All @@ -24,7 +25,8 @@
<div class="round to">
<i class="icon-endpoint" />
</div>
<span v-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-if="!telemetry2.truck.ignitionIsTurnedOn" />
<span v-else-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-else>
<span>{{ telemetry2.job.arrivalCityName }}</span>
<small
Expand All @@ -38,8 +40,9 @@
<div class="round">
<i class="icon-time" />
</div>
<span v-if="!telemetry2.truck.ignitionIsTurnedOn" />
<span
v-if="
v-else-if="
telemetry2.job.hasAnActiveJob &&
telemetry2.job.deliveryTimeIsSetToDuDate
"
Expand All @@ -64,7 +67,8 @@
<div class="round">
<i class="icon-currency" />
</div>
<span v-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-if="!telemetry2.truck.ignitionIsTurnedOn" />
<span v-else-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-else>
{{ telemetry2.job.income }} {{ $unitReadable('unit_currency') }}
</span>
Expand All @@ -77,7 +81,8 @@
<i class="icon-ruler" />
</div>

<span v-if="!telemetry2.navigation.hasAnActiveNavigation">
<span v-if="!telemetry2.truck.ignitionIsTurnedOn" />
<span v-else-if="!telemetry2.navigation.hasAnActiveNavigation">
{{ $t('N/A') }}
</span>
<span v-else> {{ telemetry2.navigation.distanceToTargetString }}</span>
Expand All @@ -86,7 +91,8 @@
<div class="round">
<i class="icon-weight" />
</div>
<span v-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-if="!telemetry2.truck.ignitionIsTurnedOn" />
<span v-else-if="!telemetry2.job.hasAnActiveJob">{{ $t('N/A') }}</span>
<span v-else>{{ telemetry2.job.cargoWeightString }} </span>
</li>
</ul>
Expand Down
34 changes: 22 additions & 12 deletions src/components/dashboards/jagfx/Zone/JagfxTruck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,23 @@
disabled: !telemetry2.symbols.cruiseControlIsEnabled
}"
>
<span v-show="!telemetry2.symbols.cruiseControlIsEnabled">{{
$t('OFF')
}}</span>
<span v-show="telemetry2.symbols.cruiseControlIsEnabled">
<span
v-if="
!telemetry2.symbols.cruiseControlIsEnabled &&
telemetry2.truck.ignitionIsTurnedOn
"
>{{ $t('OFF') }}</span
>
<span
v-else-if="
telemetry2.symbols.cruiseControlIsEnabled &&
telemetry2.truck.ignitionIsTurnedOn
"
>
{{ telemetry2.truck.cruiseControlSpeed }}
{{ $unitReadable('unit_speed') }}
</span>
<span v-else />
<div class="round">
<i class="icon-cruise_control" />
</div>
Expand All @@ -65,7 +75,7 @@
{{ telemetry2.truck.fuelLevel.toFixed(0) }}
{{ $unitReadable('unit_volume') }}
</span>
<span v-else> -- {{ $unitReadable('unit_volume') }} </span>
<span v-else />
<div class="round">
<i class="icon-fuel" />
</div>
Expand All @@ -81,7 +91,7 @@
{{ telemetry2.truck.fuelAverageConsumption.toFixed(1) }}
{{ $unitReadable('unit_consumption') }}
</span>
<span v-else> -- {{ $unitReadable('unit_consumption') }} </span>
<span v-else />
<div class="round">
<i class="icon-fuel_consumption" />
</div>
Expand All @@ -96,7 +106,7 @@
<span v-if="telemetry2.truck.ignitionIsTurnedOn">
in {{ $nextRestStopFormater(telemetry2.navigation.nextRestStopTime) }}
</span>
<span v-else> -- </span>
<span v-else />
<div class="round">
<i class="icon-rest_stop" />
</div>
Expand All @@ -116,7 +126,7 @@
{{ telemetry2.truck.brakeAirPressure.toFixed(0) }}
{{ $unitReadable('unit_pressure') }}
</span>
<span v-else> -- {{ $unitReadable('unit_pressure') }} </span>
<span v-else />
<div class="round">
<i class="icon-air_pressure" />
</div>
Expand All @@ -132,7 +142,7 @@
{{ telemetry2.truck.engineOilTemperature.toFixed(1) }}
{{ $unitReadable('unit_degrees') }}
</span>
<span v-else> -- {{ $unitReadable('unit_degrees') }} </span>
<span v-else />
<div class="round">
<i class="icon-oil" />
</div>
Expand All @@ -148,7 +158,7 @@
{{ telemetry2.truck.brakeTemperature.toFixed(1) }}
{{ $unitReadable('unit_degrees') }}
</span>
<span v-else> -- {{ $unitReadable('unit_degrees') }} </span>
<span v-else />
<div class="round">
<i class="icon-brakes_temperature" />
</div>
Expand All @@ -167,7 +177,7 @@
{{ telemetry2.truck.engineWaterTemperature.toFixed(1) }}
{{ $unitReadable('unit_degrees') }}
</span>
<span v-else> -- {{ $unitReadable('unit_degrees') }} </span>
<span v-else />
<div class="round">
<i class="icon-water_temperature" />
</div>
Expand All @@ -185,7 +195,7 @@
<span v-if="telemetry2.truck.ignitionIsTurnedOn"
>{{ Math.round(telemetry2.truck.batteryVoltage) }} V</span
>
<span v-else> -- V</span>
<span v-else />
<div class="round">
<i class="icon-battery" />
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/components/dashboards/scania/display/ScaniaDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
class="programmable-field-1 w-100 d-flex justify-content-around align-items-center"
>
<div class="item d-flex justify-content-center align-items-center">
<div class="icon py-3 d-flex justify-content-center align-items-center">
<div
class="icon py-3 d-flex justify-content-center align-items-center mr-2"
>
<i class="icon-scania-cruise_control_white" />
</div>
<div
Expand All @@ -47,7 +49,9 @@
</div>
</div>
<div class="item d-flex justify-content-center align-items-center">
<div class="icon py-3 d-flex justify-content-center align-items-center">
<div
class="icon py-3 d-flex justify-content-center align-items-center mr-2"
>
<i class="icon-scania-downhill-spee-control_yellow_white" />
</div>
<div
Expand Down
Loading

0 comments on commit cdc115e

Please sign in to comment.