-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 [feat/scania-next-gen] #78 update icons for next gen scania skin
Signed-off-by: JAGFx <[email protected]>
- Loading branch information
Showing
16 changed files
with
5,429 additions
and
4,139 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
resources/icons/svgs/scania-next-gen-menu-warning_white_yellow_red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/components/dashboards/scania-next-gen/display/ScaniaNextGenBar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div class="scania-bar flex-area flex-column w-75"> | ||
<div class="d-flex justify-content-between align-items-center w-100"> | ||
<slot /> | ||
<div class="flex-area w-100 raw"> | ||
<span class="value">{{ value.toFixed(1) }}</span> | ||
<span class="unit">{{ unit }}</span> | ||
</div> | ||
</div> | ||
<div class="flex-area w-100 squares"> | ||
<div | ||
v-for="i in squaresCount" | ||
class="square" | ||
:class="{ active: squareIsActive(i) }" | ||
></div> | ||
</div> | ||
<div class="line w-100"></div> | ||
<div class="d-flex justify-content-between align-items-center w-100 labels"> | ||
<span>{{ min.toFixed(0) }}</span> | ||
<span v-if="displayMidLabel">{{ | ||
Math.ceil((min + max) / 2).toFixed(0) | ||
}}</span> | ||
<span>{{ max.toFixed(0) }}</span> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'ScaniaNextGenBar', | ||
props: { | ||
displayMidLabel: { | ||
type: Boolean, | ||
required: false, | ||
default: true | ||
}, | ||
squaresCount: { | ||
type: Number, | ||
required: false, | ||
default: 10 | ||
}, | ||
min: { | ||
type: Number, | ||
required: true | ||
}, | ||
max: { | ||
type: Number, | ||
required: true | ||
}, | ||
value: { | ||
type: Number, | ||
required: true | ||
}, | ||
unit: { | ||
type: String, | ||
required: false, | ||
default: '--' | ||
} | ||
}, | ||
methods: { | ||
squareIsActive(number) { | ||
const valueBySquare = (this.max - this.min) / this.squaresCount; | ||
return this.value >= valueBySquare * number + this.min; | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 12 additions & 14 deletions
26
...components/dashboards/scania-next-gen/display/menu/ScaniaNextGenInstantaneousDataMenu.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,49 @@ | ||
<template> | ||
<div class="menu h-100"> | ||
<ScaniaBar | ||
<ScaniaNextGenBar | ||
v-bind="{ | ||
min: 20, | ||
max: 36, | ||
value: telemetry2.truck.batteryVoltage, | ||
unit: 'V', | ||
displayMidLabel: false, | ||
displayValue: false | ||
displayMidLabel: false | ||
}" | ||
> | ||
<i class="icon icon-scania-battery_red" /> | ||
</ScaniaBar> | ||
<ScaniaBar | ||
</ScaniaNextGenBar> | ||
<ScaniaNextGenBar | ||
class="py-1" | ||
v-bind="{ | ||
min: 0, | ||
max: 175, | ||
value: telemetry2.truck.brakeAirPressure, | ||
unit: $unitReadable('unit_pressure'), | ||
displayValue: false | ||
unit: $unitReadable('unit_pressure') | ||
}" | ||
> | ||
<i class="icon icon-scania-parking-break_red" /> | ||
</ScaniaBar> | ||
<ScaniaBar | ||
</ScaniaNextGenBar> | ||
<ScaniaNextGenBar | ||
v-bind="{ | ||
min: 0, | ||
max: 100, | ||
value: | ||
(telemetry2.truck.adBlueLevel * 100) / | ||
telemetry2.truck.adBlueCapacity, | ||
unit: '%', | ||
displayValue: false | ||
unit: '%' | ||
}" | ||
> | ||
<i class="icon icon-scania-ad-blue-low_yellow" /> | ||
</ScaniaBar> | ||
</ScaniaNextGenBar> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import ScaniaBar from '@/components/dashboards/scania/ScaniaBar'; | ||
import ScaniaNextGenBar from '@/components/dashboards/scania-next-gen/display/ScaniaNextGenBar'; | ||
import TelemetryMixin from '@/mixins/TelemetryMixin'; | ||
export default { | ||
name: 'ScaniaNextGenInstantaneousDataMenu', | ||
components: { ScaniaBar }, | ||
components: { ScaniaNextGenBar }, | ||
mixins: [TelemetryMixin] | ||
}; | ||
</script> |