mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-27 14:57:20 +00:00
Further brands-url cleanup (#7640)
This commit is contained in:
parent
7f56add914
commit
21a3dcf06c
@ -103,7 +103,7 @@ class StepFlowPickHandler extends LitElement {
|
||||
<img
|
||||
slot="item-icon"
|
||||
loading="lazy"
|
||||
src="${brandsUrl(handler.slug, "icon", true)}"
|
||||
src=${brandsUrl(handler.slug, "icon", true)}
|
||||
referrerpolicy="no-referrer"
|
||||
/>
|
||||
|
||||
|
@ -24,7 +24,7 @@ class IntegrationBadge extends LitElement {
|
||||
return html`
|
||||
<div class="icon">
|
||||
<img
|
||||
src="${brandsUrl(this.domain, "icon")}"
|
||||
src=${brandsUrl(this.domain, "icon")}
|
||||
referrerpolicy="no-referrer"
|
||||
/>
|
||||
${this.badgeIcon
|
||||
|
@ -225,7 +225,7 @@ export class HaConfigDevicePage extends LitElement {
|
||||
: ""
|
||||
}
|
||||
<img
|
||||
src="${brandsUrl(integrations[0], "logo")}"
|
||||
src=${brandsUrl(integrations[0], "logo")}
|
||||
referrerpolicy="no-referrer"
|
||||
@load=${this._onImageLoad}
|
||||
@error=${this._onImageError}
|
||||
|
@ -51,7 +51,7 @@ class IntegrationsCard extends LitElement {
|
||||
<td>
|
||||
<img
|
||||
loading="lazy"
|
||||
src="${brandsUrl(domain, "icon", true)}"
|
||||
src=${brandsUrl(domain, "icon", true)}
|
||||
referrerpolicy="no-referrer"
|
||||
/>
|
||||
</td>
|
||||
|
@ -331,7 +331,7 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
||||
<div class="card-content">
|
||||
<div class="image">
|
||||
<img
|
||||
src="${brandsUrl(item.domain, "logo")}"
|
||||
src=${brandsUrl(item.domain, "logo")}
|
||||
referrerpolicy="no-referrer"
|
||||
@error=${this._onImageError}
|
||||
@load=${this._onImageLoad}
|
||||
@ -379,7 +379,7 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
|
||||
<div class="card-content">
|
||||
<div class="image">
|
||||
<img
|
||||
src="${brandsUrl(flow.handler, "logo")}"
|
||||
src=${brandsUrl(flow.handler, "logo")}
|
||||
referrerpolicy="no-referrer"
|
||||
@error=${this._onImageError}
|
||||
@load=${this._onImageLoad}
|
||||
|
@ -108,7 +108,7 @@ export class HaIntegrationCard extends LitElement {
|
||||
<ha-card outlined class="group">
|
||||
<div class="group-header">
|
||||
<img
|
||||
src="${brandsUrl(this.domain, "icon")}"
|
||||
src=${brandsUrl(this.domain, "icon")}
|
||||
referrerpolicy="no-referrer"
|
||||
@error=${this._onImageError}
|
||||
@load=${this._onImageLoad}
|
||||
@ -158,7 +158,7 @@ export class HaIntegrationCard extends LitElement {
|
||||
<div class="card-content">
|
||||
<div class="image">
|
||||
<img
|
||||
src="${brandsUrl(item.domain, "logo")}"
|
||||
src=${brandsUrl(item.domain, "logo")}
|
||||
referrerpolicy="no-referrer"
|
||||
@error=${this._onImageError}
|
||||
@load=${this._onImageLoad}
|
||||
|
@ -2,7 +2,7 @@ export const brandsUrl = (
|
||||
domain: string,
|
||||
type: "icon" | "logo",
|
||||
useFallback?: boolean
|
||||
) => {
|
||||
): string => {
|
||||
return `https://brands.home-assistant.io/${
|
||||
useFallback ? "_/" : ""
|
||||
}${domain}/${type}.png`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user