mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Merge pull request #11651 from home-assistant/add-docs-icon-config-flow
This commit is contained in:
commit
9eba50df0c
@ -1,5 +1,5 @@
|
|||||||
import "@material/mwc-button";
|
import "@material/mwc-button";
|
||||||
import { mdiClose } from "@mdi/js";
|
import { mdiClose, mdiHelpCircle } from "@mdi/js";
|
||||||
import type { UnsubscribeFunc } from "home-assistant-js-websocket";
|
import type { UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
@ -33,6 +33,7 @@ import {
|
|||||||
} from "../../data/device_registry";
|
} from "../../data/device_registry";
|
||||||
import { haStyleDialog } from "../../resources/styles";
|
import { haStyleDialog } from "../../resources/styles";
|
||||||
import type { HomeAssistant } from "../../types";
|
import type { HomeAssistant } from "../../types";
|
||||||
|
import { documentationUrl } from "../../util/documentation-url";
|
||||||
import { showAlertDialog } from "../generic/show-dialog-box";
|
import { showAlertDialog } from "../generic/show-dialog-box";
|
||||||
import {
|
import {
|
||||||
DataEntryFlowDialogParams,
|
DataEntryFlowDialogParams,
|
||||||
@ -236,14 +237,33 @@ class DataEntryFlowDialog extends LitElement {
|
|||||||
// to reset the element.
|
// to reset the element.
|
||||||
""
|
""
|
||||||
: html`
|
: html`
|
||||||
<ha-icon-button
|
<div class="dialog-actions">
|
||||||
.label=${this.hass.localize(
|
${this._step
|
||||||
"ui.panel.config.integrations.config_flow.dismiss"
|
? html`
|
||||||
)}
|
<a
|
||||||
.path=${mdiClose}
|
href=${documentationUrl(
|
||||||
dialogAction="close"
|
this.hass,
|
||||||
?rtl=${computeRTL(this.hass)}
|
`/integrations/${this._step.handler}`
|
||||||
></ha-icon-button>
|
)}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer noopener"
|
||||||
|
><ha-icon-button
|
||||||
|
.label=${this.hass.localize("ui.common.help")}
|
||||||
|
.path=${mdiHelpCircle}
|
||||||
|
?rtl=${computeRTL(this.hass)}
|
||||||
|
></ha-icon-button
|
||||||
|
></a>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
<ha-icon-button
|
||||||
|
.label=${this.hass.localize(
|
||||||
|
"ui.panel.config.integrations.config_flow.dismiss"
|
||||||
|
)}
|
||||||
|
.path=${mdiClose}
|
||||||
|
dialogAction="close"
|
||||||
|
?rtl=${computeRTL(this.hass)}
|
||||||
|
></ha-icon-button>
|
||||||
|
</div>
|
||||||
${this._step === null
|
${this._step === null
|
||||||
? this._handler
|
? this._handler
|
||||||
? html`<step-flow-pick-flow
|
? html`<step-flow-pick-flow
|
||||||
@ -472,16 +492,19 @@ class DataEntryFlowDialog extends LitElement {
|
|||||||
ha-dialog {
|
ha-dialog {
|
||||||
--dialog-content-padding: 0;
|
--dialog-content-padding: 0;
|
||||||
}
|
}
|
||||||
ha-icon-button {
|
.dialog-actions {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
ha-icon-button[rtl] {
|
.dialog-actions[rtl] {
|
||||||
right: auto;
|
right: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
.dialog-actions > * {
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user