add svelte-french-toast
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-04-22 11:11:50 +02:00
parent e7b2c64798
commit 56c3365656
4 changed files with 32 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
import { _ } from "svelte-i18n";
import { RunnerCardService } from "@odit/lfk-client-js";
import store from "../../store";
import Toastify from "toastify-js";
import toast from "svelte-french-toast";
import CardsEmptyState from "./CardsEmptyState.svelte";
import CardDetailModal from "./CardDetailModal.svelte";
import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte";
@@ -148,14 +148,11 @@
...options,
data: current_cards,
}));
Toastify({
text: $_("card-deleted"),
duration: 3500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
toast.success($_("card-deleted"));
}
onMount(async () => {
toast.loading("Karten werden geladen...");
let page = 0;
while (page >= 0) {
const cards = await RunnerCardService.runnerCardControllerGetAll(
@@ -175,6 +172,8 @@
dataLoaded = true;
page++;
}
toast.dismiss();
toast.success("All cards loaded");
console.log("All cards loaded");
});
</script>