mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Don't show pointer for glance entity when there is no action (#17625)
This commit is contained in:
parent
eca3ec7f98
commit
92358b4859
@ -206,10 +206,12 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
margin-bottom: 12px;
|
||||
width: var(--glance-column-width, 20%);
|
||||
}
|
||||
.entity.action {
|
||||
cursor: pointer;
|
||||
}
|
||||
.entity:focus {
|
||||
outline: none;
|
||||
background: var(--divider-color);
|
||||
@ -282,9 +284,15 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
|
||||
const name = entityConf.name ?? computeStateName(stateObj);
|
||||
|
||||
const hasAnyAction =
|
||||
!entityConf.tap_action ||
|
||||
hasAction(entityConf.tap_action) ||
|
||||
hasAction(entityConf.hold_action) ||
|
||||
hasAction(entityConf.double_tap_action);
|
||||
|
||||
return html`
|
||||
<div
|
||||
class="entity"
|
||||
class=${classMap({ entity: true, action: hasAnyAction })}
|
||||
.config=${entityConf}
|
||||
@action=${this._handleAction}
|
||||
.actionHandler=${actionHandler({
|
||||
|
Loading…
x
Reference in New Issue
Block a user