Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webapp Polishing #2388

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
44613b7
webapp: right-align labels for inputs on non-sm viewports
schlimmchen Oct 25, 2024
8c3884c
webapp: last table row shall have no bottom border
schlimmchen Oct 25, 2024
41ad2c5
webapp: remove table's bottom margin
schlimmchen Oct 25, 2024
0bca350
webapp: add gap between inverter selectors
schlimmchen Oct 26, 2024
14dbb45
webapp: avoid inline style in inverter channel info card
schlimmchen Oct 26, 2024
001e0a4
webapp: equalize style of cards with tables in live view
schlimmchen Oct 26, 2024
6721352
webapp: use reasonable name for radio stats accordion
schlimmchen Oct 25, 2024
d502443
webapp: align table headers with card headers
schlimmchen Oct 26, 2024
43f760a
webapp: apply card-table class to info view cards
schlimmchen Oct 26, 2024
f2aa42e
webapp: adjust look of tables in accordions to live view cards
schlimmchen Oct 26, 2024
0b64cc6
webapp: beautify radio statistics reset button
schlimmchen Oct 26, 2024
f86626a
webapp: fix inverter "add" and "save order" button positions
schlimmchen Oct 26, 2024
fe35992
webapp: optimize spacing on bottom of cards
schlimmchen Oct 26, 2024
935af85
webapp: MQTT: use v-if in favor of v-show
schlimmchen Oct 26, 2024
f6e13a3
webapp: MQTT: no login with cert if TLS disabled
schlimmchen Oct 26, 2024
1fed0a8
webapp: avoid inline style for inverter channel info value
schlimmchen Oct 26, 2024
b68df07
webapp: consistently use no colon in form labels
schlimmchen Oct 27, 2024
9206098
webapp: optimize placement of device profile doc buttons
schlimmchen Oct 27, 2024
24330b7
webapp: show pin mapping categories as cards
schlimmchen Oct 27, 2024
70ae001
webapp: device manager: optimize cards for tab nav
schlimmchen Oct 27, 2024
13c1893
webapp: properly space alert with hint for hostname
schlimmchen Oct 27, 2024
a397989
webapp: optimize look of firmware update cards
schlimmchen Oct 27, 2024
5081257
webapp: inverter advanced tab needs space at the top
schlimmchen Oct 27, 2024
625409f
webapp: optimize look of login page
schlimmchen Oct 27, 2024
ae9e997
webapp: always scroll up when navigating to another view
schlimmchen Oct 28, 2024
696200a
webapp: optimize body bottom padding and length
schlimmchen Oct 28, 2024
b21e077
webapp: fix inverter selection button breaking
schlimmchen Nov 3, 2024
3c0fabf
webapp: declare emitted event in FormFooter component
schlimmchen Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webapp/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineComponent({
<style>
/* Show it is fixed to the top */
body {
min-height: 75rem;
padding-bottom: 1rem;
padding-top: 4.5rem;
}
</style>
3 changes: 2 additions & 1 deletion webapp/src/components/CardElement.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="['card', addSpace ? 'mt-5' : '']">
<div :class="['card', table ? 'card-table' : '', addSpace ? 'mt-5' : '']">
<div :class="['card-header', textVariant]">{{ text }}</div>
<div :class="['card-body', 'card-text', centerContent ? 'text-center' : '']">
<slot />
Expand All @@ -14,6 +14,7 @@ export default defineComponent({
props: {
text: String,
textVariant: String,
table: Boolean,
addSpace: Boolean,
centerContent: Boolean,
},
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/FirmwareInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('firmwareinfo.FirmwareInformation')" textVariant="text-bg-primary">
<CardElement :text="$t('firmwareinfo.FirmwareInformation')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/components/FormFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
<button type="submit" class="btn btn-primary">{{ $t('base.Save') }}</button>
</div>
</template>

<script lang="ts">
export default {
emits: ['reload'],
};
</script>
6 changes: 5 additions & 1 deletion webapp/src/components/GridProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
</table>

<div class="accordion" id="accordionProfile">
<div class="accordion-item" v-for="(section, index) in gridProfileList.sections" :key="index">
<div
class="accordion-item accordion-table"
v-for="(section, index) in gridProfileList.sections"
:key="index"
>
<h2 class="accordion-header">
<button
class="accordion-button collapsed"
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/HardwareInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('hardwareinfo.HardwareInformation')" textVariant="text-bg-primary">
<CardElement :text="$t('hardwareinfo.HardwareInformation')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/HeapDetails.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('heapdetails.HeapDetails')" textVariant="text-bg-primary">
<CardElement :text="$t('heapdetails.HeapDetails')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/InterfaceApInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('interfaceapinfo.NetworkInterface')" textVariant="text-bg-primary">
<CardElement :text="$t('interfaceapinfo.NetworkInterface')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/InterfaceNetworkInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<CardElement
:text="$t('interfacenetworkinfo.NetworkInterface', { iface: networkStatus.network_mode })"
textVariant="text-bg-primary"
table
>
<div class="table-responsive">
<table class="table table-hover table-condensed">
Expand Down
7 changes: 3 additions & 4 deletions webapp/src/components/InverterChannelInfo.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<template>
<div
class="card"
class="card card-table"
: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') }}
Expand All @@ -21,12 +20,12 @@
</div>

<div class="table-responsive">
<table class="table table-striped table-hover" style="margin: 0">
<table class="table table-striped table-hover">
<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">
<td class="value">
{{
$n(property.v, 'decimal', {
minimumFractionDigits: property.d,
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/MemoryInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('memoryinfo.MemoryInformation')" textVariant="text-bg-primary">
<CardElement :text="$t('memoryinfo.MemoryInformation')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<thead>
Expand Down
66 changes: 31 additions & 35 deletions webapp/src/components/PinInfo.vue
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
<template>
<CardElement :text="$t('pininfo.PinOverview')" textVariant="text-bg-primary">
<div class="table-responsive">
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>{{ $t('pininfo.Category') }}</th>
<th>{{ $t('pininfo.Name') }}</th>
<th>{{ $t('pininfo.ValueSelected') }}</th>
<th>{{ $t('pininfo.ValueActive') }}</th>
</tr>
</thead>
<tbody>
<template v-for="category in categories" :key="category">
<tr v-for="(prop, prop_idx) in properties(category)" :key="prop">
<td v-if="prop_idx == 0" :rowspan="properties(category).length">
{{ capitalizeFirstLetter(category) }}
</td>
<td :class="{ 'table-danger': !isEqual(category, prop) }">
{{ prop }}
</td>
<td>
<template v-if="selectedPinAssignment && category in selectedPinAssignment">
{{ (selectedPinAssignment as any)[category][prop] }}</template
>
</td>
<td>
<template v-if="currentPinAssignment && category in currentPinAssignment">
{{ (currentPinAssignment as any)[category][prop] }}</template
>
</td>
</tr>
</template>
</tbody>
</table>
<div class="row flex-row flex-wrap g-3">
<div class="col" v-for="category in categories" :key="category">
<CardElement :text="capitalizeFirstLetter(category)" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
<tr>
<th>{{ $t('pininfo.Name') }}</th>
<th class="text-center">{{ $t('pininfo.ValueSelected') }}</th>
<th class="text-center">{{ $t('pininfo.ValueActive') }}</th>
</tr>
<tr v-for="(prop, prop_idx) in properties(category)" :key="prop_idx">
<td :class="{ 'table-danger': !isEqual(category, prop) }">
{{ prop }}
</td>
<td class="text-center">
<template v-if="selectedPinAssignment && category in selectedPinAssignment">
{{ (selectedPinAssignment as any)[category][prop] }}</template
>
</td>
<td class="text-center">
<template v-if="currentPinAssignment && category in currentPinAssignment">
{{ (currentPinAssignment as any)[category][prop] }}</template
>
</td>
</tr>
</tbody>
</table>
</div>
</CardElement>
</div>
</CardElement>
</div>
</template>

<script lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/RadioInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('radioinfo.RadioInformation')" textVariant="text-bg-primary">
<CardElement :text="$t('radioinfo.RadioInformation')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/TaskDetails.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('taskdetails.TaskDetails')" textVariant="text-bg-primary">
<CardElement :text="$t('taskdetails.TaskDetails')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/WifiApInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('wifiapinfo.WifiApInfo')" textVariant="text-bg-primary">
<CardElement :text="$t('wifiapinfo.WifiApInfo')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/WifiStationInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('wifistationinfo.WifiStationInfo')" textVariant="text-bg-primary">
<CardElement :text="$t('wifistationinfo.WifiStationInfo')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
Loading
Loading