mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-12 02:57:25 +00:00
Compare commits
1 Commits
checkbox-i
...
shortcut-n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9eeeed5d5d |
@@ -63,6 +63,11 @@ const _SHORTCUTS: Section[] = [
|
|||||||
descriptionTranslationKey:
|
descriptionTranslationKey:
|
||||||
"ui.dialogs.shortcuts.searching.search_in_table",
|
"ui.dialogs.shortcuts.searching.search_in_table",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
shortcut: ["N"],
|
||||||
|
descriptionTranslationKey:
|
||||||
|
"ui.dialogs.shortcuts.searching.new_in_table",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,6 +190,21 @@ export class HaTabsSubpageDataTable extends KeyboardShortcutMixin(LitElement) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected supportedSingleKeyShortcuts(): SupportedShortcuts {
|
||||||
|
if (this.hasFab) {
|
||||||
|
return {
|
||||||
|
n: () => {
|
||||||
|
const fab = this.querySelector<HTMLElement>('[slot="fab"]');
|
||||||
|
if (fab) {
|
||||||
|
fab.click();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
private _showPaneController = new ResizeController(this, {
|
private _showPaneController = new ResizeController(this, {
|
||||||
callback: (entries) => entries[0]?.contentRect.width > 750,
|
callback: (entries) => entries[0]?.contentRect.width > 750,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -968,6 +968,12 @@ class HaConfigIntegrationsDashboard extends KeyboardShortcutMixin(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected supportedSingleKeyShortcuts(): SupportedShortcuts {
|
||||||
|
return {
|
||||||
|
n: () => this._createFlow(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return [
|
return [
|
||||||
haStyle,
|
haStyle,
|
||||||
|
|||||||
@@ -47,9 +47,12 @@ import { configSections } from "../ha-panel-config";
|
|||||||
import { showHomeZoneDetailDialog } from "./show-dialog-home-zone-detail";
|
import { showHomeZoneDetailDialog } from "./show-dialog-home-zone-detail";
|
||||||
import { showZoneDetailDialog } from "./show-dialog-zone-detail";
|
import { showZoneDetailDialog } from "./show-dialog-zone-detail";
|
||||||
import { slugify } from "../../../common/string/slugify";
|
import { slugify } from "../../../common/string/slugify";
|
||||||
|
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
|
||||||
|
|
||||||
@customElement("ha-config-zone")
|
@customElement("ha-config-zone")
|
||||||
export class HaConfigZone extends SubscribeMixin(LitElement) {
|
export class HaConfigZone extends KeyboardShortcutMixin(
|
||||||
|
SubscribeMixin(LitElement)
|
||||||
|
) {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property({ attribute: "is-wide", type: Boolean }) public isWide = false;
|
@property({ attribute: "is-wide", type: Boolean }) public isWide = false;
|
||||||
@@ -537,6 +540,12 @@ export class HaConfigZone extends SubscribeMixin(LitElement) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected supportedSingleKeyShortcuts(): SupportedShortcuts {
|
||||||
|
return {
|
||||||
|
n: () => this._createZone(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
hass-loading-screen {
|
hass-loading-screen {
|
||||||
--app-header-background-color: var(--sidebar-background-color);
|
--app-header-background-color: var(--sidebar-background-color);
|
||||||
|
|||||||
@@ -2125,7 +2125,8 @@
|
|||||||
"search_command": "search command",
|
"search_command": "search command",
|
||||||
"search_entities": "search entities",
|
"search_entities": "search entities",
|
||||||
"search_devices": "search devices",
|
"search_devices": "search devices",
|
||||||
"search_in_table": "to search in tables"
|
"search_in_table": "to search in tables",
|
||||||
|
"new_in_table": "to create a new item in tables"
|
||||||
},
|
},
|
||||||
"assist": {
|
"assist": {
|
||||||
"title": "Assist",
|
"title": "Assist",
|
||||||
|
|||||||
Reference in New Issue
Block a user