From 17e0805fe64f6d181f55b81afa502ee6443ebabe Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 25 Mar 2021 17:48:54 +0100 Subject: [PATCH] =?UTF-8?q?Errors=20now=20toast=20errors=E2=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #107 --- .../runners/ImportRunnerModal.svelte | 192 +++-- src/locales/de.json | 759 +++++++++--------- src/locales/en.json | 759 +++++++++--------- 3 files changed, 872 insertions(+), 838 deletions(-) diff --git a/src/components/runners/ImportRunnerModal.svelte b/src/components/runners/ImportRunnerModal.svelte index 1797dba1..1932ca1c 100644 --- a/src/components/runners/ImportRunnerModal.svelte +++ b/src/components/runners/ImportRunnerModal.svelte @@ -19,7 +19,11 @@ export let current_runners; export let import_modal_open; $: searchvalue = ""; - $: importButtonEnabled = recent_processed && (!(selected_org_or_team == "" || selected_org_or_team == null) || !(passed_org?.id == null || passed_org?.id == 0) || !(passed_team?.id == null || passed_team?.id == 0)) + $: importButtonEnabled = + recent_processed && + (!(selected_org_or_team == "" || selected_org_or_team == null) || + !(passed_org?.id == null || passed_org?.id == 0) || + !(passed_team?.id == null || passed_team?.id == 0)); const dispatch = createEventDispatcher(); function cancelModal() { json_output = []; @@ -124,6 +128,13 @@ .catch((err) => { toast.hideToast(); recent_processed = true; + Toastify({ + text: $_("error-during-import"), + duration: 500, + backgroundColor: + "linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)", + }).showToast(); + cancelModal(); }); } if (opened_from === "TeamDetail") { @@ -141,6 +152,13 @@ .catch((err) => { toast.hideToast(); recent_processed = true; + Toastify({ + text: $_("error-during-import"), + duration: 500, + backgroundColor: + "linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)", + }).showToast(); + cancelModal(); }); } if (opened_from === "RunnerOverview") { @@ -164,6 +182,13 @@ .catch((err) => { toast.hideToast(); recent_processed = true; + Toastify({ + text: $_("error-during-import"), + duration: 500, + backgroundColor: + "linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)", + }).showToast(); + cancelModal(); }); } if (selected_org_or_team.includes("TEAM_")) { @@ -186,6 +211,13 @@ .catch((err) => { toast.hideToast(); recent_processed = true; + Toastify({ + text: $_("error-during-import"), + duration: 500, + backgroundColor: + "linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)", + }).showToast(); + cancelModal(); }); } } @@ -194,86 +226,86 @@ {#if import_modal_open} -
{ - cancelModal(); -}}> +
{ + cancelModal(); + }}>
-