Skip to content

Commit

Permalink
webapp: apply card-table class to info view cards
Browse files Browse the repository at this point in the history
the cards in all information views still used a div.card-body around the
table, which added a margin on all sides of the table. to achieve a
unified look, these cards and tables now look the same as the inverter
channel cards.
  • Loading branch information
schlimmchen authored and tbnobody committed Nov 1, 2024
1 parent ad73fd8 commit 68d2f7b
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 16 deletions.
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
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
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
2 changes: 1 addition & 1 deletion webapp/src/components/PinInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<CardElement :text="$t('pininfo.PinOverview')" textVariant="text-bg-primary">
<CardElement :text="$t('pininfo.PinOverview')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<thead>
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
6 changes: 3 additions & 3 deletions webapp/src/views/MqttInfoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:show-reload="true"
@reload="getMqttInfo"
>
<CardElement :text="$t('mqttinfo.ConfigurationSummary')" textVariant="text-bg-primary">
<CardElement :text="$t('mqttinfo.ConfigurationSummary')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down Expand Up @@ -102,7 +102,7 @@
</div>
</CardElement>

<CardElement :text="$t('mqttinfo.HassSummary')" textVariant="text-bg-primary" add-space>
<CardElement :text="$t('mqttinfo.HassSummary')" textVariant="text-bg-primary" add-space table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down Expand Up @@ -155,7 +155,7 @@
</div>
</CardElement>

<CardElement :text="$t('mqttinfo.RuntimeSummary')" textVariant="text-bg-primary" add-space>
<CardElement :text="$t('mqttinfo.RuntimeSummary')" textVariant="text-bg-primary" add-space table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/views/NtpInfoView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<BasePage :title="$t('ntpinfo.NtpInformation')" :isLoading="dataLoading" :show-reload="true" @reload="getNtpInfo">
<CardElement :text="$t('ntpinfo.ConfigurationSummary')" textVariant="text-bg-primary">
<CardElement :text="$t('ntpinfo.ConfigurationSummary')" textVariant="text-bg-primary" table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand All @@ -21,7 +21,7 @@
</div>
</CardElement>

<CardElement :text="$t('ntpinfo.CurrentTime')" textVariant="text-bg-primary" add-space>
<CardElement :text="$t('ntpinfo.CurrentTime')" textVariant="text-bg-primary" add-space table>
<div class="table-responsive">
<table class="table table-hover table-condensed">
<tbody>
Expand Down

0 comments on commit 68d2f7b

Please sign in to comment.