Skip to content

Commit

Permalink
🐛 [feat/scania-next-gen] #78 add mask for menu and some adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
JAGFx committed May 10, 2022
1 parent 9b9da87 commit 00fa622
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 18 deletions.
5 changes: 5 additions & 0 deletions doc/TRANSLATION_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Next release

### Added

- Standard mode
- In standard performance mode the vehicle is adapted for driving to suit most situations.

## From v1.7.1

### Added
Expand Down
8 changes: 8 additions & 0 deletions public/img/dashboard/scania-next-gen/menu-area.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 11 additions & 9 deletions src/assets/scss/dashboard/scania-next-gen/_display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
.display {
position: absolute;
width: 30rem;
height: 17.35rem;
left: 30.25rem;
top: 15.45rem;
height: 18.05rem;
left: 30.35rem;
top: 14.75rem;
padding-top: 1rem;

// Fixme: Some blur apear for an unknown reason
//mask-image: url("/img/dashboard/scania-next-gen/menu-area.png");
//mask-size: contain;
//mask-repeat: no-repeat;
mask-image: url("/img/dashboard/scania-next-gen/menu-area.svg");
mask-repeat: no-repeat;

display: flex;
align-items: center;
Expand All @@ -21,9 +21,12 @@
&.starting {
background: url("/img/dashboard/scania-next-gen/6482891_619566292.png") no-repeat center;
background-size: 10rem;
background-position-y: 1rem;

}
&.on {
background: url("/img/dashboard/scania-next-gen/menu-on.png");
background-position-y: 1rem;
}

.menu-selector {
Expand Down Expand Up @@ -198,7 +201,6 @@
position: absolute;
width: 3.3rem;
height: 3.5rem;
top: 6.3rem;
right: 3.8rem;
display: flex;
justify-content: center;
Expand All @@ -208,14 +210,14 @@
line-height: 1.5rem;

&.shifter {
top: 6.3rem;
top: 7.3rem;
right: 4.2rem;
font-size: 1.4rem;
line-height: 1.5rem;
}

&.driveMode{
top: 6.3rem;
top: 7.3rem;
left: 4.2rem;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<template>
<div class="display on">
<div v-if="telemetry2.truck.ignitionIsTurnedOn" class="display on">
<div class="squareArea driveMode">
<div><i class="icon icon-scania-next-gen-standard-mode_white" /></div>
<div><i class="icon icon-scania-cruise_control_white" /></div>
<div v-if="telemetry2.symbols.cruiseControlIsEnabled">
<i class="icon icon-scania-cruise_control_white" />
</div>
</div>
<div class="menu-selector w-100">
<div class="button tiny left white">
Expand Down Expand Up @@ -42,9 +44,12 @@
<div class="field">
<i class="icon icon-scania-cruise_control_white" />
<div class="data">
<span class="value">{{
telemetry2.truck.cruiseControlSpeed.toFixed(0)
}}</span>
<span
v-if="telemetry2.symbols.cruiseControlIsEnabled"
class="value"
>{{ telemetry2.truck.cruiseControlSpeed.toFixed(0) }}</span
>
<span v-else class="value">-</span>
<span class="unit">{{ $unitReadable('unit_speed') }}</span>
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion src/components/menu/MenuTabSkins.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,14 @@

<script>
import SkinManualScania from '@/components/menu/skin-manuals/SkinManualScania';
import SkinManualScaniaNextGen from '@/components/menu/skin-manuals/SkinManualScaniaNextGen';
import SkinsMixin from '@/mixins/SkinsMixin';
export default {
name: 'MenuTabSkins',
components: {
SkinManualScania
SkinManualScania,
SkinManualScaniaNextGen
},
mixins: [SkinsMixin],
data() {
Expand All @@ -103,6 +105,10 @@ export default {
this.manual = 'SkinManualScania';
break;
case 'ScaniaNextGen':
this.manual = 'SkinManualScaniaNextGen';
break;
default:
this.manual = null;
break;
Expand Down
189 changes: 189 additions & 0 deletions src/components/menu/skin-manuals/SkinManualScaniaNextGen.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
<template>
<div class="overlay manual">
<b-overlay :show="true" variant="dark" no-wrap>
<template #overlay>
<transition mode="out-in" name="slide-fade">
<div class="manual-wrapper">
<table class="table table-striped table-dark symbols">
<thead>
<th>{{ $t('Symbol') }}</th>
<th>{{ $t('Label') }}</th>
</thead>
<tbody>
<!-- <editor-folder> General warning symbols -->
<tr>
<td colspan="2" class="category">
{{ $t('General warning symbols') }}
</td>
</tr>
<SkinManualLine
color="green"
:icons="['icon-scania-direction-indicator-left_green']"
:label="'Left direction indicator'"
/>
<SkinManualLine
color="green"
:icons="['icon-scania-direction-indicator-right_green']"
:label="'Right direction indicator'"
/>
<SkinManualLine
color="blue"
:icons="['icon-scania-main-beam_blue']"
:label="'Main beam is on'"
/>
<!-- </editor-folder> General warning symbols -->

<!-- <editor-folder> Menu symbols -->
<tr>
<td colspan="2" class="category">{{ $t('Menu symbols') }}</td>
</tr>
<!-- <SkinManualLine-->
<!-- color="yellow"-->
<!-- :icons="['icon-scania-fuel_yellow']"-->
<!-- :label="'The fuel level is low'"-->
<!-- />-->
<SkinManualLine
:icons="['icon-scania-cruise_control_white']"
:label="'Cruise control'"
/>
<SkinManualLine
:icons="['icon-scania-downhill-spee-control_yellow_white']"
:label="'Downhill speed control'"
:implemented="false"
/>
<!-- <SkinManualLine-->
<!-- :icons="[-->
<!-- 'icon-scania-driver-card-tachograph_white',-->
<!-- 'icon-scania-accrued-rest-time-tachograph_white'-->
<!-- ]"-->
<!-- :label="'Accrued rest time'"-->
<!-- />-->
<SkinManualLine
:icons="['icon-scania-ad-blue-low_yellow']"
:label="'Ad Blue'"
/>
<SkinManualLine
:icons="['icon-scania-battery_red']"
:label="'Battery'"
/>
<SkinManualLine
:icons="['icon-scania-next-gen-trip-information']"
:label="'Cruise control, trip computer and driving time information'"
:description="'Here, you can set and read off the trip computer; see current operating information and read driving time information from the digital tachograph.'"
/>
<SkinManualLine
:icons="['icon-scania-next-gen-instantaneous-data']"
:label="'Instantaneous data'"
:description="'Here you can view information about current consumption and current levels.'"
/>
<SkinManualLine
:icons="['icon-scania-menu-settings']"
:label="'Settings'"
:implemented="false"
/>
<SkinManualLine
:icons="['icon-scania-next-gen-vehicle-information']"
:label="'Vehicle information'"
:implemented="false"
:description="'The vehicle information menu can be used to view cargo weights, status of the differential locks and tyre pressures. Which functions are shown depends on the vehicle’s equipment.'"
/>
<SkinManualLine
:icons="[' icon-scania-next-gen-standard-mode_white']"
:label="'Standard mode'"
description="In standard performance mode the vehicle is adapted for driving to suit most situations."
:implemented="false"
/>
<!-- </editor-folder> Menu symbols -->

<!-- <editor-folder> Others symbols -->
<tr>
<td colspan="2" class="category">
{{ $t('Others symbols') }}
</td>
</tr>
<SkinManualLine
color="red"
:icons="['icon-scania-warning_red']"
:label="'A fault occurred'"
/>
<SkinManualLine
color="red"
:icons="['icon-scania-parking-break_red']"
:label="'The parking brake is applied'"
/>
<SkinManualLine
color="red"
:icons="['icon-scania-break-pressure_red_yellow']"
:label="'Vehicle EBS fault'"
:description="'Low brake pressure in parking and trailer brake circuit.'"
/>
<!-- <SkinManualLine-->
<!-- color="red"-->
<!-- :icons="['icon-scania-driver-safty-belt_red']"-->
<!-- :label="'The driver’s safety belt is not fastened'"-->
<!-- :implemented="false"-->
<!-- />-->
<SkinManualLine
color="yellow"
:icons="['icon-scania-warning_yellow']"
:label="'A warning occurred'"
/>
<SkinManualLine
color="yellow"
:icons="['icon-scania-engine-failure_yellow']"
:label="'Engine failure'"
:description="'Risk that the level of contaminants in the exhaust gases emitted by the vehicle will be too high. In some cases the engine output is limited and in some cases the vehicle speed is also limited.'"
/>
<SkinManualLine
color="yellow"
:icons="['icon-scania-differential-lock_yellow']"
:label="'Differential lock is engaged'"
/>
<SkinManualLine
color="yellow"
:icons="['icon-scania-tractor-tag-axle-raised_yellow']"
:label="'The tag axle on the tractor is raised'"
/>
<SkinManualLine
color="yellow"
:icons="['icon-scania-trailer-tag-axle-raised_yellow']"
:label="'The tag axle on the trailer is raised'"
/>
<SkinManualLine
color="green"
:icons="['icon-scania-retarder_green']"
:label="'The retarder is activated'"
/>
<!-- </editor-folder> Others symbols -->

<!-- <editor-folder> Bodybuilder symbols -->
<tr>
<td colspan="2" class="category">
{{ $t('Bodybuilder symbols') }}
</td>
</tr>
<SkinManualLine
color="blue"
:icons="['icon-scania-rotating-beacon_blue']"
:label="'The rotating beacon is activated'"
/>
<!-- </editor-folder> Bodybuilder symbols -->
</tbody>
</table>
</div>
</transition>
</template>
</b-overlay>
</div>
</template>

<script>
import SkinManualLine from '@/components/menu/skin-manuals/SkinManualLine';
export default {
name: 'SkinManualScaniaNextGen',
components: {
SkinManualLine
}
};
</script>
4 changes: 2 additions & 2 deletions src/data/skins.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@
},
{
"id" : "ScaniaNextGen",
"disabled" : true,
"manual" : false,
"disabled" : false,
"manual" : true,
"title" : "Scania Next Gen, Klauzzy",
"description" : "Scania Next Gen Dashboard",
"author" : {
Expand Down
4 changes: 3 additions & 1 deletion src/translations/fr-FR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,6 @@ App: Application
Default menu: Menu par défaut
Set the default menu for the Scania dashboard skin. It is displayed when you use this dashboard.: Définissez le menu par défaut de l'habillage du tableau de bord Scania. Il s'affiche lorsque vous utilisez ce tableau de bord
Nothing: Rien
Navigation: Navigation
Navigation: Navigation
Standard mode: Mode normal
In standard performance mode the vehicle is adapted for driving to suit most situations.: En mode de performance standard, le véhicule est adapté à la conduite pour convenir à la plupart des situations.

0 comments on commit 00fa622

Please sign in to comment.