Text changes backups (#23397)

* Text changes backups

* Update dialog-change-backup-encryption-key.ts

* Update ha-backup-config-agents.ts

* Update header margin

---------

Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
This commit is contained in:
Bram Kragten 2024-12-23 15:26:18 +01:00 committed by GitHub
parent 97e6313890
commit 6757cda7f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 44 additions and 35 deletions

View File

@ -51,7 +51,7 @@ class HaBackupConfigAgents extends LitElement {
private _description(agentId: string) { private _description(agentId: string) {
if (agentId === CLOUD_AGENT) { if (agentId === CLOUD_AGENT) {
return "It stores one backup. The oldest backups are deleted."; return "Note: It stores only one backup, regardless of your settings.";
} }
if (isNetworkMountAgent(agentId)) { if (isNetworkMountAgent(agentId)) {
return "Network storage"; return "Network storage";

View File

@ -195,7 +195,7 @@ class HaBackupConfigData extends LitElement {
></ha-svg-icon> ></ha-svg-icon>
<span slot="headline">Media</span> <span slot="headline">Media</span>
<span slot="supporting-text"> <span slot="supporting-text">
For example, camera recordings. This can include large filesize camera recordings.
</span> </span>
<ha-switch <ha-switch
id="media" id="media"
@ -209,7 +209,7 @@ class HaBackupConfigData extends LitElement {
<ha-svg-icon slot="start" .path=${mdiFolder}></ha-svg-icon> <ha-svg-icon slot="start" .path=${mdiFolder}></ha-svg-icon>
<span slot="headline">Share folder</span> <span slot="headline">Share folder</span>
<span slot="supporting-text"> <span slot="supporting-text">
Folder that is often used for advanced or older Folder that is often used by add-ons for advanced or older
configurations. configurations.
</span> </span>
<ha-switch <ha-switch

View File

@ -31,21 +31,20 @@ class HaBackupOverviewBackups extends LitElement {
<div class="icon"> <div class="icon">
<ha-svg-icon .path=${mdiInformationOutline}></ha-svg-icon> <ha-svg-icon .path=${mdiInformationOutline}></ha-svg-icon>
</div> </div>
Set up automatic backups Set up backups
</div> </div>
<div class="card-content"> <div class="card-content">
<p> <p>
Backups are essential to a reliable smart home. They protect your Backups are essential for a reliable smart home. They help protect
setup against failures and allows you to quickly have a working the work you've put into setting up your smart home, and if the
system again. It is recommended to create a daily backup and keep worst happens, you can get back up and running quickly. It is
backups of the last 3 days on two different locations. And one of recommended that you create a backup every day. You should keep
them is off-site. three backups in at least two different locations, one of which
should be off-site.
</p> </p>
</div> </div>
<div class="card-actions"> <div class="card-actions">
<ha-button @click=${this._setup}> <ha-button @click=${this._setup}>Set up backups</ha-button>
Set up automatic backups
</ha-button>
</div> </div>
</ha-card> </ha-card>
`; `;

View File

@ -287,13 +287,14 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
src="/static/images/voice-assistant/hi.png" src="/static/images/voice-assistant/hi.png"
alt="Casita Home Assistant logo" alt="Casita Home Assistant logo"
/> />
<h1>Set up your automatic backups</h1> <h1>Set up backups</h1>
<p class="secondary"> <p class="secondary">
Backups are essential to a reliable smart home. They protect your Backups are essential for a reliable smart home. They help protect
setup against failures and allows you to quickly have a working the work you've put into setting up your smart home, and if the
system again. It is recommended to create a daily backup and keep worst happens, you can get back up and running quickly. It is
backups of the last 3 days on two different locations. And one of recommended that you create a backup every day. You should keep
them is off-site. three backups in at least two different locations, one of which
should be off-site.
</p> </p>
</div> </div>
`; `;
@ -327,21 +328,23 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
case "setup": case "setup":
return html` return html`
<p> <p>
It is recommended to create a daily backup and keep backups of the It is recommended that you create a backup every day. You should
last 3 days on two different locations. And one of them is off-site. keep three backups in at least two different locations, one of which
should be off-site. Once you make your selection, your first backup
will begin.
</p> </p>
<ha-md-list class="full"> <ha-md-list class="full">
<ha-md-list-item type="button" @click=${this._done}> <ha-md-list-item type="button" @click=${this._done}>
<span slot="headline">Recommended settings</span> <span slot="headline">Recommended settings</span>
<span slot="supporting-text"> <span slot="supporting-text">
Set the proven settings of daily backup. Backup everything daily, keeping three days of backups
</span> </span>
<ha-icon-next slot="end"> </ha-icon-next> <ha-icon-next slot="end"> </ha-icon-next>
</ha-md-list-item> </ha-md-list-item>
<ha-md-list-item type="button" @click=${this._nextStep}> <ha-md-list-item type="button" @click=${this._nextStep}>
<span slot="headline">Custom settings</span> <span slot="headline">Custom settings</span>
<span slot="supporting-text"> <span slot="supporting-text">
Select your own automation, data and locations Select when, where, and what to backup
</span> </span>
<ha-icon-next slot="end"> </ha-icon-next> <ha-icon-next slot="end"> </ha-icon-next>
</ha-md-list-item> </ha-md-list-item>

View File

@ -152,7 +152,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
<ha-md-list-item> <ha-md-list-item>
<span slot="headline">Download old emergency kit</span> <span slot="headline">Download old emergency kit</span>
<span slot="supporting-text"> <span slot="supporting-text">
We recommend to save this encryption key somewhere secure. We recommend saving this encryption key file somewhere secure.
</span> </span>
<ha-button slot="end" @click=${this._downloadOld}> <ha-button slot="end" @click=${this._downloadOld}>
<ha-svg-icon .path=${mdiDownload} slot="icon"></ha-svg-icon> <ha-svg-icon .path=${mdiDownload} slot="icon"></ha-svg-icon>
@ -164,9 +164,10 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
case "new": case "new":
return html` return html`
<p> <p>
All next backups will use the new encryption key. We recommend to Keep this encryption key in a safe place, as you will need it to
save this key somewhere secure. As you can only restore your data access your backup, allowing it to be restored. Either record the
with the backup encryption key. characters below or download them as an emergency kit file.
Encryption keeps your backups private and secure.
</p> </p>
<div class="encryption-key"> <div class="encryption-key">
<p>${this._newEncryptionKey}</p> <p>${this._newEncryptionKey}</p>
@ -179,7 +180,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
<ha-md-list-item> <ha-md-list-item>
<span slot="headline">Download new emergency kit</span> <span slot="headline">Download new emergency kit</span>
<span slot="supporting-text"> <span slot="supporting-text">
We recommend to save this encryption key somewhere secure. We recommend saving this encryption key file somewhere secure.
</span> </span>
<ha-button slot="end" @click=${this._downloadNew}> <ha-button slot="end" @click=${this._downloadNew}>
<ha-svg-icon .path=${mdiDownload} slot="icon"></ha-svg-icon> <ha-svg-icon .path=${mdiDownload} slot="icon"></ha-svg-icon>

View File

@ -125,7 +125,8 @@ class HaConfigBackupDetails extends LitElement {
: !this._backup : !this._backup
? html`<ha-circular-progress active></ha-circular-progress>` ? html`<ha-circular-progress active></ha-circular-progress>`
: html` : html`
<ha-card header="Backup"> <ha-card>
<div class="card-header">Backup</div>
<div class="card-content"> <div class="card-content">
<ha-md-list> <ha-md-list>
<ha-md-list-item> <ha-md-list-item>
@ -145,7 +146,8 @@ class HaConfigBackupDetails extends LitElement {
</ha-md-list> </ha-md-list>
</div> </div>
</ha-card> </ha-card>
<ha-card header="Select what to restore"> <ha-card>
<div class="card-header">Select what to restore</div>
<div class="card-content"> <div class="card-content">
<ha-backup-data-picker <ha-backup-data-picker
.hass=${this.hass} .hass=${this.hass}
@ -166,7 +168,8 @@ class HaConfigBackupDetails extends LitElement {
</ha-button> </ha-button>
</div> </div>
</ha-card> </ha-card>
<ha-card header="Locations"> <ha-card>
<div class="card-header">Locations</div>
<div class="card-content"> <div class="card-content">
<ha-md-list> <ha-md-list>
${this._agents.map((agent) => { ${this._agents.map((agent) => {
@ -355,7 +358,7 @@ class HaConfigBackupDetails extends LitElement {
margin-bottom: 24px; margin-bottom: 24px;
} }
.card-content { .card-content {
padding: 0 20px 8px 20px; padding: 0 20px;
} }
.card-actions { .card-actions {
display: flex; display: flex;
@ -411,6 +414,9 @@ class HaConfigBackupDetails extends LitElement {
.dot.error { .dot.error {
background-color: var(--error-color); background-color: var(--error-color);
} }
.card-header {
padding-bottom: 8px;
}
`; `;
} }

View File

@ -140,10 +140,10 @@ class HaConfigBackupSettings extends LitElement {
<div class="card-header">Encryption key</div> <div class="card-header">Encryption key</div>
<div class="card-content"> <div class="card-content">
<p> <p>
All your backups are encrypted to keep your data private and Keep this encryption key in a safe place, as you will need it to
secure. You need this key to restore a backup. It's important access your backup, allowing it to be restored. Either record
that you don't lose this key, as no one else can restore your the characters below or download them as an emergency kit file.
data. Encryption keeps your backups private and secure.
</p> </p>
<ha-backup-config-encryption-key <ha-backup-config-encryption-key
.hass=${this.hass} .hass=${this.hass}