Remove advanced mode from dashboard creation (#25053)

This commit is contained in:
Bram Kragten 2025-04-14 14:35:45 +02:00 committed by GitHub
parent 2f086f4d00
commit f6e4f4c0d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,6 @@ import { slugify } from "../../../../common/string/slugify";
import { createCloseHeading } from "../../../../components/ha-dialog"; import { createCloseHeading } from "../../../../components/ha-dialog";
import "../../../../components/ha-form/ha-form"; import "../../../../components/ha-form/ha-form";
import type { SchemaUnion } from "../../../../components/ha-form/types"; import type { SchemaUnion } from "../../../../components/ha-form/types";
import type { CoreFrontendUserData } from "../../../../data/frontend";
import type { import type {
LovelaceDashboard, LovelaceDashboard,
LovelaceDashboardCreateParams, LovelaceDashboardCreateParams,
@ -92,7 +91,7 @@ export class DialogLovelaceDashboardDetail extends LitElement {
) )
: html` : html`
<ha-form <ha-form
.schema=${this._schema(this._params, this.hass.userData)} .schema=${this._schema(this._params)}
.data=${this._data} .data=${this._data}
.hass=${this.hass} .hass=${this.hass}
.error=${this._error} .error=${this._error}
@ -156,10 +155,7 @@ export class DialogLovelaceDashboardDetail extends LitElement {
} }
private _schema = memoizeOne( private _schema = memoizeOne(
( (params: LovelaceDashboardDetailsDialogParams) =>
params: LovelaceDashboardDetailsDialogParams,
userData: CoreFrontendUserData | null | undefined
) =>
[ [
{ {
name: "title", name: "title",
@ -175,7 +171,7 @@ export class DialogLovelaceDashboardDetail extends LitElement {
icon: {}, icon: {},
}, },
}, },
...(!params.dashboard && userData?.showAdvanced ...(!params.dashboard
? ([ ? ([
{ {
name: "url_path", name: "url_path",