Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
rackrick committed May 27, 2024
1 parent 724bd66 commit 26f020e
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions src/components/panels/Miscellaneous/MoonrakerSensorValue.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<div class="moonraker-sensor-container">
<span class="text-left moonraker-sensor-value-name"><v-icon small class="mr-2">{{ symbol }}</v-icon>{{ name }}:</span>
<span class="text-left moonraker-sensor-value-name">
<v-icon small class="mr-2">{{ symbol }}</v-icon>
{{ name }}:
</span>
<span class="text-right moonraker-sensor-value">{{ value }}</span>
<span class="moonraker-sensor-unit">{{ unit }}</span>
</div>
Expand All @@ -10,13 +13,7 @@
import { convertName } from '@/plugins/helpers'
import { Component, Mixins, Prop } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import {
mdiGauge,
mdiLightningBoltOutline,
mdiFlash,
mdiThermometer,
mdiMeterElectricOutline
} from '@mdi/js'
import { mdiGauge, mdiLightningBoltOutline, mdiFlash, mdiThermometer, mdiMeterElectricOutline } from '@mdi/js'
@Component
export default class MoonrakerSensorValue extends Mixins(BaseMixin) {
Expand Down Expand Up @@ -70,19 +67,19 @@ export default class MoonrakerSensorValue extends Mixins(BaseMixin) {
}
get symbol() {
if (["wh", "kwh", "mwh", "j"].includes(this.unit?.toLowerCase())) {
if (['wh', 'kwh', 'mwh', 'j'].includes(this.unit?.toLowerCase())) {
return this.mdiLightningBoltOutline
}
if (["w", "v"].includes(this.unit?.toLowerCase())) {
if (['w', 'v'].includes(this.unit?.toLowerCase())) {
return this.mdiFlash
}
if (this.unit?.toLowerCase() === "a") {
if (this.unit?.toLowerCase() === 'a') {
return this.mdiMeterElectricOutline
}
if (["°c", "c", "°f", "f", "°"].includes(this.unit?.toLowerCase())) {
if (['°c', 'c', '°f', 'f', '°'].includes(this.unit?.toLowerCase())) {
return this.mdiThermometer
}
Expand All @@ -95,7 +92,6 @@ export default class MoonrakerSensorValue extends Mixins(BaseMixin) {
.moonraker-sensor-container {
display: flex;
width: 100%;
}
.moonraker-sensor-value-name {
Expand All @@ -104,13 +100,12 @@ export default class MoonrakerSensorValue extends Mixins(BaseMixin) {
}
.moonraker-sensor-value {
align-self: flex-end;
align-self: flex-end;
flex: 1 1 auto;
}
.moonraker-sensor-unit {
align-self: flex-end;
padding-left: 3px;
align-self: flex-end;
padding-left: 3px;
}
</style>

0 comments on commit 26f020e

Please sign in to comment.