From 5fc0eaef1ab5b7bc2e04db600e6e05075a74ce3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 8 Oct 2020 15:06:42 +0200 Subject: [PATCH] Warn about slow snapshot downloads (#7265) --- .../src/dialogs/snapshot/dialog-hassio-snapshot.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts index d8ac3eb3e4..f844c22289 100755 --- a/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts +++ b/hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts @@ -443,6 +443,19 @@ class HassioSnapshotDialog extends LitElement { return; } + if (window.location.href.includes("ui.nabu.casa")) { + const confirm = await showConfirmationDialog(this, { + title: "Potential slow download", + text: + "Downloading snapshots over the Nabu Casa URL will take some time, it is recomended to use your local URL instead, do you want to continue?", + confirmText: "continue", + dismissText: "cancel", + }); + if (!confirm) { + return; + } + } + const name = this._computeName.replace(/[^a-z0-9]+/gi, "_"); const a = document.createElement("a"); a.href = signedPath.path;