From a643350165862c08ae278172d186543ffb9b7d0f Mon Sep 17 00:00:00 2001 From: FizboZ Date: Wed, 21 Aug 2024 17:06:17 -0400 Subject: [PATCH 1/2] Put the toast styling into its own css file and imported it into donate and sucess popup files, success notif is now the same style as donate --- src/lib/AddOverlay.svelte | 6 +++- src/lib/DonatePopup.svelte | 61 ++----------------------------------- src/lib/toast.css | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 60 deletions(-) create mode 100644 src/lib/toast.css diff --git a/src/lib/AddOverlay.svelte b/src/lib/AddOverlay.svelte index ae090ca..35436f3 100644 --- a/src/lib/AddOverlay.svelte +++ b/src/lib/AddOverlay.svelte @@ -13,6 +13,7 @@ } from '@svelte-put/cloudflare-turnstile'; import { PUBLIC_CLOUDFLARE_TURNSTILE_SITE_KEY } from '$env/static/public'; import { SvelteToast, toast } from '@zerodevx/svelte-toast'; + import './toast.css'; let momentDescription = ''; let captchaToken = ''; @@ -31,7 +32,9 @@ 'Your story was successfully submitted. It will appear publicly on the map once it has been approved by our moderators.', { theme: { - '--toastBarHeight': 0 + '--toastBackground': 'black', + '--toastBarHeight': 0, + '--toastColor': 'var(--color-pink)', }, duration: 5000 @@ -66,6 +69,7 @@ } else { const result = await response.json(); alert(`Error: ${result.error}`); + showSubmissionSuccessNotification(); } } diff --git a/src/lib/DonatePopup.svelte b/src/lib/DonatePopup.svelte index 032fadf..3ac4d8b 100644 --- a/src/lib/DonatePopup.svelte +++ b/src/lib/DonatePopup.svelte @@ -1,5 +1,6 @@