mirror of
https://github.com/home-assistant/frontend.git
synced 2026-11-19 11:22:50 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ddb899bbd |
No files matched your search
@@ -1,12 +1,18 @@
|
||||
import { mdiChevronUp } from "@mdi/js";
|
||||
import type { TemplateResult } from "lit";
|
||||
import { css, html, LitElement, nothing } from "lit";
|
||||
import { customElement, property, query } from "lit/decorators";
|
||||
import { customElement, property, query, state } from "lit/decorators";
|
||||
import { consumeLocalize } from "../../common/decorators/consume-context-entry";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import type { LocalizeFunc } from "../../common/translations/localize";
|
||||
import "../ha-icon-button";
|
||||
|
||||
@customElement("ha-automation-row")
|
||||
export class HaAutomationRow extends LitElement {
|
||||
@state()
|
||||
@consumeLocalize()
|
||||
private _localize!: LocalizeFunc;
|
||||
|
||||
@property({ attribute: "left-chevron", type: Boolean })
|
||||
public leftChevron = false;
|
||||
|
||||
@@ -77,6 +83,9 @@ export class HaAutomationRow extends LitElement {
|
||||
<ha-icon-button
|
||||
class="expand-button"
|
||||
.path=${mdiChevronUp}
|
||||
.label=${this._localize(
|
||||
this.collapsed ? "ui.common.expand" : "ui.common.collapse"
|
||||
)}
|
||||
@click=${this._handleExpand}
|
||||
@keydown=${this._handleExpand}
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -670,7 +670,7 @@ export class HaChartBase extends MobileAwareMixin(LitElement) {
|
||||
class="zoom-reset"
|
||||
.path=${mdiRestart}
|
||||
@click=${this._handleZoomReset}
|
||||
title=${this._i18n.localize(
|
||||
.label=${this._i18n.localize(
|
||||
"ui.components.history_charts.zoom_reset"
|
||||
)}
|
||||
></ha-icon-button>`
|
||||
|
||||
@@ -80,6 +80,9 @@ export class HaFilterBlueprints extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -150,6 +150,9 @@ export class HaFilterCategories extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { ContextType } from "@lit/context";
|
||||
import { customElement, state } from "lit/decorators";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { consume } from "../common/decorators/consume";
|
||||
import { consumeLocalize } from "../common/decorators/consume-context-entry";
|
||||
import { computeDomain } from "../common/entity/compute_domain";
|
||||
import type { LocalizeFunc } from "../common/translations/localize";
|
||||
import { stringCompare } from "../common/string/compare";
|
||||
@@ -20,10 +19,6 @@ export class HaFilterDeviceClasses extends HaFilterStates {
|
||||
@consume({ context: internationalizationContext, subscribe: true })
|
||||
private _i18n?: ContextType<typeof internationalizationContext>;
|
||||
|
||||
@state()
|
||||
@consumeLocalize()
|
||||
private _localize?: LocalizeFunc;
|
||||
|
||||
private _deviceClasses = memoizeOne(
|
||||
(
|
||||
states: ContextType<typeof statesContext>,
|
||||
|
||||
@@ -108,6 +108,9 @@ export class HaFilterDevices extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
@keydown=${this._handleClearFilterKeydown}
|
||||
></ha-icon-button>`
|
||||
|
||||
@@ -72,6 +72,9 @@ export class HaFilterDomains extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -114,6 +114,9 @@ export class HaFilterEntities extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -102,6 +102,9 @@ export class HaFilterEntityTypes extends LitElement {
|
||||
? html`<div class="badge">${count}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -144,6 +144,9 @@ export class HaFilterFloorAreas extends LitElement {
|
||||
? html`<div class="badge">${count}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
@keydown=${this._handleClearFilterKeydown}
|
||||
></ha-icon-button>`
|
||||
|
||||
@@ -98,6 +98,9 @@ export class HaFilterIntegrations extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -94,6 +94,9 @@ export class HaFilterLabels extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { mdiFilterVariantRemove } from "@mdi/js";
|
||||
import type { CSSResultGroup } from "lit";
|
||||
import { css, html, LitElement, nothing } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { ifDefined } from "lit/directives/if-defined";
|
||||
import { createRef, ref } from "lit/directives/ref";
|
||||
import {
|
||||
@@ -14,6 +14,8 @@ import type {
|
||||
HASSDomEvent,
|
||||
} from "../common/dom/fire_event";
|
||||
import { fireEvent } from "../common/dom/fire_event";
|
||||
import { consumeLocalize } from "../common/decorators/consume-context-entry";
|
||||
import type { LocalizeFunc } from "../common/translations/localize";
|
||||
import "./ha-expansion-panel";
|
||||
import "./ha-icon";
|
||||
import "./ha-icon-button";
|
||||
@@ -24,6 +26,10 @@ import type { HaListSelectable } from "./list/ha-list-selectable";
|
||||
|
||||
@customElement("ha-filter-states")
|
||||
export class HaFilterStates extends LitElement {
|
||||
@state()
|
||||
@consumeLocalize()
|
||||
protected _localize!: LocalizeFunc;
|
||||
|
||||
@property() public label?: string;
|
||||
|
||||
@property({ attribute: false }) public value?: string[];
|
||||
@@ -59,6 +65,9 @@ export class HaFilterStates extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
@@ -109,17 +118,17 @@ export class HaFilterStates extends LitElement {
|
||||
private _handleItemToggled(
|
||||
ev: HASSDomEvent<number> & HASSDomCurrentTargetEvent<HaListSelectable>
|
||||
) {
|
||||
const state = (
|
||||
const itemValue = (
|
||||
ev.currentTarget.items[ev.detail] as HaListItemOption | undefined
|
||||
)?.value;
|
||||
if (!state) {
|
||||
if (!itemValue) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.value =
|
||||
ev.type === "ha-list-item-selected"
|
||||
? arrayWith(this.value, state)
|
||||
: arrayWithout(this.value, state);
|
||||
? arrayWith(this.value, itemValue)
|
||||
: arrayWithout(this.value, itemValue);
|
||||
|
||||
fireEvent(this, "data-table-filter-changed", {
|
||||
value: this.value,
|
||||
|
||||
@@ -59,6 +59,9 @@ export class HaFilterVoiceAssistants extends LitElement {
|
||||
? html`<div class="badge">${this.value?.length}</div>
|
||||
<ha-icon-button
|
||||
.path=${mdiFilterVariantRemove}
|
||||
.label=${this._localize(
|
||||
"ui.components.subpage-data-table.clear_filter"
|
||||
)}
|
||||
@click=${this._clearFilter}
|
||||
></ha-icon-button>`
|
||||
: nothing
|
||||
|
||||
@@ -534,6 +534,9 @@ export class HaServiceControl extends LitElement {
|
||||
>
|
||||
<ha-icon-button
|
||||
.path=${mdiHelpCircleOutline}
|
||||
.label=${this.hass.localize(
|
||||
"ui.components.service-control.integration_doc"
|
||||
)}
|
||||
class="help-icon"
|
||||
></ha-icon-button>
|
||||
</a>`
|
||||
|
||||
@@ -121,7 +121,7 @@ class BrowseMediaTTS extends LitElement {
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
@click=${this._copyVoiceId}
|
||||
title=${this._localize(
|
||||
.label=${this._localize(
|
||||
"ui.components.media-browser.tts.copy_voice_id"
|
||||
)}
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -456,6 +456,7 @@ export class HaTargetPickerItemRow extends LitElement {
|
||||
? html`
|
||||
<ha-icon-button
|
||||
.path=${mdiClose}
|
||||
.label=${this._i18n.localize("ui.common.remove")}
|
||||
slot="end"
|
||||
@click=${this._removeItem}
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -11,8 +11,10 @@ import type { CSSResultGroup, PropertyValues } from "lit";
|
||||
import { LitElement, html, nothing } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { consume } from "../../../common/decorators/consume";
|
||||
import { consumeLocalize } from "../../../common/decorators/consume-context-entry";
|
||||
import { stateActive } from "../../../common/entity/state_active";
|
||||
import { supportsFeature } from "../../../common/entity/supports-feature";
|
||||
import type { LocalizeFunc } from "../../../common/translations/localize";
|
||||
import "../../../components/ha-attribute-icon";
|
||||
import "../../../components/ha-control-select-menu";
|
||||
import "../../../components/ha-outlined-icon-button";
|
||||
@@ -43,6 +45,10 @@ class MoreInfoFan extends LitElement {
|
||||
@consume({ context: apiContext, subscribe: true })
|
||||
private _api!: ContextType<typeof apiContext>;
|
||||
|
||||
@state()
|
||||
@consumeLocalize()
|
||||
private _localize!: LocalizeFunc;
|
||||
|
||||
@property({ attribute: false }) public stateObj?: FanEntity;
|
||||
|
||||
@state() public _presetMode?: string;
|
||||
@@ -182,6 +188,11 @@ class MoreInfoFan extends LitElement {
|
||||
? html`
|
||||
<div class="buttons">
|
||||
<ha-outlined-icon-button
|
||||
.label=${this._localize(
|
||||
this.stateObj.state === "on"
|
||||
? "ui.card.common.turn_off"
|
||||
: "ui.card.common.turn_on"
|
||||
)}
|
||||
.disabled=${this.stateObj.state === UNAVAILABLE}
|
||||
@click=${this._toggle}
|
||||
>
|
||||
|
||||
@@ -485,7 +485,8 @@ class MoreInfoMediaPlayer extends LitElement {
|
||||
|
||||
return html`<ha-icon-button
|
||||
@click=${this._showGroupMediaPlayers}
|
||||
.title=${this._localize("ui.card.media_player.join")}
|
||||
.label=${this._localize("ui.card.media_player.join")}
|
||||
hide-title
|
||||
id="grouping-button"
|
||||
>
|
||||
<div class="grouping">
|
||||
|
||||
@@ -72,6 +72,7 @@ export class HaConfigAppsRegistries extends LitElement {
|
||||
<ha-icon-button
|
||||
.registry=${row.registry}
|
||||
.path=${mdiDelete}
|
||||
.label=${localize("ui.panel.config.apps.registries.remove")}
|
||||
@click=${this._removeRegistry}
|
||||
class="delete"
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -104,6 +104,8 @@ export class HaConfigAppsRepositories extends LitElement {
|
||||
.disabled=${used}
|
||||
.slug=${row.slug}
|
||||
.path=${used ? mdiDeleteOff : mdiDelete}
|
||||
.label=${localize("ui.panel.config.apps.repositories.remove")}
|
||||
hide-title
|
||||
@click=${this._removeRepository}
|
||||
class="delete"
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -359,6 +359,9 @@ export class HaConfigAreasDashboard extends LitElement {
|
||||
<ha-icon-button
|
||||
.area=${area}
|
||||
.path=${mdiPencil}
|
||||
.label=${this.hass.localize(
|
||||
"ui.panel.config.areas.edit_settings"
|
||||
)}
|
||||
@click=${this._openAreaDetails}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
@@ -808,6 +808,7 @@ class DialogAddAutomationElement extends DialogMixin<AddAutomationElementDialogP
|
||||
></ha-icon-button-prev>`
|
||||
: html`<ha-icon-button
|
||||
.path=${mdiClose}
|
||||
.label=${this._i18n.localize("ui.common.close")}
|
||||
@click=${this._close}
|
||||
slot="navigationIcon"
|
||||
></ha-icon-button>`
|
||||
|
||||
@@ -214,6 +214,9 @@ class HaBackupConfigAgents extends LitElement {
|
||||
id=${agentId}
|
||||
slot="end"
|
||||
path=${mdiCog}
|
||||
.label=${this.hass.localize(
|
||||
"ui.panel.config.backup.agents.location_settings"
|
||||
)}
|
||||
@click=${this._showAgentSettings}
|
||||
></ha-icon-button>
|
||||
`
|
||||
@@ -255,6 +258,7 @@ class HaBackupConfigAgents extends LitElement {
|
||||
id=${agentId}
|
||||
slot="end"
|
||||
path=${mdiDelete}
|
||||
.label=${this.hass.localize("ui.common.remove")}
|
||||
@click=${this._deleteAgent}
|
||||
></ha-icon-button>
|
||||
</ha-list-item-base>
|
||||
|
||||
@@ -378,6 +378,7 @@ class DialogBackupOnboarding
|
||||
<p>${this._config.create_backup.password}</p>
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
.label=${this.hass.localize("ui.common.copy")}
|
||||
@click=${this._copyKeyToClipboard}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
@@ -160,6 +160,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
<p>${this._params?.currentKey}</p>
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
.label=${this.hass.localize("ui.common.copy")}
|
||||
@click=${this._copyOldKeyToClipboard}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
@@ -197,6 +198,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
<p>${this._newEncryptionKey}</p>
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
.label=${this.hass.localize("ui.common.copy")}
|
||||
@click=${this._copyKeyToClipboard}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
@@ -133,6 +133,7 @@ class DialogSetBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
<p>${this._newEncryptionKey}</p>
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
.label=${this.hass.localize("ui.common.copy")}
|
||||
@click=${this._copyKeyToClipboard}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
@@ -68,6 +68,7 @@ class DialogShowBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
<p>${this._params?.currentKey}</p>
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
.label=${this.hass.localize("ui.common.copy")}
|
||||
@click=${this._copyKeyToClipboard}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
@@ -187,6 +187,9 @@ export class HaConfigEntryRow extends LitElement {
|
||||
? html`<ha-icon-button
|
||||
class="expand-button ${classMap({ expanded: this._expanded })}"
|
||||
.path=${mdiChevronDown}
|
||||
.label=${this.hass.localize(
|
||||
this._expanded ? "ui.common.collapse" : "ui.common.expand"
|
||||
)}
|
||||
slot="start"
|
||||
@click=${this._toggleExpand}
|
||||
></ha-icon-button>`
|
||||
|
||||
@@ -68,6 +68,9 @@ class HaConfigSubEntryRow extends LitElement {
|
||||
? html`<ha-icon-button
|
||||
class="expand-button ${classMap({ expanded: this._expanded })}"
|
||||
.path=${mdiChevronDown}
|
||||
.label=${this.hass.localize(
|
||||
this._expanded ? "ui.common.collapse" : "ui.common.expand"
|
||||
)}
|
||||
slot="start"
|
||||
@click=${this._toggleExpand}
|
||||
></ha-icon-button>`
|
||||
|
||||
@@ -191,6 +191,7 @@ class DialogMatterLockManage extends LitElement {
|
||||
<ha-icon-button
|
||||
slot="end"
|
||||
.path=${mdiDelete}
|
||||
.label=${this.hass.localize("ui.common.delete")}
|
||||
.user=${user}
|
||||
@click=${this._handleDeleteUserClick}
|
||||
@keydown=${stopKeydownEnterSpacePropagation}
|
||||
|
||||
@@ -136,6 +136,7 @@ class MqttSubscribeCard extends LitElement {
|
||||
<ha-icon-button
|
||||
class="copy-button"
|
||||
.path=${mdiContentCopy}
|
||||
.label=${this.hass.localize("ui.common.copy")}
|
||||
@click=${this._handleCopyClick}
|
||||
data-payload=${msg.payload}
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -406,7 +406,12 @@ class ViewMountDialog extends DirtyStateProviderMixin<
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<ha-icon-button .path=${mdiHelpCircleOutline}></ha-icon-button>
|
||||
<ha-icon-button
|
||||
.path=${mdiHelpCircleOutline}
|
||||
.label=${this._i18n.localize(
|
||||
"ui.panel.config.storage.network_mounts.documentation"
|
||||
)}
|
||||
></ha-icon-button>
|
||||
</a>
|
||||
${
|
||||
this._error
|
||||
|
||||
@@ -240,7 +240,7 @@ class HaPanelDevState extends LitElement {
|
||||
<ha-icon-button
|
||||
.path=${mdiContentCopy}
|
||||
@click=${this._copyStateEntity}
|
||||
title=${this._i18n.localize(
|
||||
.label=${this._i18n.localize(
|
||||
"ui.panel.config.tools.tabs.states.copy_id"
|
||||
)}
|
||||
></ha-icon-button>
|
||||
|
||||
@@ -164,6 +164,7 @@ export class DialogVoiceAssistantPipelineDetail extends DirtyStateProviderMixin<
|
||||
>
|
||||
<ha-icon-button
|
||||
.path=${mdiDotsVertical}
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
slot="trigger"
|
||||
></ha-icon-button>
|
||||
<ha-dropdown-item value="show_wake_word">
|
||||
|
||||
@@ -204,6 +204,9 @@ export class VoiceAssistantsExpose extends LitElement {
|
||||
html`<ha-icon-button
|
||||
@click=${this._removeEntity}
|
||||
.path=${mdiCloseCircleOutline}
|
||||
.label=${localize(
|
||||
"ui.panel.config.voice_assistants.expose.headers.remove"
|
||||
)}
|
||||
></ha-icon-button>`,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -183,6 +183,7 @@ export class HuiLightCard extends LitElement implements LovelaceCard {
|
||||
"state-on": stateObj.state === "on",
|
||||
"state-unavailable": stateObj.state === UNAVAILABLE,
|
||||
})}"
|
||||
.label=${name}
|
||||
.disabled=${stateObj.state === UNAVAILABLE}
|
||||
style=${styleMap({
|
||||
filter: this._computeBrightness(stateObj),
|
||||
|
||||
@@ -300,7 +300,7 @@ class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
|
||||
class=${classMap({
|
||||
"state-on": stateActive(stateObj),
|
||||
})}
|
||||
title=${`${this.hass.formatEntityName(
|
||||
.label=${`${this.hass.formatEntityName(
|
||||
stateObj,
|
||||
entityConf.name
|
||||
)} : ${this.hass.formatEntityState(stateObj)}`}
|
||||
|
||||
@@ -535,7 +535,7 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||
slot="end"
|
||||
class="addButton"
|
||||
.path=${mdiPlus}
|
||||
.title=${this._i18n.localize(
|
||||
.label=${this._i18n.localize(
|
||||
"ui.panel.lovelace.cards.todo-list.add_item"
|
||||
)}
|
||||
.disabled=${unavailable}
|
||||
@@ -651,6 +651,9 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.path=${mdiDotsVertical}
|
||||
.label=${this._i18n.localize(
|
||||
"ui.common.menu"
|
||||
)}
|
||||
></ha-icon-button>
|
||||
<ha-dropdown-item
|
||||
value="clear"
|
||||
@@ -693,6 +696,7 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.path=${mdiDotsVertical}
|
||||
.label=${this._i18n.localize("ui.common.menu")}
|
||||
></ha-icon-button>
|
||||
<ha-dropdown-item value="reorder">
|
||||
${this._i18n.localize(
|
||||
@@ -806,7 +810,7 @@ export class HuiTodoListCard extends LitElement implements LovelaceCard {
|
||||
`
|
||||
: showDelete
|
||||
? html`<ha-icon-button
|
||||
.title=${this._i18n.localize(
|
||||
.label=${this._i18n.localize(
|
||||
"ui.panel.lovelace.cards.todo-list.delete_item"
|
||||
)}
|
||||
class="deleteItemButton"
|
||||
|
||||
@@ -123,7 +123,11 @@ export class HuiBadgeEditMode extends LitElement {
|
||||
@opened=${this._handleOpened}
|
||||
@closed=${this._handleClosed}
|
||||
>
|
||||
<ha-icon-button slot="trigger" .path=${mdiDotsVertical}>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.path=${mdiDotsVertical}
|
||||
.label=${this._localize("ui.common.menu")}
|
||||
>
|
||||
</ha-icon-button>
|
||||
<ha-dropdown-item value="edit">
|
||||
<ha-svg-icon slot="icon" .path=${mdiPencil}></ha-svg-icon>
|
||||
|
||||
@@ -165,7 +165,11 @@ export class HuiCardEditMode extends LitElement {
|
||||
placement="bottom-end"
|
||||
@wa-select=${this._handleDropdownSelect}
|
||||
>
|
||||
<ha-icon-button slot="trigger" .path=${mdiDotsVertical}>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.path=${mdiDotsVertical}
|
||||
.label=${this._localize("ui.common.menu")}
|
||||
>
|
||||
</ha-icon-button>
|
||||
${
|
||||
this.noEdit
|
||||
|
||||
@@ -217,7 +217,7 @@ export class HuiDialogEditBadge
|
||||
.path=${mdiHelpCircleOutline}
|
||||
slot="headerActionItems"
|
||||
.href=${this._documentationURL}
|
||||
title=${this.hass!.localize("ui.panel.lovelace.menu.help")}
|
||||
.label=${this.hass!.localize("ui.panel.lovelace.menu.help")}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
dir=${computeRTLDirection(this.hass)}
|
||||
|
||||
@@ -229,7 +229,7 @@ export class HuiDialogEditCard
|
||||
.path=${mdiHelpCircleOutline}
|
||||
slot="headerActionItems"
|
||||
href=${this._documentationURL}
|
||||
title=${this.hass!.localize("ui.panel.lovelace.menu.help")}
|
||||
.label=${this.hass!.localize("ui.panel.lovelace.menu.help")}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
dir=${computeRTLDirection(this.hass)}
|
||||
|
||||
@@ -139,6 +139,9 @@ export class HuiStackCardEditor
|
||||
<ha-icon-button
|
||||
@click=${this._handleAddCard}
|
||||
.path=${mdiPlus}
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.editor.edit_card.add"
|
||||
)}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ class HUIRoot extends KeyboardShortcutMixin(LitElement) {
|
||||
html`<ha-icon-button
|
||||
slot="toolbar-icon"
|
||||
.path=${mdiUndo}
|
||||
.label=${this.hass.localize("ui.common.undo")}
|
||||
hide-title
|
||||
@click=${this._undo}
|
||||
.disabled=${!this._undoRedoController.canUndo}
|
||||
id="button-undo"
|
||||
@@ -210,6 +212,8 @@ class HUIRoot extends KeyboardShortcutMixin(LitElement) {
|
||||
<ha-icon-button
|
||||
slot="toolbar-icon"
|
||||
.path=${mdiRedo}
|
||||
.label=${this.hass.localize("ui.common.redo")}
|
||||
hide-title
|
||||
@click=${this._redo}
|
||||
.disabled=${!this._undoRedoController.canRedo}
|
||||
id="button-redo"
|
||||
@@ -559,7 +563,7 @@ class HUIRoot extends KeyboardShortcutMixin(LitElement) {
|
||||
></ha-icon-button>
|
||||
${tabContent}
|
||||
<ha-icon-button
|
||||
.title=${this.hass!.localize(
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.lovelace.editor.edit_view.edit"
|
||||
)}
|
||||
class="edit-icon view"
|
||||
|
||||
@@ -345,6 +345,7 @@ export class BarMediaPlayer extends SubscribeMixin(LitElement) {
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.path=${mdiVolumeHigh}
|
||||
.label=${this.hass.localize("ui.card.media_player.volume")}
|
||||
></ha-icon-button>
|
||||
<div
|
||||
class="volume-slider-container"
|
||||
|
||||
@@ -301,7 +301,8 @@
|
||||
"media_players": "Media players",
|
||||
"select_all": "Select all",
|
||||
"idle": "Idle",
|
||||
"track_position": "Track position"
|
||||
"track_position": "Track position",
|
||||
"volume": "Volume"
|
||||
},
|
||||
"persistent_notification": {
|
||||
"dismiss": "Dismiss"
|
||||
@@ -493,6 +494,8 @@
|
||||
"update": "Update",
|
||||
"hide": "Hide",
|
||||
"close": "Close",
|
||||
"expand": "Expand",
|
||||
"collapse": "Collapse",
|
||||
"dismiss_alert": "Dismiss alert",
|
||||
"clear": "Clear",
|
||||
"leave": "Leave",
|
||||
@@ -3929,6 +3932,7 @@
|
||||
"no_agents": "No locations configured",
|
||||
"encryption_turned_off": "Encryption turned off",
|
||||
"local_agent": "This system",
|
||||
"location_settings": "Location settings",
|
||||
"retention_all": "Keep all backups",
|
||||
"retention_backups": "Keep {count} {count, plural,\n one {backup}\n other {backups}\n}",
|
||||
"retention_days": "Keep {count} {count, plural,\n one {day}\n other {days}\n}"
|
||||
|
||||
Reference in new issue
Block a user