mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Fix localize key error in developer tools & remove exception (#14045)
This commit is contained in:
parent
c468fba36f
commit
1442f6d546
@ -42,7 +42,6 @@ export type LocalizeKeys =
|
|||||||
| `ui.panel.config.url.${string}`
|
| `ui.panel.config.url.${string}`
|
||||||
| `ui.panel.config.zha.${string}`
|
| `ui.panel.config.zha.${string}`
|
||||||
| `ui.panel.config.zwave_js.${string}`
|
| `ui.panel.config.zwave_js.${string}`
|
||||||
| `ui.panel.developer-tools.tabs.${string}`
|
|
||||||
| `ui.panel.lovelace.card.${string}`
|
| `ui.panel.lovelace.card.${string}`
|
||||||
| `ui.panel.lovelace.editor.${string}`
|
| `ui.panel.lovelace.editor.${string}`
|
||||||
| `ui.panel.page-authorize.form.${string}`
|
| `ui.panel.page-authorize.form.${string}`
|
||||||
|
@ -9,7 +9,12 @@ import { checkCoreConfig } from "../../../data/core";
|
|||||||
import { domainToName } from "../../../data/integration";
|
import { domainToName } from "../../../data/integration";
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import { haStyle } from "../../../resources/styles";
|
import { haStyle } from "../../../resources/styles";
|
||||||
import type { HomeAssistant, Route } from "../../../types";
|
import type { HomeAssistant, Route, TranslationDict } from "../../../types";
|
||||||
|
|
||||||
|
type ReloadableDomain = Exclude<
|
||||||
|
keyof TranslationDict["ui"]["panel"]["developer-tools"]["tabs"]["yaml"]["section"]["reloading"],
|
||||||
|
"heading" | "introduction" | "reload"
|
||||||
|
>;
|
||||||
|
|
||||||
@customElement("developer-yaml-config")
|
@customElement("developer-yaml-config")
|
||||||
export class DeveloperYamlConfig extends LitElement {
|
export class DeveloperYamlConfig extends LitElement {
|
||||||
@ -25,7 +30,7 @@ export class DeveloperYamlConfig extends LitElement {
|
|||||||
|
|
||||||
@state() private _validating = false;
|
@state() private _validating = false;
|
||||||
|
|
||||||
@state() private _reloadableDomains: string[] = [];
|
@state() private _reloadableDomains: ReloadableDomain[] = [];
|
||||||
|
|
||||||
@state() private _isValid: boolean | null = null;
|
@state() private _isValid: boolean | null = null;
|
||||||
|
|
||||||
@ -40,7 +45,7 @@ export class DeveloperYamlConfig extends LitElement {
|
|||||||
this._reloadableDomains = componentsWithService(
|
this._reloadableDomains = componentsWithService(
|
||||||
this.hass,
|
this.hass,
|
||||||
"reload"
|
"reload"
|
||||||
).sort();
|
).sort() as ReloadableDomain[];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +102,7 @@ export class DeveloperYamlConfig extends LitElement {
|
|||||||
<mwc-button
|
<mwc-button
|
||||||
class="warning"
|
class="warning"
|
||||||
@click=${this._restart}
|
@click=${this._restart}
|
||||||
.disabled=${this._validateLog}
|
.disabled=${!!this._validateLog}
|
||||||
>
|
>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.developer-tools.tabs.yaml.section.server_management.restart"
|
"ui.panel.developer-tools.tabs.yaml.section.server_management.restart"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user