Skip to content

Commit

Permalink
Text changes backups (#23397)
Browse files Browse the repository at this point in the history
* Text changes backups

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

* Update ha-backup-config-agents.ts

* Update header margin

---------

Co-authored-by: Paul Bottein <[email protected]>
  • Loading branch information
bramkragten and piitaya authored Dec 23, 2024
1 parent 97e6313 commit 6757cda
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class HaBackupConfigAgents extends LitElement {

private _description(agentId: string) {
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)) {
return "Network storage";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class HaBackupConfigData extends LitElement {
></ha-svg-icon>
<span slot="headline">Media</span>
<span slot="supporting-text">
For example, camera recordings.
This can include large filesize camera recordings.
</span>
<ha-switch
id="media"
Expand All @@ -209,7 +209,7 @@ class HaBackupConfigData extends LitElement {
<ha-svg-icon slot="start" .path=${mdiFolder}></ha-svg-icon>
<span slot="headline">Share folder</span>
<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.
</span>
<ha-switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,20 @@ class HaBackupOverviewBackups extends LitElement {
<div class="icon">
<ha-svg-icon .path=${mdiInformationOutline}></ha-svg-icon>
</div>
Set up automatic backups
Set up backups
</div>
<div class="card-content">
<p>
Backups are essential to a reliable smart home. They protect your
setup against failures and allows you to quickly have a working
system again. It is recommended to create a daily backup and keep
backups of the last 3 days on two different locations. And one of
them is off-site.
Backups are essential for a reliable smart home. They help protect
the work you've put into setting up your smart home, and if the
worst happens, you can get back up and running quickly. It is
recommended that you create a backup every day. You should keep
three backups in at least two different locations, one of which
should be off-site.
</p>
</div>
<div class="card-actions">
<ha-button @click=${this._setup}>
Set up automatic backups
</ha-button>
<ha-button @click=${this._setup}>Set up backups</ha-button>
</div>
</ha-card>
`;
Expand Down
23 changes: 13 additions & 10 deletions src/panels/config/backup/dialogs/dialog-backup-onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,14 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
src="/static/images/voice-assistant/hi.png"
alt="Casita Home Assistant logo"
/>
<h1>Set up your automatic backups</h1>
<h1>Set up backups</h1>
<p class="secondary">
Backups are essential to a reliable smart home. They protect your
setup against failures and allows you to quickly have a working
system again. It is recommended to create a daily backup and keep
backups of the last 3 days on two different locations. And one of
them is off-site.
Backups are essential for a reliable smart home. They help protect
the work you've put into setting up your smart home, and if the
worst happens, you can get back up and running quickly. It is
recommended that you create a backup every day. You should keep
three backups in at least two different locations, one of which
should be off-site.
</p>
</div>
`;
Expand Down Expand Up @@ -327,21 +328,23 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
case "setup":
return html`
<p>
It is recommended to create a daily backup and keep backups of the
last 3 days on two different locations. And one of them is off-site.
It is recommended that you create a backup every day. You should
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>
<ha-md-list class="full">
<ha-md-list-item type="button" @click=${this._done}>
<span slot="headline">Recommended settings</span>
<span slot="supporting-text">
Set the proven settings of daily backup.
Backup everything daily, keeping three days of backups
</span>
<ha-icon-next slot="end"> </ha-icon-next>
</ha-md-list-item>
<ha-md-list-item type="button" @click=${this._nextStep}>
<span slot="headline">Custom settings</span>
<span slot="supporting-text">
Select your own automation, data and locations
Select when, where, and what to backup
</span>
<ha-icon-next slot="end"> </ha-icon-next>
</ha-md-list-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
<ha-md-list-item>
<span slot="headline">Download old emergency kit</span>
<span slot="supporting-text">
We recommend to save this encryption key somewhere secure.
We recommend saving this encryption key file somewhere secure.
</span>
<ha-button slot="end" @click=${this._downloadOld}>
<ha-svg-icon .path=${mdiDownload} slot="icon"></ha-svg-icon>
Expand All @@ -164,9 +164,10 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
case "new":
return html`
<p>
All next backups will use the new encryption key. We recommend to
save this key somewhere secure. As you can only restore your data
with the backup encryption key.
Keep this encryption key in a safe place, as you will need it to
access your backup, allowing it to be restored. Either record the
characters below or download them as an emergency kit file.
Encryption keeps your backups private and secure.
</p>
<div class="encryption-key">
<p>${this._newEncryptionKey}</p>
Expand All @@ -179,7 +180,7 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
<ha-md-list-item>
<span slot="headline">Download new emergency kit</span>
<span slot="supporting-text">
We recommend to save this encryption key somewhere secure.
We recommend saving this encryption key file somewhere secure.
</span>
<ha-button slot="end" @click=${this._downloadNew}>
<ha-svg-icon .path=${mdiDownload} slot="icon"></ha-svg-icon>
Expand Down
14 changes: 10 additions & 4 deletions src/panels/config/backup/ha-config-backup-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ class HaConfigBackupDetails extends LitElement {
: !this._backup
? html`<ha-circular-progress active></ha-circular-progress>`
: html`
<ha-card header="Backup">
<ha-card>
<div class="card-header">Backup</div>
<div class="card-content">
<ha-md-list>
<ha-md-list-item>
Expand All @@ -145,7 +146,8 @@ class HaConfigBackupDetails extends LitElement {
</ha-md-list>
</div>
</ha-card>
<ha-card header="Select what to restore">
<ha-card>
<div class="card-header">Select what to restore</div>
<div class="card-content">
<ha-backup-data-picker
.hass=${this.hass}
Expand All @@ -166,7 +168,8 @@ class HaConfigBackupDetails extends LitElement {
</ha-button>
</div>
</ha-card>
<ha-card header="Locations">
<ha-card>
<div class="card-header">Locations</div>
<div class="card-content">
<ha-md-list>
${this._agents.map((agent) => {
Expand Down Expand Up @@ -355,7 +358,7 @@ class HaConfigBackupDetails extends LitElement {
margin-bottom: 24px;
}
.card-content {
padding: 0 20px 8px 20px;
padding: 0 20px;
}
.card-actions {
display: flex;
Expand Down Expand Up @@ -411,6 +414,9 @@ class HaConfigBackupDetails extends LitElement {
.dot.error {
background-color: var(--error-color);
}
.card-header {
padding-bottom: 8px;
}
`;
}

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

0 comments on commit 6757cda

Please sign in to comment.