mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-29 17:09:59 -07:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user