feat: improve toasts
All checks were successful
Build Latest and dev images / build-container (push) Successful in 1m0s

This commit is contained in:
Philipp Dormann 2025-03-28 11:44:10 +01:00
parent e7a69ebdca
commit 481f6b686e
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
23 changed files with 25 additions and 25 deletions

View File

@ -106,7 +106,7 @@
function deleteDonation() {
DonationService.donationControllerRemove(original_data.id, false)
.then((resp) => {
toast($_("donation-deleted"));
toast.success($_("donation-deleted"));
location.replace("./");
})
.catch((err) => {

View File

@ -163,7 +163,7 @@
...options,
data: current_donations,
}));
toast($_("donation-deleted"));
toast.success($_("donation-deleted"));
}
onMount(async () => {

View File

@ -77,7 +77,7 @@
function deleteDonor() {
DonorService.donorControllerRemove(original_data.id, true)
.then((resp) => {
toast($_("donor-deleted"));
toast.success($_("donor-deleted"));
location.replace("./");
})
.catch((err) => {

View File

@ -174,7 +174,7 @@
toast.loading($_("deleting-donor"));
await DonorService.donorControllerRemove(event.detail.id, true);
toast.dismiss();
toast($_("donor-deleted"));
toast.success($_("donor-deleted"));
current_donors = current_donors.filter((d) => d.id !== event.detail.id);
active_deletes = active_deletes.filter((a) => a.id !== event.detail.id);
options.update((options) => ({

View File

@ -50,7 +50,7 @@
);
});
grantedPermissions_initial = grantedPermissions;
toast($_("permissions-updated"));
toast.success($_("permissions-updated"));
});
}
Object.values(CreatePermission.target).forEach((t) => {

View File

@ -18,7 +18,7 @@
true
)
.then((resp) => {
toast($_("organization-deleted"));
toast.success($_("organization-deleted"));
location.replace("./");
})
.catch((err) => {});

View File

@ -75,7 +75,7 @@
false
)
.then((resp) => {
toast($_("organization-deleted"));
toast.success($_("organization-deleted"));
location.replace("./");
})
.catch((err) => {});

View File

@ -30,7 +30,7 @@
a.click();
a.remove();
toast.dismiss();
toast($_("pdf-successfully-generated"));
toast.success($_("pdf-successfully-generated"));
}
function generateRunnerCards(locale) {

View File

@ -37,7 +37,7 @@
a.click();
a.remove();
toast.dismiss();
toast($_("pdf-successfully-generated"));
toast.success($_("pdf-successfully-generated"));
}
async function generateRunnerCertificates(locale) {
@ -146,7 +146,7 @@
count_orgs === generate_orgs.length
) {
toast.dismiss();
toast($_("pdfs-successfully-generated"));
toast.success($_("pdfs-successfully-generated"));
}
})
.catch((err) => {});

View File

@ -36,7 +36,7 @@
a.click();
a.remove();
toast.dismiss();
toast($_("pdf-successfully-generated"));
toast.success($_("pdf-successfully-generated"));
}
async function generateTeamContracts(locale) {

View File

@ -150,7 +150,7 @@
dispatch("created", { runners: resp });
toast.dismiss();
recent_processed = true;
toast($_("import-finished"));
toast.success($_("import-finished"));
cancelModal();
})
.catch((err) => {
@ -170,7 +170,7 @@
dispatch("created", { runners: resp });
toast.dismiss();
recent_processed = true;
toast($_("import-finished"));
toast.success($_("import-finished"));
cancelModal();
})
.catch((err) => {

View File

@ -146,7 +146,7 @@
...options,
data: current_runners,
}));
toast($_("runner-deleted"));
toast.success($_("runner-deleted"));
}
onMount(async () => {

View File

@ -72,7 +72,7 @@
function deleteScan() {
ScanService.scanControllerRemove(original_data.id, false)
.then((resp) => {
toast($_("deleted-scan"));
toast.success($_("deleted-scan"));
location.replace("./");
})
.catch((err) => {

View File

@ -174,7 +174,7 @@
...options,
data: current_scans,
}));
toast($_("scan-deleted"));
toast.success($_("scan-deleted"));
}
onMount(async () => {

View File

@ -15,7 +15,7 @@
function deleteStation() {
ScanStationService.scanStationControllerRemove(delete_station.id, true)
.then((resp) => {
toast($_("station-deleted"));
toast.success($_("station-deleted"));
location.replace("./");
})
.catch((err) => {});

View File

@ -49,7 +49,7 @@
function deleteStation() {
ScanStationService.scanStationControllerRemove(original_data.id, false)
.then((resp) => {
toast($_("station-deleted"));
toast.success($_("station-deleted"));
location.replace("./");
})
.catch((err) => {

View File

@ -165,7 +165,7 @@
current_stations = current_stations.filter(
(obj) => obj.id !== s.id
);
toast($_("station-deleted"));
toast.success($_("station-deleted"));
})
.catch((err) => {
modal_open = true;

View File

@ -14,7 +14,7 @@
function deleteClient() {
StatsClientService.statsClientControllerRemove(delete_client.id, true)
.then((resp) => {
toast($_("statsclient-deleted"));
toast.success($_("statsclient-deleted"));
location.replace("./");
})
.catch((err) => {});

View File

@ -22,7 +22,7 @@
if (!successful) {
throw new Error();
}
toast($_("copied-token-to-clipboard"));
toast.success($_("copied-token-to-clipboard"));
copied = true;
} catch (err) {
toast.error($_("error-whyile-copying-to-clipboard"));

View File

@ -20,7 +20,7 @@
function deleteClient() {
StatsClientService.statsClientControllerRemove(original_data.id, false)
.then((resp) => {
toast($_("statsclient-deleted"));
toast.success($_("statsclient-deleted"));
location.replace("./");
})
.catch((err) => {

View File

@ -118,7 +118,7 @@
current_clients = current_clients.filter(
(obj) => obj.id !== c.id
);
toast($_("statsclient-deleted"));
toast.success($_("statsclient-deleted"));
})
.catch((err) => {
modal_open = true;

View File

@ -67,7 +67,7 @@
function deleteTeam() {
RunnerTeamService.runnerTeamControllerRemove(original.id, false)
.then((resp) => {
toast($_("team-deleted"));
toast.success($_("team-deleted"));
location.replace("./");
})
.catch((err) => {

View File

@ -92,7 +92,7 @@
usergroups_array_original = usergroups_array;
//
toast.dismiss();
toast($_("user-updated"));
toast.success($_("user-updated"));
})
.catch((err) => {});
}