From 7e3e61afd7788c94dde21c8811ee34222b93cf13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Mon, 5 Feb 2024 21:03:36 +0100 Subject: [PATCH] feat: force backup when putting the device into bootloader mode --- src/lib/backup/backup.ts | 1 - src/routes/ConnectionPopup.svelte | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/backup/backup.ts b/src/lib/backup/backup.ts index a68aa52c..c832ea93 100644 --- a/src/lib/backup/backup.ts +++ b/src/lib/backup/backup.ts @@ -61,7 +61,6 @@ export async function restoreBackup(event: Event) { } else if (isCsvChords(text)) { restoreFromFile(csvChordsToJson(text)) } else { - alert("Unknown backup format") } } diff --git a/src/routes/ConnectionPopup.svelte b/src/routes/ConnectionPopup.svelte index da54d08d..3a8f3a79 100644 --- a/src/routes/ConnectionPopup.svelte +++ b/src/routes/ConnectionPopup.svelte @@ -4,7 +4,7 @@ import {slide, fade} from "svelte/transition" import {preference} from "$lib/preferences" import LL from "../i18n/i18n-svelte" - import Tooltip from "$lib/components/Tooltip.svelte" + import {downloadBackup} from "$lib/backup/backup" function reboot() { $serialPort?.reboot() @@ -16,6 +16,7 @@ } function bootloader() { + downloadBackup() $serialPort?.bootloader() $serialPort = undefined rebootInfo = true