mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Update discovered/disabled/ignored integrations (#17107)
This commit is contained in:
parent
a7100b9678
commit
a09d71291b
@ -1,15 +1,10 @@
|
|||||||
|
import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item";
|
||||||
|
import { mdiBookshelf, mdiCog, mdiDotsVertical, mdiOpenInNew } from "@mdi/js";
|
||||||
import { css, html, LitElement, TemplateResult } from "lit";
|
import { css, html, LitElement, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
import {
|
|
||||||
mdiBookshelf,
|
|
||||||
mdiCog,
|
|
||||||
mdiDotsVertical,
|
|
||||||
mdiEyeOff,
|
|
||||||
mdiOpenInNew,
|
|
||||||
} from "@mdi/js";
|
|
||||||
import type { RequestSelectedDetail } from "@material/mwc-list/mwc-list-item";
|
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
|
import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
|
||||||
import {
|
import {
|
||||||
ATTENTION_SOURCES,
|
ATTENTION_SOURCES,
|
||||||
DISCOVERY_SOURCES,
|
DISCOVERY_SOURCES,
|
||||||
@ -17,13 +12,12 @@ import {
|
|||||||
localizeConfigFlowTitle,
|
localizeConfigFlowTitle,
|
||||||
} from "../../../data/config_flow";
|
} from "../../../data/config_flow";
|
||||||
import type { IntegrationManifest } from "../../../data/integration";
|
import type { IntegrationManifest } from "../../../data/integration";
|
||||||
import { shouldHandleRequestSelectedEvent } from "../../../common/mwc/handle-request-selected-event";
|
|
||||||
import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow";
|
import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow";
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
|
import { documentationUrl } from "../../../util/documentation-url";
|
||||||
import type { DataEntryFlowProgressExtended } from "./ha-config-integrations";
|
import type { DataEntryFlowProgressExtended } from "./ha-config-integrations";
|
||||||
import "./ha-integration-action-card";
|
import "./ha-integration-action-card";
|
||||||
import { documentationUrl } from "../../../util/documentation-url";
|
|
||||||
|
|
||||||
@customElement("ha-config-flow-card")
|
@customElement("ha-config-flow-card")
|
||||||
export class HaConfigFlowCard extends LitElement {
|
export class HaConfigFlowCard extends LitElement {
|
||||||
@ -38,16 +32,10 @@ export class HaConfigFlowCard extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-integration-action-card
|
<ha-integration-action-card
|
||||||
class=${classMap({
|
class=${classMap({
|
||||||
discovered: !attention,
|
|
||||||
attention: attention,
|
attention: attention,
|
||||||
})}
|
})}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.manifest=${this.manifest}
|
.manifest=${this.manifest}
|
||||||
.banner=${this.hass.localize(
|
|
||||||
`ui.panel.config.integrations.${
|
|
||||||
attention ? "attention" : "discovered"
|
|
||||||
}`
|
|
||||||
)}
|
|
||||||
.domain=${this.flow.handler}
|
.domain=${this.flow.handler}
|
||||||
.label=${this.flow.localized_title}
|
.label=${this.flow.localized_title}
|
||||||
>
|
>
|
||||||
@ -60,72 +48,75 @@ export class HaConfigFlowCard extends LitElement {
|
|||||||
}`
|
}`
|
||||||
)}
|
)}
|
||||||
></mwc-button>
|
></mwc-button>
|
||||||
<ha-button-menu slot="header-button">
|
${DISCOVERY_SOURCES.includes(this.flow.context.source) &&
|
||||||
<ha-icon-button
|
this.flow.context.unique_id
|
||||||
slot="trigger"
|
? html`<mwc-button
|
||||||
.label=${this.hass.localize("ui.common.menu")}
|
@click=${this._ignoreFlow}
|
||||||
.path=${mdiDotsVertical}
|
.label=${this.hass.localize(
|
||||||
></ha-icon-button>
|
`ui.panel.config.integrations.ignore.ignore`
|
||||||
${this.flow.context.configuration_url
|
)}
|
||||||
? html`<a
|
></mwc-button>`
|
||||||
href=${this.flow.context.configuration_url.replace(
|
: ""}
|
||||||
/^homeassistant:\/\//,
|
${this.flow.context.configuration_url || this.manifest
|
||||||
""
|
? html`<ha-button-menu slot="header-button">
|
||||||
)}
|
<ha-icon-button
|
||||||
rel="noreferrer"
|
slot="trigger"
|
||||||
target=${this.flow.context.configuration_url.startsWith(
|
.label=${this.hass.localize("ui.common.menu")}
|
||||||
"homeassistant://"
|
.path=${mdiDotsVertical}
|
||||||
)
|
></ha-icon-button>
|
||||||
? "_self"
|
${this.flow.context.configuration_url
|
||||||
: "_blank"}
|
? html`<a
|
||||||
>
|
href=${this.flow.context.configuration_url.replace(
|
||||||
<mwc-list-item graphic="icon" hasMeta>
|
/^homeassistant:\/\//,
|
||||||
${this.hass.localize(
|
""
|
||||||
"ui.panel.config.integrations.config_entry.open_configuration_url"
|
)}
|
||||||
)}
|
rel="noreferrer"
|
||||||
<ha-svg-icon slot="graphic" .path=${mdiCog}></ha-svg-icon>
|
target=${this.flow.context.configuration_url.startsWith(
|
||||||
<ha-svg-icon slot="meta" .path=${mdiOpenInNew}></ha-svg-icon>
|
"homeassistant://"
|
||||||
</mwc-list-item>
|
|
||||||
</a>`
|
|
||||||
: ""}
|
|
||||||
${this.manifest
|
|
||||||
? html`<a
|
|
||||||
href=${this.manifest.is_built_in
|
|
||||||
? documentationUrl(
|
|
||||||
this.hass,
|
|
||||||
`/integrations/${this.manifest.domain}`
|
|
||||||
)
|
)
|
||||||
: this.manifest.documentation}
|
? "_self"
|
||||||
rel="noreferrer"
|
: "_blank"}
|
||||||
target="_blank"
|
>
|
||||||
>
|
<mwc-list-item graphic="icon" hasMeta>
|
||||||
<mwc-list-item graphic="icon" hasMeta>
|
${this.hass.localize(
|
||||||
${this.hass.localize(
|
"ui.panel.config.integrations.config_entry.open_configuration_url"
|
||||||
"ui.panel.config.integrations.config_entry.documentation"
|
)}
|
||||||
)}
|
<ha-svg-icon slot="graphic" .path=${mdiCog}></ha-svg-icon>
|
||||||
<ha-svg-icon
|
<ha-svg-icon
|
||||||
slot="graphic"
|
slot="meta"
|
||||||
.path=${mdiBookshelf}
|
.path=${mdiOpenInNew}
|
||||||
></ha-svg-icon>
|
></ha-svg-icon>
|
||||||
<ha-svg-icon slot="meta" .path=${mdiOpenInNew}></ha-svg-icon>
|
</mwc-list-item>
|
||||||
</mwc-list-item>
|
</a>`
|
||||||
</a>`
|
: ""}
|
||||||
: ""}
|
${this.manifest
|
||||||
${DISCOVERY_SOURCES.includes(this.flow.context.source) &&
|
? html`<a
|
||||||
this.flow.context.unique_id
|
href=${this.manifest.is_built_in
|
||||||
? html`
|
? documentationUrl(
|
||||||
<mwc-list-item
|
this.hass,
|
||||||
graphic="icon"
|
`/integrations/${this.manifest.domain}`
|
||||||
@request-selected=${this._ignoreFlow}
|
)
|
||||||
>
|
: this.manifest.documentation}
|
||||||
${this.hass.localize(
|
rel="noreferrer"
|
||||||
"ui.panel.config.integrations.ignore.ignore"
|
target="_blank"
|
||||||
)}
|
>
|
||||||
<ha-svg-icon slot="graphic" .path=${mdiEyeOff}></ha-svg-icon>
|
<mwc-list-item graphic="icon" hasMeta>
|
||||||
</mwc-list-item>
|
${this.hass.localize(
|
||||||
`
|
"ui.panel.config.integrations.config_entry.documentation"
|
||||||
: ""}
|
)}
|
||||||
</ha-button-menu>
|
<ha-svg-icon
|
||||||
|
slot="graphic"
|
||||||
|
.path=${mdiBookshelf}
|
||||||
|
></ha-svg-icon>
|
||||||
|
<ha-svg-icon
|
||||||
|
slot="meta"
|
||||||
|
.path=${mdiOpenInNew}
|
||||||
|
></ha-svg-icon>
|
||||||
|
</mwc-list-item>
|
||||||
|
</a>`
|
||||||
|
: ""}
|
||||||
|
</ha-button-menu>`
|
||||||
|
: ""}
|
||||||
</ha-integration-action-card>
|
</ha-integration-action-card>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -174,14 +165,6 @@ export class HaConfigFlowCard extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
.attention {
|
|
||||||
--state-color: var(--error-color);
|
|
||||||
--text-on-state-color: var(--text-primary-color);
|
|
||||||
}
|
|
||||||
.discovered {
|
|
||||||
--state-color: var(--primary-color);
|
|
||||||
--text-on-state-color: var(--text-primary-color);
|
|
||||||
}
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
|
@ -377,46 +377,57 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
|||||||
</div>
|
</div>
|
||||||
`}
|
`}
|
||||||
${this._showIgnored
|
${this._showIgnored
|
||||||
? html`<div class="container">
|
? html`<h1>
|
||||||
${ignoredConfigEntries.map(
|
${this.hass.localize(
|
||||||
(entry: ConfigEntryExtended) => html`
|
"ui.panel.config.integrations.ignore.ignored"
|
||||||
<ha-ignored-config-entry-card
|
)}
|
||||||
.hass=${this.hass}
|
</h1>
|
||||||
.manifest=${this._manifests[entry.domain]}
|
<div class="container">
|
||||||
.entry=${entry}
|
${ignoredConfigEntries.map(
|
||||||
@change=${this._handleFlowUpdated}
|
(entry: ConfigEntryExtended) => html`
|
||||||
></ha-ignored-config-entry-card>
|
<ha-ignored-config-entry-card
|
||||||
`
|
.hass=${this.hass}
|
||||||
)}
|
.manifest=${this._manifests[entry.domain]}
|
||||||
</div>`
|
.entry=${entry}
|
||||||
|
@change=${this._handleFlowUpdated}
|
||||||
|
></ha-ignored-config-entry-card>
|
||||||
|
`
|
||||||
|
)}
|
||||||
|
</div>`
|
||||||
: ""}
|
: ""}
|
||||||
${configEntriesInProgress.length
|
${configEntriesInProgress.length
|
||||||
? html`<div class="container">
|
? html`<h1>
|
||||||
${configEntriesInProgress.map(
|
${this.hass.localize("ui.panel.config.integrations.discovered")}
|
||||||
(flow: DataEntryFlowProgressExtended) => html`
|
</h1>
|
||||||
<ha-config-flow-card
|
<div class="container">
|
||||||
.hass=${this.hass}
|
${configEntriesInProgress.map(
|
||||||
.manifest=${this._manifests[flow.handler]}
|
(flow: DataEntryFlowProgressExtended) => html`
|
||||||
.flow=${flow}
|
<ha-config-flow-card
|
||||||
@change=${this._handleFlowUpdated}
|
.hass=${this.hass}
|
||||||
></ha-config-flow-card>
|
.manifest=${this._manifests[flow.handler]}
|
||||||
`
|
.flow=${flow}
|
||||||
)}
|
@change=${this._handleFlowUpdated}
|
||||||
</div>`
|
></ha-config-flow-card>
|
||||||
|
`
|
||||||
|
)}
|
||||||
|
</div>`
|
||||||
: ""}
|
: ""}
|
||||||
${this._showDisabled
|
${this._showDisabled
|
||||||
? html`<div class="container">
|
? html`<h1>
|
||||||
${disabledConfigEntries.map(
|
${this.hass.localize("ui.panel.config.integrations.disabled")}
|
||||||
(entry: ConfigEntryExtended) => html`
|
</h1>
|
||||||
<ha-disabled-config-entry-card
|
<div class="container">
|
||||||
.hass=${this.hass}
|
${disabledConfigEntries.map(
|
||||||
.entry=${entry}
|
(entry: ConfigEntryExtended) => html`
|
||||||
.manifest=${this._manifests[entry.domain]}
|
<ha-disabled-config-entry-card
|
||||||
.entityRegistryEntries=${this._entityRegistryEntries}
|
.hass=${this.hass}
|
||||||
></ha-disabled-config-entry-card>
|
.entry=${entry}
|
||||||
`
|
.manifest=${this._manifests[entry.domain]}
|
||||||
)}
|
.entityRegistryEntries=${this._entityRegistryEntries}
|
||||||
</div>`
|
></ha-disabled-config-entry-card>
|
||||||
|
`
|
||||||
|
)}
|
||||||
|
</div>`
|
||||||
: ""}
|
: ""}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
${integrations.length
|
${integrations.length
|
||||||
@ -756,6 +767,8 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
|||||||
.empty-message {
|
.empty-message {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: -1;
|
||||||
}
|
}
|
||||||
.empty-message h1 {
|
.empty-message h1 {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@ -851,6 +864,9 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
|||||||
.menu-badge-container {
|
.menu-badge-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
h1 {
|
||||||
|
margin: 8px 0 0 16px;
|
||||||
|
}
|
||||||
ha-button-menu {
|
ha-button-menu {
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
import { css, html, LitElement, TemplateResult } from "lit";
|
import { css, html, LitElement, TemplateResult } from "lit";
|
||||||
import { customElement, property } from "lit/decorators";
|
import { customElement, property } from "lit/decorators";
|
||||||
import type { IntegrationManifest } from "../../../data/integration";
|
import {
|
||||||
|
domainToName,
|
||||||
|
type IntegrationManifest,
|
||||||
|
} from "../../../data/integration";
|
||||||
import type { HomeAssistant } from "../../../types";
|
import type { HomeAssistant } from "../../../types";
|
||||||
import "./ha-integration-header";
|
import "./ha-integration-header";
|
||||||
import "../../../components/ha-card";
|
import "../../../components/ha-card";
|
||||||
|
import { brandsUrl } from "../../../util/brands-url";
|
||||||
|
import { haStyle } from "../../../resources/styles";
|
||||||
|
|
||||||
@customElement("ha-integration-action-card")
|
@customElement("ha-integration-action-card")
|
||||||
export class HaIntegrationActionCard extends LitElement {
|
export class HaIntegrationActionCard extends LitElement {
|
||||||
@ -22,49 +27,94 @@ export class HaIntegrationActionCard extends LitElement {
|
|||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<ha-card outlined>
|
<ha-card outlined>
|
||||||
<ha-integration-header
|
<div class="card-content">
|
||||||
.hass=${this.hass}
|
<img
|
||||||
.banner=${this.banner}
|
alt=""
|
||||||
.domain=${this.domain}
|
src=${brandsUrl({
|
||||||
.label=${this.label}
|
domain: this.domain,
|
||||||
.localizedDomainName=${this.localizedDomainName}
|
type: "icon",
|
||||||
.manifest=${this.manifest}
|
darkOptimized: this.hass.themes?.darkMode,
|
||||||
>
|
})}
|
||||||
<span slot="header-button"><slot name="header-button"></slot></span>
|
referrerpolicy="no-referrer"
|
||||||
</ha-integration-header>
|
@error=${this._onImageError}
|
||||||
|
@load=${this._onImageLoad}
|
||||||
|
/>
|
||||||
|
<h2>${this.label}</h2>
|
||||||
|
<h3>
|
||||||
|
${this.localizedDomainName ||
|
||||||
|
domainToName(this.hass.localize, this.domain, this.manifest)}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
<div class="filler"></div>
|
<div class="filler"></div>
|
||||||
<div class="actions"><slot></slot></div>
|
<div class="card-actions"><slot></slot></div>
|
||||||
|
<div class="header-button"><slot name="header-button"></slot></div>
|
||||||
</ha-card>
|
</ha-card>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
private _onImageLoad(ev) {
|
||||||
ha-card {
|
ev.target.style.visibility = "initial";
|
||||||
display: flex;
|
}
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
private _onImageError(ev) {
|
||||||
--ha-card-border-color: var(--state-color);
|
ev.target.style.visibility = "hidden";
|
||||||
--mdc-theme-primary: var(--state-color);
|
}
|
||||||
}
|
|
||||||
.filler {
|
static styles = [
|
||||||
flex: 1;
|
haStyle,
|
||||||
}
|
css`
|
||||||
.attention {
|
ha-card {
|
||||||
--state-color: var(--error-color);
|
display: flex;
|
||||||
--text-on-state-color: var(--text-primary-color);
|
flex-direction: column;
|
||||||
}
|
height: 100%;
|
||||||
.discovered {
|
}
|
||||||
--state-color: var(--primary-color);
|
img {
|
||||||
--text-on-state-color: var(--text-primary-color);
|
width: 40px;
|
||||||
}
|
height: 40px;
|
||||||
.actions {
|
}
|
||||||
display: flex;
|
h2 {
|
||||||
justify-content: space-between;
|
font-size: 16px;
|
||||||
align-items: center;
|
font-weight: 400;
|
||||||
padding: 8px 6px 0;
|
margin-top: 8px;
|
||||||
height: 48px;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
`;
|
h3 {
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.header-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 8px;
|
||||||
|
right: 8px;
|
||||||
|
}
|
||||||
|
.filler {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.attention {
|
||||||
|
--state-color: var(--error-color);
|
||||||
|
--text-on-state-color: var(--text-primary-color);
|
||||||
|
}
|
||||||
|
.card-content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.card-actions {
|
||||||
|
border-top: none;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
justify-content: center;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
:host ::slotted(*) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
:host ::slotted(:last-child) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
@ -10,10 +10,6 @@ import { brandsUrl } from "../../../util/brands-url";
|
|||||||
export class HaIntegrationHeader extends LitElement {
|
export class HaIntegrationHeader extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public banner?: string;
|
|
||||||
|
|
||||||
@property() public label?: string;
|
|
||||||
|
|
||||||
@property() public error?: string;
|
@property() public error?: string;
|
||||||
|
|
||||||
@property() public warning?: string;
|
@property() public warning?: string;
|
||||||
@ -25,25 +21,11 @@ export class HaIntegrationHeader extends LitElement {
|
|||||||
@property({ attribute: false }) public manifest?: IntegrationManifest;
|
@property({ attribute: false }) public manifest?: IntegrationManifest;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
let primary: string;
|
|
||||||
let secondary: string | undefined;
|
|
||||||
|
|
||||||
const domainName =
|
const domainName =
|
||||||
this.localizedDomainName ||
|
this.localizedDomainName ||
|
||||||
domainToName(this.hass.localize, this.domain, this.manifest);
|
domainToName(this.hass.localize, this.domain, this.manifest);
|
||||||
|
|
||||||
if (this.label) {
|
|
||||||
primary = this.label;
|
|
||||||
secondary =
|
|
||||||
primary.toLowerCase() === domainName.toLowerCase()
|
|
||||||
? undefined
|
|
||||||
: domainName;
|
|
||||||
} else {
|
|
||||||
primary = domainName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
${!this.banner ? "" : html`<div class="banner">${this.banner}</div>`}
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img
|
<img
|
||||||
alt=""
|
alt=""
|
||||||
@ -62,7 +44,7 @@ export class HaIntegrationHeader extends LitElement {
|
|||||||
role="heading"
|
role="heading"
|
||||||
aria-level="1"
|
aria-level="1"
|
||||||
>
|
>
|
||||||
${primary}
|
${domainName}
|
||||||
</div>
|
</div>
|
||||||
${this.error
|
${this.error
|
||||||
? html`<div class="error">
|
? html`<div class="error">
|
||||||
@ -74,8 +56,6 @@ export class HaIntegrationHeader extends LitElement {
|
|||||||
<ha-svg-icon .path=${mdiAlertOutline}></ha-svg-icon>${this
|
<ha-svg-icon .path=${mdiAlertOutline}></ha-svg-icon>${this
|
||||||
.warning}
|
.warning}
|
||||||
</div>`
|
</div>`
|
||||||
: secondary
|
|
||||||
? html`<div class="secondary">${secondary}</div>`
|
|
||||||
: nothing}
|
: nothing}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-button">
|
<div class="header-button">
|
||||||
@ -94,16 +74,6 @@ export class HaIntegrationHeader extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
.banner {
|
|
||||||
background-color: var(--state-color);
|
|
||||||
color: var(--text-on-state-color);
|
|
||||||
text-align: center;
|
|
||||||
padding: 2px;
|
|
||||||
|
|
||||||
/* Padding is subtracted for nested elements with border radiuses */
|
|
||||||
border-top-left-radius: calc(var(--ha-card-border-radius, 12px) - 2px);
|
|
||||||
border-top-right-radius: calc(var(--ha-card-border-radius, 12px) - 2px);
|
|
||||||
}
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -126,8 +96,7 @@ export class HaIntegrationHeader extends LitElement {
|
|||||||
}
|
}
|
||||||
.primary,
|
.primary,
|
||||||
.warning,
|
.warning,
|
||||||
.error,
|
.error {
|
||||||
.secondary {
|
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
@ -152,10 +121,6 @@ export class HaIntegrationHeader extends LitElement {
|
|||||||
-webkit-line-clamp: 1;
|
-webkit-line-clamp: 1;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
.secondary {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
.error ha-svg-icon {
|
.error ha-svg-icon {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
color: var(--error-color);
|
color: var(--error-color);
|
||||||
|
@ -3301,6 +3301,7 @@
|
|||||||
"description": "Manage integrations with services or devices",
|
"description": "Manage integrations with services or devices",
|
||||||
"integration": "integration",
|
"integration": "integration",
|
||||||
"discovered": "Discovered",
|
"discovered": "Discovered",
|
||||||
|
"disabled": "Disabled",
|
||||||
"available_integrations": "Available integrations",
|
"available_integrations": "Available integrations",
|
||||||
"new_flow": "Setup another instance of {integration}",
|
"new_flow": "Setup another instance of {integration}",
|
||||||
"attention": "Attention required",
|
"attention": "Attention required",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user