fix: Issues #228 done.
This commit is contained in:
@@ -353,19 +353,27 @@ export async function renameModal(rename, type, id, baseName) {
|
||||
*/
|
||||
export async function deleteFileModal(files, type, id, name) {
|
||||
const filesStore = FilesStore();
|
||||
|
||||
let htmlText = files.length === 0 ? `Do you really want to delete <span class="text-primary">${name}</span>?` : `<div class="text-left mx-4 space-y-1"><p class="mb-2">Do you really want to delete <span class="text-primary">${name}</span>?</p><p>The following dependent file(s) will also be deleted:</p><ul class="list-disc ml-6">${files}</ul></div>`;
|
||||
|
||||
const deleteCustomClass = { ...customClass };
|
||||
deleteCustomClass.confirmButton = '!inline-block !rounded-full !text-sm !font-medium !text-center !align-middle !transition-colors !duration-300 !px-5 !py-2 !w-[100px] !h-[40px] !text-danger !bg-neutral-10 !border !border-danger';
|
||||
|
||||
const result = await Swal.fire({
|
||||
title: 'Confirm Deletion',
|
||||
title: 'CONFIRM DELETION',
|
||||
html: htmlText,
|
||||
icon: 'warning',
|
||||
iconColor: '#FF3366',
|
||||
reverseButtons:true,
|
||||
confirmButtonText: 'Yes',
|
||||
confirmButtonColor: '#FF3366',
|
||||
confirmButtonColor: '#ffffff',
|
||||
showCancelButton: true,
|
||||
cancelButtonText: 'No',
|
||||
cancelButtonColor: '#94a3b8',
|
||||
customClass: customClass,
|
||||
cancelButtonColor: '#FF3366',
|
||||
customClass: deleteCustomClass,
|
||||
didOpen: () => {
|
||||
const confirmButton = Swal.getConfirmButton();
|
||||
|
||||
confirmButton.style.border = '1px solid #FF3366';
|
||||
}
|
||||
});
|
||||
|
||||
if(result.isConfirmed) {
|
||||
|
||||
Reference in New Issue
Block a user