-
Notifications
You must be signed in to change notification settings - Fork 3.7k
added title to view configuation #4037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
dbddc36
3e76c5d
2c28bd8
5504abc
f42f888
56cacb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -87,6 +87,16 @@ export class HuiEditView extends LitElement { | |||||
| return this.shadowRoot!.querySelector("ha-paper-dialog")!; | ||||||
| } | ||||||
|
|
||||||
| private get _viewConfigTitle(): string { | ||||||
| if (!this._config || !this._config.title || this._config.title === "") { | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An empty string is falsy in javascript so
Suggested change
|
||||||
| return this.hass!.localize( | ||||||
| "ui.panel.lovelace.editor.edit_view.header" | ||||||
| );; | ||||||
| } | ||||||
|
|
||||||
| return this.hass!.localize("ui.panel.lovelace.editor.edit_view.header_name", this._config.title) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the key
Suggested change
|
||||||
| } | ||||||
|
|
||||||
| protected render(): TemplateResult | void { | ||||||
| let content; | ||||||
| switch (this._curTab) { | ||||||
|
|
@@ -118,7 +128,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 | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no config we might want to change the header to
Add new view?