${this.hass.localize("ui.panel.config.scene.picker.apply")}
-
+
${this.hass.localize("ui.panel.config.scene.picker.show_info")}
@@ -281,45 +276,21 @@ export class HaSceneEditor extends SubscribeMixin(
${this.hass.localize(
"ui.panel.config.automation.picker.show_settings"
)}
-
+
${this.hass.localize(
`ui.panel.config.scene.picker.${this._getCategory(this._entityRegistryEntries, this._scene?.entity_id) ? "edit_category" : "assign_category"}`
)}
-
+
-
-
- ${this.hass.localize("ui.panel.config.automation.editor.edit_ui")}
- ${this._mode !== "yaml"
- ? html``
- : nothing}
-
-
- ${this.hass.localize("ui.panel.config.automation.editor.edit_yaml")}
- ${this._mode === "yaml"
- ? html``
- : nothing}
+ ${this.hass.localize(
+ `ui.panel.config.automation.editor.edit_${this._mode !== "yaml" ? "yaml" : "ui"}`
+ )}
+
@@ -717,17 +688,14 @@ export class HaSceneEditor extends SubscribeMixin(
if (this._mode === "yaml") {
this._initEntities(this._config!);
this._exitYamlMode();
- }
- break;
- case 5:
- if (this._mode !== "yaml") {
+ } else {
this._enterYamlMode();
}
break;
- case 6:
+ case 5:
this._duplicate();
break;
- case 7:
+ case 6:
this._deleteTapped();
break;
}
diff --git a/src/panels/config/script/ha-script-editor.ts b/src/panels/config/script/ha-script-editor.ts
index a9606e00bac4..033760471309 100644
--- a/src/panels/config/script/ha-script-editor.ts
+++ b/src/panels/config/script/ha-script-editor.ts
@@ -1,6 +1,5 @@
import "@material/mwc-button";
import {
- mdiCheck,
mdiContentDuplicate,
mdiContentSave,
mdiDebugStepOver,
@@ -10,6 +9,7 @@ import {
mdiFormTextbox,
mdiInformationOutline,
mdiPlay,
+ mdiPlaylistEdit,
mdiRenameBox,
mdiRobotConfused,
mdiTransitConnection,
@@ -245,27 +245,16 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
`
: nothing}
-
-
-
- ${this.hass.localize("ui.panel.config.automation.editor.edit_ui")}
- ${this._mode === "gui"
- ? html` `
- : ``}
-
-
- ${this.hass.localize("ui.panel.config.automation.editor.edit_yaml")}
- ${this._mode === "yaml"
- ? html``
- : ``}
+
+ ${this.hass.localize(
+ `ui.panel.config.automation.editor.edit_${this._mode === "gui" ? "yaml" : "ui"}`
+ )}
+
@@ -874,9 +863,6 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
ha-fab.dirty {
bottom: 0;
}
- .selected_menu_item {
- color: var(--primary-color);
- }
li[role="separator"] {
border-bottom-color: var(--divider-color);
}
diff --git a/src/panels/config/script/ha-script-field-row.ts b/src/panels/config/script/ha-script-field-row.ts
index a36bab0faa61..2542394ce953 100644
--- a/src/panels/config/script/ha-script-field-row.ts
+++ b/src/panels/config/script/ha-script-field-row.ts
@@ -1,6 +1,5 @@
import type { ActionDetail } from "@material/mwc-list/mwc-list-foundation";
-import "@material/mwc-list/mwc-list-item";
-import { mdiCheck, mdiDelete, mdiDotsVertical } from "@mdi/js";
+import { mdiDelete, mdiDotsVertical, mdiPlaylistEdit } from "@mdi/js";
import type { CSSResultGroup } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
@@ -13,6 +12,7 @@ import "../../../components/ha-button-menu";
import "../../../components/ha-card";
import "../../../components/ha-form/ha-form";
import "../../../components/ha-expansion-panel";
+import "../../../components/ha-list-item";
import type { SchemaUnion } from "../../../components/ha-form/types";
import "../../../components/ha-icon-button";
import "../../../components/ha-yaml-editor";
@@ -98,31 +98,17 @@ export default class HaScriptFieldRow extends LitElement {
.path=${mdiDotsVertical}
>
-
- ${this.hass.localize("ui.panel.config.automation.editor.edit_ui")}
- ${!this._yamlMode
- ? html` `
- : ``}
-
-
-
+
${this.hass.localize(
- "ui.panel.config.automation.editor.edit_yaml"
+ `ui.panel.config.automation.editor.edit_${!this._yamlMode ? "yaml" : "ui"}`
)}
- ${this._yamlMode
- ? html``
- : ``}
-
-
-
+
+
+
-
+
) {
switch (ev.detail.index) {
case 0:
- this._yamlMode = false;
+ this._yamlMode = !this._yamlMode;
break;
case 1:
- this._yamlMode = true;
- break;
- case 2:
this._onDelete();
break;
}
@@ -348,7 +331,7 @@ export default class HaScriptFieldRow extends LitElement {
border-top-left-radius: var(--ha-card-border-radius);
}
- mwc-list-item[disabled] {
+ ha-list-item[disabled] {
--mdc-theme-text-primary-on-background: var(--disabled-text-color);
}
.warning ul {