🧼 Migrates svelte-modals to 2.0

This commit is contained in:
Rune Harlyk
2025-03-01 23:21:22 +01:00
committed by Rune Harlyk
parent 31dd7f7ba4
commit d90dbbcf21
9 changed files with 54 additions and 57 deletions
@@ -1,5 +1,5 @@
<script lang="ts">
import { openModal, closeModal } from 'svelte-modals/legacy';
import { modals } from 'svelte-modals';
import ConfirmDialog from '$lib/components/ConfirmDialog.svelte';
import SettingsCard from '$lib/components/SettingsCard.svelte';
@@ -16,7 +16,7 @@
}
function confirmBinUpload() {
openModal(ConfirmDialog, {
modals.open(ConfirmDialog, {
title: 'Confirm Flashing the Device',
message: 'Are you sure you want to overwrite the existing firmware with a new one?',
labels: {
@@ -24,7 +24,7 @@
confirm: { label: 'Upload', icon: OTA }
},
onConfirm: () => {
closeModal();
modals.close();
uploadBIN();
}
});
@@ -42,8 +42,8 @@
<Warning class="h-6 w-6 flex-shrink-0" />
<span
>Uploading a new firmware (.bin) file will replace the existing firmware. You may upload
a (.md5) file first to verify the uploaded firmware.</span
>
a (.md5) file first to verify the uploaded firmware.
</span>
</div>
<input