Rename safe mode to recovery mode (#18374)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Erik Montnemery 2023-10-24 12:56:27 +02:00 committed by GitHub
parent 6ffc0625d3
commit 1fdf609606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 21 deletions

View File

@ -114,7 +114,7 @@
"fuse.js": "6.6.2",
"google-timezones-json": "1.2.0",
"hls.js": "1.4.12",
"home-assistant-js-websocket": "8.2.0",
"home-assistant-js-websocket": "9.0.0",
"idb-keyval": "6.2.1",
"intl-messageformat": "10.5.4",
"js-yaml": "4.1.0",

View File

@ -21,7 +21,7 @@ export const demoConfig: HassConfig = {
allowlist_external_dirs: [],
allowlist_external_urls: [],
config_source: "storage",
safe_mode: false,
recovery_mode: false,
state: STATE_RUNNING,
internal_url: "http://homeassistant.local:8123",
external_url: null,

View File

@ -105,7 +105,7 @@ class ErrorLogCard extends LitElement {
protected firstUpdated(changedProps: PropertyValues) {
super.firstUpdated(changedProps);
if (this.hass?.config.safe_mode || this.show) {
if (this.hass?.config.recovery_mode || this.show) {
this.hass.loadFragmentTranslation("config");
this._refreshLogs();
}

View File

@ -6,8 +6,8 @@ import { HomeAssistant } from "../../../types";
import "../../config/logs/error-log-card";
import { LovelaceCard } from "../types";
@customElement("hui-safe-mode-card")
export class HuiSafeModeCard extends LitElement implements LovelaceCard {
@customElement("hui-recovery-mode-card")
export class HuiRecoveryModeCard extends LitElement implements LovelaceCard {
@property({ attribute: false }) public hass?: HomeAssistant;
public getCardSize(): number {
@ -22,12 +22,12 @@ export class HuiSafeModeCard extends LitElement implements LovelaceCard {
return html`
<ha-card
.header=${this.hass!.localize(
"ui.panel.lovelace.cards.safe-mode.header"
"ui.panel.lovelace.cards.recovery-mode.header"
)}
>
<div class="card-content">
${this.hass!.localize(
"ui.panel.lovelace.cards.safe-mode.description"
"ui.panel.lovelace.cards.recovery-mode.description"
)}
</div>
<error-log-card .hass=${this.hass}></error-log-card>
@ -50,6 +50,6 @@ export class HuiSafeModeCard extends LitElement implements LovelaceCard {
declare global {
interface HTMLElementTagNameMap {
"hui-safe-mode-card": HuiSafeModeCard;
"hui-recovery-mode-card": HuiRecoveryModeCard;
}
}

View File

@ -77,7 +77,7 @@ const LAZY_LOAD_TYPES = {
"picture-glance": () => import("../cards/hui-picture-glance-card"),
picture: () => import("../cards/hui-picture-card"),
"plant-status": () => import("../cards/hui-plant-status-card"),
"safe-mode": () => import("../cards/hui-safe-mode-card"),
"recovery-mode": () => import("../cards/hui-recovery-mode-card"),
"shopping-list": () => import("../cards/hui-shopping-list-card"),
starting: () => import("../cards/hui-starting-card"),
"statistics-graph": () => import("../cards/hui-statistics-graph-card"),

View File

@ -407,7 +407,7 @@ class HUIRoot extends LitElement {
`
: ""}
${this.hass!.user?.is_admin &&
!this.hass!.config.safe_mode
!this.hass!.config.recovery_mode
? html`
<mwc-list-item
graphic="icon"
@ -691,7 +691,7 @@ class HUIRoot extends LitElement {
return (
(this.narrow && this._conversation(this.hass.config.components)) ||
this._editMode ||
(this.hass!.user?.is_admin && !this.hass!.config.safe_mode) ||
(this.hass!.user?.is_admin && !this.hass!.config.recovery_mode) ||
(this.hass.panels.lovelace?.config as LovelacePanelConfig)?.mode ===
"yaml" ||
this._yamlMode

View File

@ -22,9 +22,9 @@ export class OriginalStatesViewStrategy extends ReactiveElement {
};
}
if (hass.config.safe_mode) {
if (hass.config.recovery_mode) {
return {
cards: [{ type: "safe-mode" }],
cards: [{ type: "recovery-mode" }],
};
}

View File

@ -4490,9 +4490,9 @@
"iframe": {
"error_secure_context": "Unable to load iframes pointing at websites using {target_protocol} if Home Assistant is served over {context_protocol}."
},
"safe-mode": {
"header": "Safe mode activated",
"description": "Home Assistant ran into trouble while loading your configuration and is now running in safe mode. Take a look at the error log to see what went wrong."
"recovery-mode": {
"header": "Recovery mode activated",
"description": "Home Assistant ran into trouble while loading your configuration and is now running in recovery mode. Take a look at the error log to see what went wrong."
},
"starting": {
"description": "Home Assistant is starting, please wait…"

View File

@ -9789,7 +9789,7 @@ __metadata:
gulp-rename: 2.0.0
gulp-zopfli-green: 6.0.1
hls.js: 1.4.12
home-assistant-js-websocket: 8.2.0
home-assistant-js-websocket: 9.0.0
html-minifier-terser: 7.2.0
husky: 8.0.3
idb-keyval: 6.2.1
@ -9865,10 +9865,10 @@ __metadata:
languageName: unknown
linkType: soft
"home-assistant-js-websocket@npm:8.2.0":
version: 8.2.0
resolution: "home-assistant-js-websocket@npm:8.2.0"
checksum: 4eacdfe8d1bd35492ff77079779e2e0a1967b20a46b168752d8c037bf155fa5d2a8e898e7d1aee5514976d93589d26fe2d6c1975e4fcb039b0beff852564c64c
"home-assistant-js-websocket@npm:9.0.0":
version: 9.0.0
resolution: "home-assistant-js-websocket@npm:9.0.0"
checksum: c1543483f55c1d135400b9bd6dce084b5942f57dc8098f4c84c6ece7b8289c558dc6578c45c94eecde99fec134041d8c4f458492e2573875bfb706df70ffd902
languageName: node
linkType: hard