mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Allow options flow to define form title/description (#4598)
* Allow options flow to define their own title * Allow description too
This commit is contained in:
parent
6874788cc0
commit
f95ba4c04c
@ -44,12 +44,25 @@ export const showOptionsFlowDialog = (
|
||||
: "";
|
||||
},
|
||||
|
||||
renderShowFormStepHeader(hass, _step) {
|
||||
return hass.localize(`ui.dialogs.options_flow.form.header`);
|
||||
renderShowFormStepHeader(hass, step) {
|
||||
return (
|
||||
hass.localize(
|
||||
`component.${step.handler}.options.step.${step.step_id}.title`
|
||||
) || hass.localize(`ui.dialogs.options_flow.form.header`)
|
||||
);
|
||||
},
|
||||
|
||||
renderShowFormStepDescription(_hass, _step) {
|
||||
return "";
|
||||
renderShowFormStepDescription(hass, step) {
|
||||
const description = localizeKey(
|
||||
hass.localize,
|
||||
`component.${step.handler}.config.step.${step.step_id}.description`,
|
||||
step.description_placeholders
|
||||
);
|
||||
return description
|
||||
? html`
|
||||
<ha-markdown allowsvg .content=${description}></ha-markdown>
|
||||
`
|
||||
: "";
|
||||
},
|
||||
|
||||
renderShowFormStepFieldLabel(hass, step, field) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user