mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 14:56:37 +00:00
Add icon to add-on picker (#12174)
This commit is contained in:
parent
bf35ee549d
commit
edc15940a2
@ -31,7 +31,7 @@ export const mockHassioSupervisor = (hass: MockHomeAssistant) => {
|
|||||||
version_latest: "3.6.2",
|
version_latest: "3.6.2",
|
||||||
update_available: false,
|
update_available: false,
|
||||||
repository: "a0d7b954",
|
repository: "a0d7b954",
|
||||||
icon: true,
|
icon: false,
|
||||||
logo: true,
|
logo: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
BIN
gallery/public/api/hassio/addons/core_zwave_js/icon
Normal file
BIN
gallery/public/api/hassio/addons/core_zwave_js/icon
Normal file
Binary file not shown.
@ -13,9 +13,12 @@ import { HaComboBox } from "./ha-combo-box";
|
|||||||
|
|
||||||
const rowRenderer: ComboBoxLitRenderer<HassioAddonInfo> = (
|
const rowRenderer: ComboBoxLitRenderer<HassioAddonInfo> = (
|
||||||
item
|
item
|
||||||
) => html`<mwc-list-item twoline>
|
) => html`<mwc-list-item twoline graphic="icon">
|
||||||
<span>${item.name}</span>
|
<span>${item.name}</span>
|
||||||
<span slot="secondary">${item.slug}</span>
|
<span slot="secondary">${item.slug}</span>
|
||||||
|
${item.icon
|
||||||
|
? html`<img slot="graphic" .src="/api/hassio/addons/${item.slug}/icon" />`
|
||||||
|
: ""}
|
||||||
</mwc-list-item>`;
|
</mwc-list-item>`;
|
||||||
|
|
||||||
@customElement("ha-addon-picker")
|
@customElement("ha-addon-picker")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user