mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 10:29:37 +00:00
Change add application credential flow (#13951)
* Change add application credential flow * Update step-flow-abort.ts * import * Add missing credential docs link * Load description, show only that if available * Update dialog-add-application-credential.ts * pass along manifest Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -14,8 +14,6 @@ import { showAddApplicationCredentialDialog } from "../../panels/config/applicat
|
||||
import { configFlowContentStyles } from "./styles";
|
||||
import { DataEntryFlowDialogParams } from "./show-dialog-data-entry-flow";
|
||||
import { showConfigFlowDialog } from "./show-dialog-config-flow";
|
||||
import { domainToName } from "../../data/integration";
|
||||
import { showConfirmationDialog } from "../generic/show-dialog-box";
|
||||
|
||||
@customElement("step-flow-abort")
|
||||
class StepFlowAbort extends LitElement {
|
||||
@@ -54,26 +52,11 @@ class StepFlowAbort extends LitElement {
|
||||
}
|
||||
|
||||
private async _handleMissingCreds() {
|
||||
const confirm = await showConfirmationDialog(this, {
|
||||
title: this.hass.localize(
|
||||
"ui.panel.config.integrations.config_flow.missing_credentials_title"
|
||||
),
|
||||
text: this.hass.localize(
|
||||
"ui.panel.config.integrations.config_flow.missing_credentials",
|
||||
{
|
||||
integration: domainToName(this.hass.localize, this.domain),
|
||||
}
|
||||
),
|
||||
confirmText: this.hass.localize("ui.common.yes"),
|
||||
dismissText: this.hass.localize("ui.common.no"),
|
||||
});
|
||||
this._flowDone();
|
||||
if (!confirm) {
|
||||
return;
|
||||
}
|
||||
// Prompt to enter credentials and restart integration setup
|
||||
showAddApplicationCredentialDialog(this.params.dialogParentElement!, {
|
||||
selectedDomain: this.domain,
|
||||
manifest: this.params.manifest,
|
||||
applicationCredentialAddedCallback: () => {
|
||||
showConfigFlowDialog(this.params.dialogParentElement!, {
|
||||
dialogClosedCallback: this.params.dialogClosedCallback,
|
||||
|
||||
Reference in New Issue
Block a user