Fix more integrations message (#4106)

* Fix more integrations message

* Period outside link
This commit is contained in:
Bram Kragten 2019-10-23 01:10:42 +02:00 committed by Paulus Schoutsen
parent 06d59b3cde
commit 0792278927
5 changed files with 31 additions and 13 deletions

View File

@ -141,6 +141,7 @@ class DataEntryFlowDialog extends LitElement {
.flowConfig=${this._params.flowConfig} .flowConfig=${this._params.flowConfig}
.hass=${this.hass} .hass=${this.hass}
.handlers=${this._handlers} .handlers=${this._handlers}
.showAdvanced=${this._params.showAdvanced}
></step-flow-pick-handler> ></step-flow-pick-handler>
` `
: this._step.type === "form" : this._step.type === "form"

View File

@ -75,6 +75,7 @@ export interface DataEntryFlowDialogParams {
continueFlowId?: string; continueFlowId?: string;
dialogClosedCallback?: (params: { flowFinished: boolean }) => void; dialogClosedCallback?: (params: { flowFinished: boolean }) => void;
flowConfig: FlowConfig; flowConfig: FlowConfig;
showAdvanced?: boolean;
} }
export const loadDataEntryFlowDialog = () => export const loadDataEntryFlowDialog = () =>

View File

@ -31,6 +31,7 @@ class StepFlowPickHandler extends LitElement {
@property() public hass!: HomeAssistant; @property() public hass!: HomeAssistant;
@property() public handlers!: string[]; @property() public handlers!: string[];
@property() public showAdvanced?: boolean;
@property() private filter?: string; @property() private filter?: string;
private _width?: number; private _width?: number;
@ -79,18 +80,24 @@ class StepFlowPickHandler extends LitElement {
` `
)} )}
</div> </div>
${this.showAdvanced
? html`
<p> <p>
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.integrations.note_about_integrations" "ui.panel.config.integrations.note_about_integrations"
)}<br /> )}<br />
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.integrations.note_about_website_reference" "ui.panel.config.integrations.note_about_website_reference"
)}<a href="https://www.home-assistant.io/integrations/" )}<a
href="https://www.home-assistant.io/integrations/"
target="_blank"
>${this.hass.localize( >${this.hass.localize(
"ui.panel.config.integrations.home_assistant_website" "ui.panel.config.integrations.home_assistant_website"
)}.</a )}</a
> >.
</p> </p>
`
: ""}
`; `;
} }
@ -133,6 +140,11 @@ class StepFlowPickHandler extends LitElement {
} }
p { p {
text-align: center; text-align: center;
padding: 16px;
margin: 0;
}
p > a {
color: var(--primary-color);
} }
`; `;
} }

View File

@ -42,6 +42,7 @@ import { DataEntryFlowProgress } from "../../../data/data_entry_flow";
@customElement("ha-config-entries-dashboard") @customElement("ha-config-entries-dashboard")
export class HaConfigManagerDashboard extends LitElement { export class HaConfigManagerDashboard extends LitElement {
@property() public hass!: HomeAssistant; @property() public hass!: HomeAssistant;
@property() public showAdvanced!: boolean;
@property() private configEntries!: ConfigEntry[]; @property() private configEntries!: ConfigEntry[];
@ -164,6 +165,7 @@ export class HaConfigManagerDashboard extends LitElement {
private _createFlow() { private _createFlow() {
showConfigFlowDialog(this, { showConfigFlowDialog(this, {
dialogClosedCallback: () => fireEvent(this, "hass-reload-entries"), dialogClosedCallback: () => fireEvent(this, "hass-reload-entries"),
showAdvanced: this.showAdvanced,
}); });
} }

View File

@ -39,6 +39,7 @@ declare global {
class HaConfigIntegrations extends HassRouterPage { class HaConfigIntegrations extends HassRouterPage {
@property() public hass!: HomeAssistant; @property() public hass!: HomeAssistant;
@property() public narrow!: boolean; @property() public narrow!: boolean;
@property() public showAdvanced!: boolean;
protected routerOptions: RouterOptions = { protected routerOptions: RouterOptions = {
defaultPage: "dashboard", defaultPage: "dashboard",
@ -99,6 +100,8 @@ class HaConfigIntegrations extends HassRouterPage {
pageEl.entityRegistryEntries = this._entityRegistryEntries; pageEl.entityRegistryEntries = this._entityRegistryEntries;
pageEl.configEntries = this._configEntries; pageEl.configEntries = this._configEntries;
pageEl.narrow = this.narrow;
pageEl.showAdvanced = this.showAdvanced;
if (this._currentPage === "dashboard") { if (this._currentPage === "dashboard") {
pageEl.configEntriesInProgress = this._configEntriesInProgress; pageEl.configEntriesInProgress = this._configEntriesInProgress;
@ -108,7 +111,6 @@ class HaConfigIntegrations extends HassRouterPage {
pageEl.configEntryId = this.routeTail.path.substr(1); pageEl.configEntryId = this.routeTail.path.substr(1);
pageEl.deviceRegistryEntries = this._deviceRegistryEntries; pageEl.deviceRegistryEntries = this._deviceRegistryEntries;
pageEl.areas = this._areas; pageEl.areas = this._areas;
pageEl.narrow = this.narrow;
} }
private _loadData() { private _loadData() {