mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
added title to view configuation (#4037)
* added title to view configuation * replacing let with const * added localization change * updated view config title * linter updates * Prettier updates
This commit is contained in:
parent
11c08e9a69
commit
7b5201599d
@ -87,6 +87,18 @@ export class HuiEditView extends LitElement {
|
|||||||
return this.shadowRoot!.querySelector("ha-paper-dialog")!;
|
return this.shadowRoot!.querySelector("ha-paper-dialog")!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private get _viewConfigTitle(): string {
|
||||||
|
if (!this._config || !this._config.title) {
|
||||||
|
return this.hass!.localize("ui.panel.lovelace.editor.edit_view.header");
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.edit_view.header_name",
|
||||||
|
"name",
|
||||||
|
this._config.title
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | void {
|
||||||
let content;
|
let content;
|
||||||
switch (this._curTab) {
|
switch (this._curTab) {
|
||||||
@ -118,7 +130,7 @@ export class HuiEditView extends LitElement {
|
|||||||
return html`
|
return html`
|
||||||
<ha-paper-dialog with-backdrop>
|
<ha-paper-dialog with-backdrop>
|
||||||
<h2>
|
<h2>
|
||||||
${this.hass!.localize("ui.panel.lovelace.editor.edit_view.header")}
|
${this._viewConfigTitle}
|
||||||
</h2>
|
</h2>
|
||||||
<paper-tabs
|
<paper-tabs
|
||||||
scrollable
|
scrollable
|
||||||
|
@ -1397,6 +1397,7 @@
|
|||||||
},
|
},
|
||||||
"edit_view": {
|
"edit_view": {
|
||||||
"header": "View Configuration",
|
"header": "View Configuration",
|
||||||
|
"header_name": "{name} View Configuration",
|
||||||
"add": "Add view",
|
"add": "Add view",
|
||||||
"edit": "Edit view",
|
"edit": "Edit view",
|
||||||
"delete": "Delete view"
|
"delete": "Delete view"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user