Update to latest Lufi API
This commit is contained in:
		
							parent
							
								
									38189ba1e8
								
							
						
					
					
						commit
						18074c03db
					
				|  | @ -419,7 +419,8 @@ const startUpload = ( | |||
|             }); | ||||
|         }) | ||||
|       ) | ||||
|     ); | ||||
|     ) | ||||
|     .orElse((error) => console.error(error)); | ||||
| }; | ||||
| 
 | ||||
| const handleFiles = (files = []) => { | ||||
|  | @ -436,19 +437,10 @@ const handleFiles = (files = []) => { | |||
|       document.getElementById("first-view").getAttribute("data-checked") === | ||||
|       "data-checked"; | ||||
|     const password = document.getElementById("file_pwd").value; | ||||
|     const resultsElement = document.getElementById("results"); | ||||
| 
 | ||||
|     if (window.fileList === undefined || window.fileList === null) { | ||||
|       window.fileList = filesArray; // Convert FileList to an array
 | ||||
|       window.fileList.forEach((file) => { | ||||
|         Materialize.toast( | ||||
|           i18n.enqueued.replace("XXX", escapeHtml(file.name)), | ||||
|           3000, | ||||
|           "teal accent-3" | ||||
|         ); | ||||
|       }); | ||||
|       window.nbFiles = window.fileList.length; | ||||
| 
 | ||||
|       const resultsElement = document.getElementById("results"); | ||||
|       if (resultsElement) { | ||||
|         resultsElement.style.display = "block"; | ||||
|       } | ||||
|  | @ -456,6 +448,15 @@ const handleFiles = (files = []) => { | |||
|       window.fileList = window.fileList.concat(filesArray); // Concatenate new files
 | ||||
|     } | ||||
| 
 | ||||
|     filesArray.forEach((file) => { | ||||
|       Materialize.toast( | ||||
|         i18n.enqueued.replace("XXX", escapeHtml(file.name)), | ||||
|         3000, | ||||
|         "teal accent-3" | ||||
|       ); | ||||
|     }); | ||||
|     window.nbFiles = window.fileList.length; | ||||
| 
 | ||||
|     document.body.style.cursor = "default"; | ||||
| 
 | ||||
|     startUpload( | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	 Booteille
						Booteille