Add error reporting to the daemon web UI

This error reporting comes in two forms:
- Errors updating the UI
- Errors with user actions

The former is displayed as one error until a refresh succeeds again. The
latter creates an number of persistent errors until they are cleared by
the user.
This commit is contained in:
Sashanoraa
2025-08-03 19:27:28 -04:00
committed by Sashanoraa
parent bbab29ae0b
commit 56122f6559
11 changed files with 209 additions and 14 deletions

View File

@@ -1,18 +1,20 @@
<script lang="ts">
import { req } from '$lib/utils.svelte';
import { user_action_req } from '$lib/utils.svelte';
let {
text,
url,
prompt,
name,
}: {
text?: string;
url: string;
prompt: string;
name: string;
} = $props();
function confirmDelete() {
if (window.confirm(prompt)) {
req('POST', url);
user_action_req('POST', url, 'Unable to delete recording ' + name);
}
}
</script>