mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 06:16:33 +00:00
Use codemirror in dialog-import-blueprint (#25034)
* use codemirror * hass not needed for codemirror * fix uom for css var
This commit is contained in:
parent
b3a5ea2893
commit
cd91e8c07c
@ -10,6 +10,7 @@ import "../../../components/ha-alert";
|
|||||||
import "../../../components/ha-textfield";
|
import "../../../components/ha-textfield";
|
||||||
import "../../../components/ha-dialog";
|
import "../../../components/ha-dialog";
|
||||||
import "../../../components/ha-dialog-header";
|
import "../../../components/ha-dialog-header";
|
||||||
|
import "../../../components/ha-code-editor";
|
||||||
import type { HaTextField } from "../../../components/ha-textfield";
|
import type { HaTextField } from "../../../components/ha-textfield";
|
||||||
import type { BlueprintImportResult } from "../../../data/blueprint";
|
import type { BlueprintImportResult } from "../../../data/blueprint";
|
||||||
import { importBlueprint, saveBlueprint } from "../../../data/blueprint";
|
import { importBlueprint, saveBlueprint } from "../../../data/blueprint";
|
||||||
@ -109,7 +110,12 @@ class DialogImportBlueprint extends LitElement {
|
|||||||
"ui.panel.config.blueprint.add.raw_blueprint"
|
"ui.panel.config.blueprint.add.raw_blueprint"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<pre>${this._result.raw_data}</pre>
|
<ha-code-editor
|
||||||
|
mode="yaml"
|
||||||
|
.value=${this._result.raw_data}
|
||||||
|
read-only
|
||||||
|
dir="ltr"
|
||||||
|
></ha-code-editor>
|
||||||
</ha-expansion-panel>
|
</ha-expansion-panel>
|
||||||
${this._result?.exists
|
${this._result?.exists
|
||||||
? html`
|
? html`
|
||||||
@ -274,6 +280,9 @@ class DialogImportBlueprint extends LitElement {
|
|||||||
--mdc-dialog-min-width: 90vw;
|
--mdc-dialog-min-width: 90vw;
|
||||||
--mdc-dialog-max-width: 90vw;
|
--mdc-dialog-max-width: 90vw;
|
||||||
}
|
}
|
||||||
|
ha-expansion-panel {
|
||||||
|
--expansion-panel-content-padding: 0px;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user