Skip to content

Commit

Permalink
Update location-card.vue
Browse files Browse the repository at this point in the history
Swapped the location of the temperature/humidity with the other badges to eliminate "popping" on the Location cards.

This way If you have some rooms with equipment active, and some without, the temp and humidity readings will all be aligned (as opposed to offset).

Signed-off-by: ThunderboxEntertainment <36485835+ThunderboxEntertainment@users.noreply.github.com>
  • Loading branch information
ThunderboxEntertainment authored Dec 5, 2023
1 parent 18e93f5 commit 0561247
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
<generic-widget-component :context="childContext(slotComponent)" v-for="(slotComponent, idx) in context.component.slots.glance" :key="'glance-' + idx" @command="onCommand" />
</div>
<div class="location-stats margin-top" :class="config.invertText ? 'invert-text' : ''" v-if="!config.disableBadges">
<span v-for="badgeType in ['alarms', 'battery', 'lights', 'windows', 'doors', 'garagedoors', 'blinds', 'presence', 'lock', 'climate', 'screens', 'projectors', 'speakers']" :key="badgeType">
<status-badge v-if="!config.badges || !config.badges.length || config.badges.indexOf(badgeType) >= 0"
:store="context.store" :element="element" :type="badgeType" :invert-color="config.invertText" :badgeOverrides="badgeOverrides" />
</span>
</div>
<div class="location-stats margin-top-half" v-if="!config.disableBadges">
<span v-for="badgeType in ['temperature', 'humidity', 'co2', 'luminance']" :key="badgeType">
<measurement-badge v-if="!config.badges || !config.badges.length || config.badges.indexOf(badgeType) >= 0"
:store="context.store" :element="element" :type="badgeType" :invert-color="config.invertText" :badgeOverrides="badgeOverrides" />
</span>
</div>
<div class="location-stats margin-top-half" v-if="!config.disableBadges">
<span v-for="badgeType in ['alarms', 'battery', 'lights', 'windows', 'doors', 'garagedoors', 'blinds', 'presence', 'lock', 'climate', 'screens', 'projectors', 'speakers']" :key="badgeType">
<status-badge v-if="!config.badges || !config.badges.length || config.badges.indexOf(badgeType) >= 0"
:store="context.store" :element="element" :type="badgeType" :invert-color="config.invertText" :badgeOverrides="badgeOverrides" />
</span>

Check failure on line 20 in bundles/org.openhab.ui/web/src/components/cards/location-card.vue

View workflow job for this annotation

GitHub Actions / webpack-stats

Trailing spaces not allowed

Check failure on line 20 in bundles/org.openhab.ui/web/src/components/cards/location-card.vue

View workflow job for this annotation

GitHub Actions / checks

Trailing spaces not allowed
</div>
</template>
<div class="card-content-padding">
<f7-segmented round tag="p" v-if="element.equipment.length > 0 && element.properties.length > 0">
Expand Down

0 comments on commit 0561247

Please sign in to comment.