-Subproject commit ae3132fef13542ab7fc337361bf484183d12d786
+Subproject commit 94b9b5debdaa40facf13a852cb096ef0cbd34ad7
let textarea: any = document.getElementById(i.id);
autosize.update(textarea);
pictrsDeleteToast(
- i18n.t("click_to_delete_picture").concat(' (', file.name,')'),
- i18n.t("picture_deleted").concat(' (', file.name,')'),
- i18n.t("fail_picture_deleted").concat(' (', file.name,')'),
+ `${i18n.t("click_to_delete_picture")}: ${file.name}`,
+ `${i18n.t("picture_deleted")}: ${file.name}`,
+ `${i18n.t("failed_to_delete_picture")}: ${file.name}`,
deleteUrl
);
} else {
i.state.postForm.url = Some(url);
i.setState({ imageLoading: false });
pictrsDeleteToast(
- i18n.t("click_to_delete_picture"),
- i18n.t("picture_deleted"),
+ `${i18n.t("click_to_delete_picture")}: ${file.name}`,
+ `${i18n.t("picture_deleted")}: ${file.name}`,
+ `${i18n.t("failed_to_delete_picture")}: ${file.name}`,
deleteUrl
);
} else {
duration: 10000,
onClick: () => {
if (toast) {
- fetch(deleteUrl, {})
- .then( res => {
- console.log(res)
+ fetch(deleteUrl).then(res => {
toast.hideToast();
- if (res.ok === true){
+ if (res.ok === true) {
alert(deletePictureText);
- } else{
+ } else {
alert(failedDeletePictureText);
}
- })
+ });
}
},
close: true,