mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +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")!;
|
||||
}
|
||||
|
||||
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 {
|
||||
let content;
|
||||
switch (this._curTab) {
|
||||
@ -118,7 +130,7 @@ export class HuiEditView extends LitElement {
|
||||
return html`
|
||||
<ha-paper-dialog with-backdrop>
|
||||
<h2>
|
||||
${this.hass!.localize("ui.panel.lovelace.editor.edit_view.header")}
|
||||
${this._viewConfigTitle}
|
||||
</h2>
|
||||
<paper-tabs
|
||||
scrollable
|
||||
|
@ -1397,6 +1397,7 @@
|
||||
},
|
||||
"edit_view": {
|
||||
"header": "View Configuration",
|
||||
"header_name": "{name} View Configuration",
|
||||
"add": "Add view",
|
||||
"edit": "Edit view",
|
||||
"delete": "Delete view"
|
||||
|
Loading…
x
Reference in New Issue
Block a user