mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Add icons when adding integration (#5500)
* Add icons when adding integration * Remove margin from search input and put in parent
This commit is contained in:
parent
f9d78a95ad
commit
cb255ef137
@ -34,7 +34,6 @@ class SearchInput extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="search-container">
|
|
||||||
<paper-input
|
<paper-input
|
||||||
class=${classMap({ "no-underline": this.noUnderline })}
|
class=${classMap({ "no-underline": this.noUnderline })}
|
||||||
autofocus
|
autofocus
|
||||||
@ -56,7 +55,6 @@ class SearchInput extends LitElement {
|
|||||||
></paper-icon-button>
|
></paper-icon-button>
|
||||||
`}
|
`}
|
||||||
</paper-input>
|
</paper-input>
|
||||||
</div>
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,16 +72,7 @@ class SearchInput extends LitElement {
|
|||||||
|
|
||||||
static get styles(): CSSResult {
|
static get styles(): CSSResult {
|
||||||
return css`
|
return css`
|
||||||
paper-input {
|
ha-icon {
|
||||||
flex: 1 1 auto;
|
|
||||||
margin: 0 16px;
|
|
||||||
}
|
|
||||||
.search-container {
|
|
||||||
display: inline-flex;
|
|
||||||
width: 100%;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.prefix {
|
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -727,6 +727,7 @@ export class HaDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
.table-header {
|
.table-header {
|
||||||
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
||||||
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
search-input {
|
search-input {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -32,6 +32,9 @@ class StepFlowLoading extends LitElement {
|
|||||||
padding: 50px 100px;
|
padding: 50px 100px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
paper-spinner-lite {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "@polymer/paper-spinner/paper-spinner-lite";
|
import "@polymer/paper-spinner/paper-spinner-lite";
|
||||||
import "@polymer/paper-item/paper-item";
|
import "@polymer/paper-item/paper-icon-item";
|
||||||
import "@polymer/paper-item/paper-item-body";
|
import "@polymer/paper-item/paper-item-body";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
@ -77,12 +77,25 @@ class StepFlowPickHandler extends LitElement {
|
|||||||
${handlers.map(
|
${handlers.map(
|
||||||
(handler: HandlerObj) =>
|
(handler: HandlerObj) =>
|
||||||
html`
|
html`
|
||||||
<paper-item @click=${this._handlerPicked} .handler=${handler}>
|
<paper-icon-item
|
||||||
|
@click=${this._handlerPicked}
|
||||||
|
.handler=${handler}
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
slot="item-icon"
|
||||||
|
loading="lazy"
|
||||||
|
src="https://brands.home-assistant.io/_/${handler.slug}/icon.png"
|
||||||
|
srcset="
|
||||||
|
https://brands.home-assistant.io/_/${handler.slug}/icon@2x.png 2x
|
||||||
|
"
|
||||||
|
referrerpolicy="no-referrer"
|
||||||
|
/>
|
||||||
|
|
||||||
<paper-item-body>
|
<paper-item-body>
|
||||||
${handler.name}
|
${handler.name}
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
<ha-icon-next></ha-icon-next>
|
<ha-icon-next></ha-icon-next>
|
||||||
</paper-item>
|
</paper-icon-item>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@ -144,6 +157,17 @@ class StepFlowPickHandler extends LitElement {
|
|||||||
return [
|
return [
|
||||||
configFlowContentStyles,
|
configFlowContentStyles,
|
||||||
css`
|
css`
|
||||||
|
img {
|
||||||
|
max-width: 40px;
|
||||||
|
max-height: 40px;
|
||||||
|
}
|
||||||
|
search-input {
|
||||||
|
display: block;
|
||||||
|
margin: -12px 16px 0;
|
||||||
|
}
|
||||||
|
ha-icon-next {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
div {
|
div {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
@ -156,8 +180,9 @@ class StepFlowPickHandler extends LitElement {
|
|||||||
max-height: calc(100vh - 300px);
|
max-height: calc(100vh - 300px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paper-item {
|
paper-icon-item {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -160,9 +160,11 @@ export class HaTabsSubpageDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
.table-header {
|
.table-header {
|
||||||
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
||||||
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
.search-toolbar {
|
.search-toolbar {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
search-input {
|
search-input {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -624,6 +624,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
||||||
}
|
}
|
||||||
search-input {
|
search-input {
|
||||||
|
margin-left: 16px;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
|
@ -14,7 +14,6 @@ import {
|
|||||||
css,
|
css,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import memoize from "memoize-one";
|
import memoize from "memoize-one";
|
||||||
import "../../../../common/search/search-input";
|
|
||||||
import {
|
import {
|
||||||
DataTableColumnContainer,
|
DataTableColumnContainer,
|
||||||
RowClickedEvent,
|
RowClickedEvent,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user