mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Rename safe mode to recovery mode (#18374)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
6ffc0625d3
commit
1fdf609606
@ -114,7 +114,7 @@
|
|||||||
"fuse.js": "6.6.2",
|
"fuse.js": "6.6.2",
|
||||||
"google-timezones-json": "1.2.0",
|
"google-timezones-json": "1.2.0",
|
||||||
"hls.js": "1.4.12",
|
"hls.js": "1.4.12",
|
||||||
"home-assistant-js-websocket": "8.2.0",
|
"home-assistant-js-websocket": "9.0.0",
|
||||||
"idb-keyval": "6.2.1",
|
"idb-keyval": "6.2.1",
|
||||||
"intl-messageformat": "10.5.4",
|
"intl-messageformat": "10.5.4",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
|
@ -21,7 +21,7 @@ export const demoConfig: HassConfig = {
|
|||||||
allowlist_external_dirs: [],
|
allowlist_external_dirs: [],
|
||||||
allowlist_external_urls: [],
|
allowlist_external_urls: [],
|
||||||
config_source: "storage",
|
config_source: "storage",
|
||||||
safe_mode: false,
|
recovery_mode: false,
|
||||||
state: STATE_RUNNING,
|
state: STATE_RUNNING,
|
||||||
internal_url: "http://homeassistant.local:8123",
|
internal_url: "http://homeassistant.local:8123",
|
||||||
external_url: null,
|
external_url: null,
|
||||||
|
@ -105,7 +105,7 @@ class ErrorLogCard extends LitElement {
|
|||||||
protected firstUpdated(changedProps: PropertyValues) {
|
protected firstUpdated(changedProps: PropertyValues) {
|
||||||
super.firstUpdated(changedProps);
|
super.firstUpdated(changedProps);
|
||||||
|
|
||||||
if (this.hass?.config.safe_mode || this.show) {
|
if (this.hass?.config.recovery_mode || this.show) {
|
||||||
this.hass.loadFragmentTranslation("config");
|
this.hass.loadFragmentTranslation("config");
|
||||||
this._refreshLogs();
|
this._refreshLogs();
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import { HomeAssistant } from "../../../types";
|
|||||||
import "../../config/logs/error-log-card";
|
import "../../config/logs/error-log-card";
|
||||||
import { LovelaceCard } from "../types";
|
import { LovelaceCard } from "../types";
|
||||||
|
|
||||||
@customElement("hui-safe-mode-card")
|
@customElement("hui-recovery-mode-card")
|
||||||
export class HuiSafeModeCard extends LitElement implements LovelaceCard {
|
export class HuiRecoveryModeCard extends LitElement implements LovelaceCard {
|
||||||
@property({ attribute: false }) public hass?: HomeAssistant;
|
@property({ attribute: false }) public hass?: HomeAssistant;
|
||||||
|
|
||||||
public getCardSize(): number {
|
public getCardSize(): number {
|
||||||
@ -22,12 +22,12 @@ export class HuiSafeModeCard extends LitElement implements LovelaceCard {
|
|||||||
return html`
|
return html`
|
||||||
<ha-card
|
<ha-card
|
||||||
.header=${this.hass!.localize(
|
.header=${this.hass!.localize(
|
||||||
"ui.panel.lovelace.cards.safe-mode.header"
|
"ui.panel.lovelace.cards.recovery-mode.header"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
${this.hass!.localize(
|
${this.hass!.localize(
|
||||||
"ui.panel.lovelace.cards.safe-mode.description"
|
"ui.panel.lovelace.cards.recovery-mode.description"
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<error-log-card .hass=${this.hass}></error-log-card>
|
<error-log-card .hass=${this.hass}></error-log-card>
|
||||||
@ -50,6 +50,6 @@ export class HuiSafeModeCard extends LitElement implements LovelaceCard {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"hui-safe-mode-card": HuiSafeModeCard;
|
"hui-recovery-mode-card": HuiRecoveryModeCard;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -77,7 +77,7 @@ const LAZY_LOAD_TYPES = {
|
|||||||
"picture-glance": () => import("../cards/hui-picture-glance-card"),
|
"picture-glance": () => import("../cards/hui-picture-glance-card"),
|
||||||
picture: () => import("../cards/hui-picture-card"),
|
picture: () => import("../cards/hui-picture-card"),
|
||||||
"plant-status": () => import("../cards/hui-plant-status-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"),
|
"shopping-list": () => import("../cards/hui-shopping-list-card"),
|
||||||
starting: () => import("../cards/hui-starting-card"),
|
starting: () => import("../cards/hui-starting-card"),
|
||||||
"statistics-graph": () => import("../cards/hui-statistics-graph-card"),
|
"statistics-graph": () => import("../cards/hui-statistics-graph-card"),
|
||||||
|
@ -407,7 +407,7 @@ class HUIRoot extends LitElement {
|
|||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${this.hass!.user?.is_admin &&
|
${this.hass!.user?.is_admin &&
|
||||||
!this.hass!.config.safe_mode
|
!this.hass!.config.recovery_mode
|
||||||
? html`
|
? html`
|
||||||
<mwc-list-item
|
<mwc-list-item
|
||||||
graphic="icon"
|
graphic="icon"
|
||||||
@ -691,7 +691,7 @@ class HUIRoot extends LitElement {
|
|||||||
return (
|
return (
|
||||||
(this.narrow && this._conversation(this.hass.config.components)) ||
|
(this.narrow && this._conversation(this.hass.config.components)) ||
|
||||||
this._editMode ||
|
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 ===
|
(this.hass.panels.lovelace?.config as LovelacePanelConfig)?.mode ===
|
||||||
"yaml" ||
|
"yaml" ||
|
||||||
this._yamlMode
|
this._yamlMode
|
||||||
|
@ -22,9 +22,9 @@ export class OriginalStatesViewStrategy extends ReactiveElement {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hass.config.safe_mode) {
|
if (hass.config.recovery_mode) {
|
||||||
return {
|
return {
|
||||||
cards: [{ type: "safe-mode" }],
|
cards: [{ type: "recovery-mode" }],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4490,9 +4490,9 @@
|
|||||||
"iframe": {
|
"iframe": {
|
||||||
"error_secure_context": "Unable to load iframes pointing at websites using {target_protocol} if Home Assistant is served over {context_protocol}."
|
"error_secure_context": "Unable to load iframes pointing at websites using {target_protocol} if Home Assistant is served over {context_protocol}."
|
||||||
},
|
},
|
||||||
"safe-mode": {
|
"recovery-mode": {
|
||||||
"header": "Safe mode activated",
|
"header": "Recovery 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."
|
"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": {
|
"starting": {
|
||||||
"description": "Home Assistant is starting, please wait…"
|
"description": "Home Assistant is starting, please wait…"
|
||||||
|
10
yarn.lock
10
yarn.lock
@ -9789,7 +9789,7 @@ __metadata:
|
|||||||
gulp-rename: 2.0.0
|
gulp-rename: 2.0.0
|
||||||
gulp-zopfli-green: 6.0.1
|
gulp-zopfli-green: 6.0.1
|
||||||
hls.js: 1.4.12
|
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
|
html-minifier-terser: 7.2.0
|
||||||
husky: 8.0.3
|
husky: 8.0.3
|
||||||
idb-keyval: 6.2.1
|
idb-keyval: 6.2.1
|
||||||
@ -9865,10 +9865,10 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"home-assistant-js-websocket@npm:8.2.0":
|
"home-assistant-js-websocket@npm:9.0.0":
|
||||||
version: 8.2.0
|
version: 9.0.0
|
||||||
resolution: "home-assistant-js-websocket@npm:8.2.0"
|
resolution: "home-assistant-js-websocket@npm:9.0.0"
|
||||||
checksum: 4eacdfe8d1bd35492ff77079779e2e0a1967b20a46b168752d8c037bf155fa5d2a8e898e7d1aee5514976d93589d26fe2d6c1975e4fcb039b0beff852564c64c
|
checksum: c1543483f55c1d135400b9bd6dce084b5942f57dc8098f4c84c6ece7b8289c558dc6578c45c94eecde99fec134041d8c4f458492e2573875bfb706df70ffd902
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user