webapp: beautify radio statistics reset button

it would be nice to have this in the header of the accordion, which is
hard, but doable. however, clicking the button then also toggles the
accordion, which is unacceptable. preventing that seems non-trivial, as
the @click.stop() is not enough. also, nesting interactive elements is
simply bad practice. the button can also go to the right of header, with
reasonable effort, but the corner radii are then messed up and would
need to react interactively (accordion collapsed or not), which is also
a pain.

we now "float" the reset button to the right, add a nice icon, and give
the button some space so it at least looks like it belongs there.
This commit is contained in:
Bernhard Kirchen 2024-10-26 22:49:32 +02:00 committed by Bernhard Kirchen
parent a582f9c6d3
commit 0a5bd65bd2

View File

@ -314,21 +314,22 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="d-flex">
<button <button
:disabled="!isLogged || performRadioStatsReset" :disabled="!isLogged || performRadioStatsReset"
type="button" type="button"
class="btn btn-danger" class="btn btn-danger ms-auto me-3 mt-3"
@click="onResetRadioStats(inverter.serial)" @click="onResetRadioStats(inverter.serial)"
> >
<template v-if="!performRadioStatsReset"> <template v-if="!performRadioStatsReset">
{{ $t('home.StatsReset') }} <BIconArrowCounterclockwise />&nbsp;{{ $t('home.StatsReset') }}
</template> </template>
<template v-else> <template v-else>
<span <span
class="spinner-border spinner-border-sm" class="spinner-border spinner-border-sm"
aria-hidden="true" aria-hidden="true"
></span> ></span>
<span role="status"> {{ $t('home.StatsResetting') }}</span> <span role="status">&nbsp;{{ $t('home.StatsResetting') }}</span>
</template> </template>
</button> </button>
</div> </div>
@ -340,6 +341,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<VedirectView v-if="liveData.vedirect.enabled" /> <VedirectView v-if="liveData.vedirect.enabled" />
<BatteryView v-if="liveData.battery.enabled" /> <BatteryView v-if="liveData.battery.enabled" />
<HuaweiView v-if="liveData.huawei.enabled" /> <HuaweiView v-if="liveData.huawei.enabled" />