mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 00:06:35 +00:00
Remove back path from UI (#13936)
Remove back path from UI as it can be edited with yaml editor
This commit is contained in:
parent
650d579d05
commit
f768c5ef7f
@ -33,7 +33,7 @@ export class HuiViewEditor extends LitElement {
|
||||
private _suggestedPath = false;
|
||||
|
||||
private _schema = memoizeOne(
|
||||
(localize: LocalizeFunc, subview: boolean, showAdvanced: boolean) =>
|
||||
(localize: LocalizeFunc) =>
|
||||
[
|
||||
{ name: "title", selector: { text: {} } },
|
||||
{
|
||||
@ -69,14 +69,6 @@ export class HuiViewEditor extends LitElement {
|
||||
boolean: {},
|
||||
},
|
||||
},
|
||||
...(subview && showAdvanced
|
||||
? [
|
||||
{
|
||||
name: "back_path",
|
||||
selector: { navigation: {} },
|
||||
},
|
||||
]
|
||||
: []),
|
||||
] as const
|
||||
);
|
||||
|
||||
@ -98,11 +90,7 @@ export class HuiViewEditor extends LitElement {
|
||||
return html``;
|
||||
}
|
||||
|
||||
const schema = this._schema(
|
||||
this.hass.localize,
|
||||
this._config.subview ?? false,
|
||||
this.hass.userData?.showAdvanced ?? false
|
||||
);
|
||||
const schema = this._schema(this.hass.localize);
|
||||
|
||||
const data = {
|
||||
theme: "Backend-selected",
|
||||
@ -128,9 +116,6 @@ export class HuiViewEditor extends LitElement {
|
||||
if (config.type === "masonry") {
|
||||
delete config.type;
|
||||
}
|
||||
if (!config.subview) {
|
||||
delete config.back_path;
|
||||
}
|
||||
|
||||
if (
|
||||
this.isNew &&
|
||||
@ -155,10 +140,6 @@ export class HuiViewEditor extends LitElement {
|
||||
return this.hass.localize("ui.panel.lovelace.editor.edit_view.type");
|
||||
case "subview":
|
||||
return this.hass.localize("ui.panel.lovelace.editor.edit_view.subview");
|
||||
case "back_path":
|
||||
return this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_view.back_path"
|
||||
);
|
||||
default:
|
||||
return this.hass!.localize(
|
||||
`ui.panel.lovelace.editor.card.generic.${schema.name}`
|
||||
@ -174,10 +155,6 @@ export class HuiViewEditor extends LitElement {
|
||||
return this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_view.subview_helper"
|
||||
);
|
||||
case "back_path":
|
||||
return this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_view.back_path_helper"
|
||||
);
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
@ -3805,8 +3805,6 @@
|
||||
},
|
||||
"subview": "Subview",
|
||||
"subview_helper": "Subviews don't appear in tabs and have a back button.",
|
||||
"back_path": "Back path (optional)",
|
||||
"back_path_helper": "Only for subviews. If empty, clicking on back button will go to the previous page.",
|
||||
"edit_ui": "Edit in visual editor",
|
||||
"edit_yaml": "Edit in YAML"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user