Skip to content

Commit

Permalink
Add welcome screen
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya committed Dec 9, 2024
1 parent a91cefa commit ae0c356
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/panels/config/backup/dialogs/dialog-backup-onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,22 @@ import "../components/ha-backup-config-schedule";
import type { BackupConfigSchedule } from "../components/ha-backup-config-schedule";
import type { SetBackupEncryptionKeyDialogParams } from "./show-dialog-set-backup-encryption-key";

const STEPS = ["new_key", "save_key", "schedule", "data", "locations"] as const;
const STEPS = [
"welcome",
"new_key",
"save_key",
"schedule",
"data",
"locations",
] as const;

type Step = (typeof STEPS)[number];

const INITIAL_CONFIG: BackupConfig = {
create_backup: {
agent_ids: [],
include_addons: null,
include_all_addons: false,
include_all_addons: true,
include_database: true,
include_folders: null,
name: null,
Expand Down Expand Up @@ -204,6 +211,8 @@ class DialogSetBackupEncryptionKey extends LitElement implements HassDialog {

private get _stepTitle(): string {
switch (this._step) {
case "welcome":
return "Set up your backup strategy";
case "new_key":
return "Encryption key";
case "save_key":
Expand Down Expand Up @@ -242,6 +251,16 @@ class DialogSetBackupEncryptionKey extends LitElement implements HassDialog {
}

switch (this._step) {
case "welcome":
return html`
<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
copies of the last 3 days on two different locations. And one of
them is off-site.
</p>
`;
case "new_key":
return html`
<p>
Expand Down

0 comments on commit ae0c356

Please sign in to comment.