mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Use brand icon instead of domain icon for helpers (#12157)
This commit is contained in:
parent
624cb48f78
commit
505c22248b
@ -6,7 +6,6 @@ import { customElement, property, query, state } from "lit/decorators";
|
|||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
||||||
import { dynamicElement } from "../../../common/dom/dynamic-element-directive";
|
import { dynamicElement } from "../../../common/dom/dynamic-element-directive";
|
||||||
import { domainIcon } from "../../../common/entity/domain_icon";
|
|
||||||
import "../../../components/ha-dialog";
|
import "../../../components/ha-dialog";
|
||||||
import "../../../components/ha-circular-progress";
|
import "../../../components/ha-circular-progress";
|
||||||
import { getConfigFlowHandlers } from "../../../data/config_flow";
|
import { getConfigFlowHandlers } from "../../../data/config_flow";
|
||||||
@ -32,6 +31,7 @@ import "./forms/ha-input_text-form";
|
|||||||
import "./forms/ha-timer-form";
|
import "./forms/ha-timer-form";
|
||||||
import { domainToName } from "../../../data/integration";
|
import { domainToName } from "../../../data/integration";
|
||||||
import type { ShowDialogHelperDetailParams } from "./show-dialog-helper-detail";
|
import type { ShowDialogHelperDetailParams } from "./show-dialog-helper-detail";
|
||||||
|
import { brandsUrl } from "../../../util/brands-url";
|
||||||
|
|
||||||
const HELPERS = {
|
const HELPERS = {
|
||||||
input_boolean: createInputBoolean,
|
input_boolean: createInputBoolean,
|
||||||
@ -146,10 +146,17 @@ export class DialogHelperDetail extends LitElement {
|
|||||||
dialogInitialFocus
|
dialogInitialFocus
|
||||||
graphic="icon"
|
graphic="icon"
|
||||||
>
|
>
|
||||||
<ha-svg-icon
|
<img
|
||||||
slot="graphic"
|
slot="graphic"
|
||||||
.path=${domainIcon(domain)}
|
loading="lazy"
|
||||||
></ha-svg-icon>
|
src=${brandsUrl({
|
||||||
|
domain,
|
||||||
|
type: "icon",
|
||||||
|
useFallback: true,
|
||||||
|
darkOptimized: this.hass.themes?.darkMode,
|
||||||
|
})}
|
||||||
|
referrerpolicy="no-referrer"
|
||||||
|
/>
|
||||||
<span class="item-text"> ${label} </span>
|
<span class="item-text"> ${label} </span>
|
||||||
</mwc-list-item>
|
</mwc-list-item>
|
||||||
${!isLoaded
|
${!isLoaded
|
||||||
|
Loading…
x
Reference in New Issue
Block a user