Vehicle status: improve wrap behavior (#17667)

This commit is contained in:
Michael Geers 2024-12-10 14:42:43 +01:00 • committed by GitHub
parent d79f823f5b
commit 3aa2915cb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View file

@ -14,7 +14,7 @@ const planProjectedEnd = getFutureTime(5, 43);
</script>
<template>
<Story title="VehicleStatus" :layout="{ type: 'grid', iframe: false, width: 420 }">
<Story title="VehicleStatus" :layout="{ type: 'grid', iframe: false, width: 320 }">
<Variant title="status: disconnected">
<VehicleStatus />
</Variant>
@ -124,7 +124,6 @@ const planProjectedEnd = getFutureTime(5, 43);
<VehicleStatus
connected
enabled
charging
:smartCostLimit="500"
smartCostType="co2"
:smartCostNextStart="planProjectedStart"
@ -219,7 +218,7 @@ const planProjectedEnd = getFutureTime(5, 43);
<Variant title="combination: maximal">
<VehicleStatus
connected
charging
enabled
:sessionSolarPercentage="94"
:minSoc="20"
:vehicleSoc="10"

View file

@ -1,11 +1,13 @@
<template>
<div
class="d-flex justify-content-between gap-4 evcc-gray"
class="d-flex justify-content-between gap-3 evcc-gray align-items-start flex-wrap"
style="min-height: 24px"
data-testid="vehicle-status"
>
<div class="text-nowrap" data-testid="vehicle-status-charger">{{ chargerStatus }}</div>
<div class="d-flex flex-wrap justify-content-end gap-3">
<div class="charger-status" data-testid="vehicle-status-charger">
{{ chargerStatus }}
</div>
<div class="d-flex flex-wrap justify-content-end gap-3 flex-grow-1">
<!-- pv/phase timer -->
<div
v-if="pvTimerVisible"
@ -716,6 +718,9 @@ export default {
</script>
<style scoped>
.charger-status {
padding-top: 2px;
}
.entry {
display: flex;
align-items: center;