From 2c7e2d0eff0d63aee05daeab32a3f39a58c3750c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 30 Mar 2026 20:08:29 -0400 Subject: [PATCH] feat(frontend): add error modal component Add new ErrorModal component for API error display: - Auto-displays when apiError store is set - Shows service name, error message, and status code - Provides "Retry Connection" button to attempt reconnection - Provides "Dismiss" button to close modal and continue - Integrates with all three services (AniList, MAL, Simkl) - Uses flowbite-svelte Modal and Button components - Proper Svelte event handling with on:click Uses Tailwind CSS for styling with red error theme and helpful messaging. --- .../src/helperComponents/ErrorModal.svelte | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 frontend/src/helperComponents/ErrorModal.svelte diff --git a/frontend/src/helperComponents/ErrorModal.svelte b/frontend/src/helperComponents/ErrorModal.svelte new file mode 100644 index 0000000..598d4d1 --- /dev/null +++ b/frontend/src/helperComponents/ErrorModal.svelte @@ -0,0 +1,73 @@ + + +{#if showModal && $apiError} + +
+
+

{$apiError.message}

+ {#if $apiError.statusCode} +

+ Status: {$apiError.statusCode} +

+ {/if} +
+

+ The application will remain open. You can retry the connection or + dismiss this message to continue with limited functionality. +

+
+
+ {#if $apiError.canRetry} + + {/if} + +
+
+{/if}