Skip to content

Commit

Permalink
webapp: Reduce wasted horizontal space for better mobile UX
Browse files Browse the repository at this point in the history
  • Loading branch information
nkappler authored and tbnobody committed Jan 18, 2024
1 parent 41f3955 commit a7479d3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 40 deletions.
46 changes: 19 additions & 27 deletions webapp/src/components/InverterChannelInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="card" :class="{
'border-info': channelType == 'AC',
'border-secondary': channelType == 'INV'
}">
}" style="overflow: hidden">
<div v-if="channelType == 'INV'" class="card-header text-bg-secondary">
{{ $t('inverterchannelinfo.General') }}
</div>
Expand All @@ -16,32 +16,24 @@
{{ $t('inverterchannelinfo.Phase', { num: channelNumber + 1 }) }}
</div>

<div class="card-body">
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">{{ $t('inverterchannelinfo.Property') }}</th>
<th style="text-align: right" scope="col">{{ $t('inverterchannelinfo.Value') }}</th>
<th scope="col">{{ $t('inverterchannelinfo.Unit') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(property, key) in channelData" :key="`prop-${key}`">
<template v-if="key != 'name' && property">
<th scope="row">{{ $t('inverterchannelproperty.' + key) }}</th>
<td style="text-align: right">
{{ $n(property.v, 'decimal', {
minimumFractionDigits: property.d,
maximumFractionDigits: property.d})
}}
</td>
<td>{{ property.u }}</td>
</template>
</tr>
</tbody>
</table>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover" style="margin: 0">
<tbody>
<tr v-for="(property, key) in channelData" :key="`prop-${key}`">
<template v-if="key != 'name' && property">
<th scope="row">{{ $t('inverterchannelproperty.' + key) }}</th>
<td style="text-align: right; padding-right: 0;">
{{ $n(property.v, 'decimal', {
minimumFractionDigits: property.d,
maximumFractionDigits: property.d
})
}}
</td>
<td>{{ property.u }}</td>
</template>
</tr>
</tbody>
</table>
</div>
</div>
</template>
Expand Down
5 changes: 1 addition & 4 deletions webapp/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,7 @@
"inverterchannelinfo": {
"String": "String {num}",
"Phase": "Phase {num}",
"General": "Allgemein",
"Property": "Eigenschaft",
"Value": "Wert",
"Unit": "Einheit"
"General": "Allgemein"
},
"invertertotalinfo": {
"TotalYieldTotal": "Gesamtertrag Insgesamt",
Expand Down
5 changes: 1 addition & 4 deletions webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,7 @@
"inverterchannelinfo": {
"String": "String {num}",
"Phase": "Phase {num}",
"General": "General",
"Property": "Property",
"Value": "Value",
"Unit": "Unit"
"General": "General"
},
"invertertotalinfo": {
"TotalYieldTotal": "Total Yield Total",
Expand Down
7 changes: 2 additions & 5 deletions webapp/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,7 @@
"inverterchannelinfo": {
"String": "Ligne {num}",
"Phase": "Phase {num}",
"General": "General",
"Property": "Propriété",
"Value": "Valeur",
"Unit": "Unité"
"General": "General"
},
"invertertotalinfo": {
"TotalYieldTotal": "Rendement total",
Expand Down Expand Up @@ -617,4 +614,4 @@
"ValueSelected": "Sélectionné",
"ValueActive": "Activé"
}
}
}

0 comments on commit a7479d3

Please sign in to comment.