mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Only use button for breadcrumb for admin users (#24836)
This commit is contained in:
parent
a781bca94b
commit
52f4fe6bc0
@ -357,15 +357,21 @@ export class MoreInfoDialog extends LitElement {
|
|||||||
`}
|
`}
|
||||||
<span slot="title" @click=${this._enlarge} class="title">
|
<span slot="title" @click=${this._enlarge} class="title">
|
||||||
${breadcrumb.length > 0
|
${breadcrumb.length > 0
|
||||||
? html`
|
? !__DEMO__ && isAdmin
|
||||||
<button
|
? html`
|
||||||
class="breadcrumb"
|
<button
|
||||||
@click=${this._breadcrumbClick}
|
class="breadcrumb"
|
||||||
aria-label=${breadcrumb.join(" > ")}
|
@click=${this._breadcrumbClick}
|
||||||
>
|
aria-label=${breadcrumb.join(" > ")}
|
||||||
${join(breadcrumb, html`<ha-icon-next></ha-icon-next>`)}
|
>
|
||||||
</button>
|
${join(breadcrumb, html`<ha-icon-next></ha-icon-next>`)}
|
||||||
`
|
</button>
|
||||||
|
`
|
||||||
|
: html`
|
||||||
|
<p class="breadcrumb">
|
||||||
|
${join(breadcrumb, html`<ha-icon-next></ha-icon-next>`)}
|
||||||
|
</p>
|
||||||
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
<p class="main">${title}</p>
|
<p class="main">${title}</p>
|
||||||
</span>
|
</span>
|
||||||
@ -687,15 +693,18 @@ export class MoreInfoDialog extends LitElement {
|
|||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
|
||||||
outline: none;
|
outline: none;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
transition: background-color 180ms ease-in-out;
|
transition: background-color 180ms ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title .breadcrumb:focus-visible,
|
.title button.breadcrumb {
|
||||||
.title .breadcrumb:hover {
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title button.breadcrumb:focus-visible,
|
||||||
|
.title button.breadcrumb:hover {
|
||||||
background-color: rgba(var(--rgb-secondary-text-color), 0.08);
|
background-color: rgba(var(--rgb-secondary-text-color), 0.08);
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user