mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
20250430.2 (#25246)
This commit is contained in:
commit
e517175f68
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "home-assistant-frontend"
|
||||
version = "20250430.1"
|
||||
version = "20250430.2"
|
||||
license = "Apache-2.0"
|
||||
license-files = ["LICENSE*"]
|
||||
description = "The Home Assistant frontend"
|
||||
|
@ -71,7 +71,7 @@ const DOMAIN_STYLE = styleMap({
|
||||
});
|
||||
|
||||
const ENTITY_ID_STYLE = styleMap({
|
||||
fontFamily: "var(--code-font-family, monospace)",
|
||||
fontFamily: "var(--ha-font-family-code)",
|
||||
fontSize: "var(--ha-font-size-xs)",
|
||||
});
|
||||
|
||||
|
@ -48,7 +48,7 @@ interface StatisticItem {
|
||||
const TYPE_ORDER = ["entity", "external", "no_state"] as StatisticItemType[];
|
||||
|
||||
const ENTITY_ID_STYLE = styleMap({
|
||||
fontFamily: "var(--code-font-family, monospace)",
|
||||
fontFamily: "var(--ha-font-family-code)",
|
||||
fontSize: "11px",
|
||||
});
|
||||
|
||||
|
@ -24,6 +24,10 @@ export class HaToast extends Snackbar {
|
||||
max-width: 650px;
|
||||
}
|
||||
|
||||
.mdc-snackbar__actions {
|
||||
color: rgba(255, 255, 255, 0.87);
|
||||
}
|
||||
|
||||
/* Revert the default styles set by mwc-snackbar */
|
||||
@media (max-width: 480px), (max-width: 344px) {
|
||||
.mdc-snackbar__surface {
|
||||
|
@ -314,8 +314,24 @@ export class HaManualAutomationEditor extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
const loaded: any = load(paste);
|
||||
if (loaded) {
|
||||
let loaded: any;
|
||||
try {
|
||||
loaded = load(paste);
|
||||
} catch (_err: any) {
|
||||
showToast(this, {
|
||||
message: this.hass.localize(
|
||||
"ui.panel.config.automation.editor.paste_invalid_yaml"
|
||||
),
|
||||
duration: 4000,
|
||||
dismissable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!loaded || typeof loaded !== "object") {
|
||||
return;
|
||||
}
|
||||
|
||||
let config = loaded;
|
||||
|
||||
if ("automation" in config) {
|
||||
@ -411,7 +427,6 @@ export class HaManualAutomationEditor extends LitElement {
|
||||
// replace the config completely
|
||||
this._replaceExistingConfig(normalized);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private _appendToExistingConfig(config: ManualAutomationConfig) {
|
||||
|
@ -238,8 +238,24 @@ export class HaManualScriptEditor extends LitElement {
|
||||
return;
|
||||
}
|
||||
|
||||
const loaded: any = load(paste);
|
||||
if (loaded) {
|
||||
let loaded: any;
|
||||
try {
|
||||
loaded = load(paste);
|
||||
} catch (_err: any) {
|
||||
showToast(this, {
|
||||
message: this.hass.localize(
|
||||
"ui.panel.config.script.editor.paste_invalid_config"
|
||||
),
|
||||
duration: 4000,
|
||||
dismissable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!loaded || typeof loaded !== "object") {
|
||||
return;
|
||||
}
|
||||
|
||||
let config = loaded;
|
||||
|
||||
if ("script" in config) {
|
||||
@ -307,7 +323,6 @@ export class HaManualScriptEditor extends LitElement {
|
||||
// replace the config completely
|
||||
this._replaceExistingConfig(normalized);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private _appendToExistingConfig(config: ScriptConfig) {
|
||||
|
@ -4356,6 +4356,7 @@
|
||||
"text": "How do you want to paste your automation?"
|
||||
},
|
||||
"paste_toast_message": "Pasted automation from clipboard",
|
||||
"paste_invalid_yaml": "Pasted value is not valid YAML",
|
||||
"paste_invalid_config": "Pasted automation is not editable in the visual editor"
|
||||
},
|
||||
"trace": {
|
||||
@ -4595,6 +4596,7 @@
|
||||
"text": "How do you want to paste your script?"
|
||||
},
|
||||
"paste_toast_message": "Pasted script from clipboard",
|
||||
"paste_invalid_yaml": "Pasted value is not valid YAML",
|
||||
"paste_invalid_config": "Pasted script is not editable in the visual editor"
|
||||
},
|
||||
"trace": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user