mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-08 02:19:43 +00:00
Merge feature branch with backup changes to dev (#23239)
* Add dialog to upload a backup file (#22405) * Add dialog to upload a backup file * Prosess feedback * Remoe unused definition * Early pushout of changes to the backup panel (#22321) * Eary pushout of changes to the backup panel * Add location icons * Path is optional * Set backupSlug from route * No need for subscription mixin * update * Reorder * init details * Fix import * Improve backup screen and navigation (#22827) * Add location page * Start dashboard * Move list to dashboard * Add mocked config page * Fix hardcoded boolean * Add summary card * Use new format for BackupAgent * Use new API * Rename to ha-backup-summary-card * Use new api * Fix backup agents * Rename backup slug to backup id (#22876) * Add delete backup action to datatable (#22867) * Create generate backup dialog (#22866) Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Add backup details page (#22884) * Add new backup dialog to choose between automatic and manual (#22895) Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> * Improve download backup (#22905) * Rename remove to delete in backup websocket type (#22902) * Use bytes for backup size (#22909) * Use default backup instead of automatic backup (#22915) * Update generate backup api (#22943) Use new backup api for generate backup * Improve details page for new backup (#22946) * Add content of backup in detail page * Add restore button * Add note * Use disabled * Fix backup generate * Use options to WS command backup/restore (#22950) * Add addons picker in generate backup dialog (#22951) * Add addons picker in generate backup dialog * Change condition * Fix label * Fix local addons * Review * Add local addon in addon mode is all * Fix local addon folder * Use addon picker inside data picker * Fetch addons info in detail page * Fetch addon inside component * Rename agents picker * Restrict generate backup content for core backup (#22958) * Fix addon mode all * Use event to check if a backup is in progress (#22960) * Use event to check if a backup is in progress * Update src/panels/config/backup/ha-config-backup-dashboard.ts Co-authored-by: Bram Kragten <mail@bramkragten.nl> --------- Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Force enable home assistant settings when history is selected in backup (#22961) * Backup default config (#22954) * WIP default config * Add addons * save data * add icon * basics of change encryption key * Update dialog-change-backup-password.ts * use default config when manually triggering default backup * limit to hassio * enforce encryption key, manual use manual one * Update ha-config-backup-dashboard.ts * Add suggested password and copy buttons * Add download emergency kit button * review * fix * Update ha-config-backup-default-config.ts * Update ha-config-backup-default-config.ts * Update default backup settings (#23109) * Only display addons and folder for hassio (#23118) * Use new backup dashboard page for hassio backup (#23161) * Add support for copies and days for backup retention (#23128) * Add upload dialog for backup (#23139) * Improve generate backup dialog (#23167) * Propose to use encryption key if available when restoring a backup (#23164) Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Add encryption key onboarding (#23180) * Fix attributes broken by the warning fixes (#23182) * Don't allow any more eslint warnings (#23181) * Use dedicated endpoint to generate backup with default settings (#23224) * Add onboarding dialog for backups (#23225) * Add onboarding flow for backups * Add welcome screen * Add progress and status for backup dashboard (#23222) * Handle backup state * Add summary card * Use difference in days * Rename local backups and show icon (#23238) * Improve backup onboarding (#23241) * Do not navigate to config page after onboarding * Use casita image and center text * fix lint * Rename stored and default to strategy backup * Update * Fix icon and add type in datatable * Use strategy in more places * Fix list item overflow --------- Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev> Co-authored-by: Bram Kragten <mail@bramkragten.nl> Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
@@ -56,6 +56,21 @@ export class HaFileUpload extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
private get _name() {
|
||||
if (this.value === undefined) {
|
||||
return "";
|
||||
}
|
||||
if (typeof this.value === "string") {
|
||||
return this.value;
|
||||
}
|
||||
const files =
|
||||
this.value instanceof FileList
|
||||
? Array.from(this.value)
|
||||
: ensureArray(this.value);
|
||||
|
||||
return files.map((file) => file.name).join(", ");
|
||||
}
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
${this.uploading
|
||||
@@ -65,7 +80,7 @@ export class HaFileUpload extends LitElement {
|
||||
>${this.value
|
||||
? this.hass?.localize(
|
||||
"ui.components.file-upload.uploading_name",
|
||||
{ name: this.value.toString() }
|
||||
{ name: this._name }
|
||||
)
|
||||
: this.hass?.localize(
|
||||
"ui.components.file-upload.uploading"
|
||||
|
||||
Reference in New Issue
Block a user