mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-30 04:36:36 +00:00
Add icons to integration page (#5388)
This commit is contained in:
parent
ddeb16463d
commit
2e17c96866
@ -200,6 +200,15 @@ export class HaConfigManagerDashboard extends LitElement {
|
|||||||
href="/config/integrations/config_entry/${item.entry_id}"
|
href="/config/integrations/config_entry/${item.entry_id}"
|
||||||
>
|
>
|
||||||
<paper-item data-index=${idx}>
|
<paper-item data-index=${idx}>
|
||||||
|
<img
|
||||||
|
src="https://brands.home-assistant.io/${item.domain}/icon.png"
|
||||||
|
srcset="
|
||||||
|
https://brands.home-assistant.io/${item.domain}/icon@2x.png 2x
|
||||||
|
"
|
||||||
|
referrerpolicy="no-referrer"
|
||||||
|
@error=${this._onImageError}
|
||||||
|
@load=${this._onImageLoad}
|
||||||
|
/>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
<div>
|
<div>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
@ -342,6 +351,14 @@ export class HaConfigManagerDashboard extends LitElement {
|
|||||||
return states;
|
return states;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _onImageLoad(ev) {
|
||||||
|
ev.target.style.visibility = "initial";
|
||||||
|
}
|
||||||
|
|
||||||
|
private _onImageError(ev) {
|
||||||
|
ev.target.style.visibility = "hidden";
|
||||||
|
}
|
||||||
|
|
||||||
static get styles(): CSSResult {
|
static get styles(): CSSResult {
|
||||||
return css`
|
return css`
|
||||||
mwc-button {
|
mwc-button {
|
||||||
@ -355,6 +372,9 @@ export class HaConfigManagerDashboard extends LitElement {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
}
|
}
|
||||||
|
.configured {
|
||||||
|
padding-bottom: 24px;
|
||||||
|
}
|
||||||
.configured a {
|
.configured a {
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -375,6 +395,10 @@ export class HaConfigManagerDashboard extends LitElement {
|
|||||||
.overflow {
|
.overflow {
|
||||||
width: 56px;
|
width: 56px;
|
||||||
}
|
}
|
||||||
|
img {
|
||||||
|
width: 50px;
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user