Skip to content

Commit

Permalink
Hide some things in demo (#21268)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Jul 3, 2024
1 parent 522f664 commit 97c4cf9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/dialogs/more-info/controls/more-info-media_player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class MoreInfoMediaPlayer extends LitElement {
`
)}
</div>
${!isUnavailableState(stateObj.state) &&
${!__DEMO__ &&
!isUnavailableState(stateObj.state) &&
supportsFeature(stateObj, MediaPlayerEntityFeature.BROWSE_MEDIA)
? html`
<mwc-button
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/more-info/ha-more-info-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class MoreInfoDialog extends LitElement {
></ha-icon-button>
`
: nothing}
${isAdmin
${!__DEMO__ && isAdmin
? html`
<ha-icon-button
slot="actionItems"
Expand Down
12 changes: 7 additions & 5 deletions src/dialogs/more-info/ha-more-info-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ export class MoreInfoHistory extends LitElement {
<div class="title">
${this.hass.localize("ui.dialogs.more_info_control.history")}
</div>
<a href=${this._showMoreHref} @click=${this._close}
>${this.hass.localize(
"ui.dialogs.more_info_control.show_more"
)}</a
>
${__DEMO__
? nothing
: html`<a href=${this._showMoreHref} @click=${this._close}
>${this.hass.localize(
"ui.dialogs.more_info_control.show_more"
)}</a
>`}
</div>
${this._error
? html`<div class="errors">${this._error}</div>`
Expand Down

0 comments on commit 97c4cf9

Please sign in to comment.