mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-20 16:27:13 +00:00
Add keyboard shortcut to save automation/scene/script (#7207)
This commit is contained in:
committed by
GitHub
parent
7d6911b140
commit
0f0a3fdaf7
@@ -34,6 +34,7 @@ import {
|
||||
} from "../../../data/script";
|
||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||
import "../../../layouts/ha-app-layout";
|
||||
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
import { documentationUrl } from "../../../util/documentation-url";
|
||||
@@ -43,7 +44,7 @@ import { HaDeviceAction } from "../automation/action/types/ha-automation-action-
|
||||
import "../ha-config-section";
|
||||
import { configSections } from "../ha-panel-config";
|
||||
|
||||
export class HaScriptEditor extends LitElement {
|
||||
export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property() public scriptEntityId!: string;
|
||||
@@ -456,6 +457,10 @@ export class HaScriptEditor extends LitElement {
|
||||
);
|
||||
}
|
||||
|
||||
protected handleKeyboardSave() {
|
||||
this._saveScript();
|
||||
}
|
||||
|
||||
static get styles(): CSSResult[] {
|
||||
return [
|
||||
haStyle,
|
||||
|
||||
Reference in New Issue
Block a user