mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
hide config links in demo (#8267)
This commit is contained in:
parent
a653bf5b0d
commit
c1caad6d43
@ -78,6 +78,9 @@ export class MoreInfoDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected shouldShowEditIcon(domain, stateObj): boolean {
|
protected shouldShowEditIcon(domain, stateObj): boolean {
|
||||||
|
if (__DEMO__) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (EDITABLE_DOMAINS_WITH_ID.includes(domain) && stateObj.attributes.id) {
|
if (EDITABLE_DOMAINS_WITH_ID.includes(domain) && stateObj.attributes.id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -189,30 +189,6 @@ class HUIRoot extends LitElement {
|
|||||||
)}
|
)}
|
||||||
</mwc-list-item>
|
</mwc-list-item>
|
||||||
`}
|
`}
|
||||||
<mwc-list-item
|
|
||||||
graphic="icon"
|
|
||||||
@request-selected="${this._handleManageDashboards}"
|
|
||||||
>
|
|
||||||
<ha-svg-icon
|
|
||||||
slot="graphic"
|
|
||||||
.path=${mdiViewDashboard}
|
|
||||||
></ha-svg-icon>
|
|
||||||
${this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.menu.manage_dashboards"
|
|
||||||
)}
|
|
||||||
</mwc-list-item>
|
|
||||||
<mwc-list-item
|
|
||||||
graphic="icon"
|
|
||||||
@request-selected="${this._handleManageResources}"
|
|
||||||
>
|
|
||||||
<ha-svg-icon
|
|
||||||
slot="graphic"
|
|
||||||
.path=${mdiFileMultiple}
|
|
||||||
></ha-svg-icon>
|
|
||||||
${this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.menu.manage_resources"
|
|
||||||
)}
|
|
||||||
</mwc-list-item>
|
|
||||||
<mwc-list-item
|
<mwc-list-item
|
||||||
graphic="icon"
|
graphic="icon"
|
||||||
@request-selected="${this._handleRawEditor}"
|
@request-selected="${this._handleRawEditor}"
|
||||||
@ -225,6 +201,35 @@ class HUIRoot extends LitElement {
|
|||||||
"ui.panel.lovelace.editor.menu.raw_editor"
|
"ui.panel.lovelace.editor.menu.raw_editor"
|
||||||
)}
|
)}
|
||||||
</mwc-list-item>
|
</mwc-list-item>
|
||||||
|
${__DEMO__ /* No config available in the demo */
|
||||||
|
? ""
|
||||||
|
: html`<mwc-list-item
|
||||||
|
graphic="icon"
|
||||||
|
@request-selected="${this._handleManageDashboards}"
|
||||||
|
>
|
||||||
|
<ha-svg-icon
|
||||||
|
slot="graphic"
|
||||||
|
.path=${mdiViewDashboard}
|
||||||
|
></ha-svg-icon>
|
||||||
|
${this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.menu.manage_dashboards"
|
||||||
|
)}
|
||||||
|
</mwc-list-item>
|
||||||
|
${this.hass.userData?.showAdvanced
|
||||||
|
? html`<mwc-list-item
|
||||||
|
graphic="icon"
|
||||||
|
@request-selected="${this
|
||||||
|
._handleManageResources}"
|
||||||
|
>
|
||||||
|
<ha-svg-icon
|
||||||
|
slot="graphic"
|
||||||
|
.path=${mdiFileMultiple}
|
||||||
|
></ha-svg-icon>
|
||||||
|
${this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.menu.manage_resources"
|
||||||
|
)}
|
||||||
|
</mwc-list-item>`
|
||||||
|
: ""} `}
|
||||||
</ha-button-menu>
|
</ha-button-menu>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user