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 = []) => { | const handleFiles = (files = []) => { | ||||||
|  | @ -436,19 +437,10 @@ const handleFiles = (files = []) => { | ||||||
|       document.getElementById("first-view").getAttribute("data-checked") === |       document.getElementById("first-view").getAttribute("data-checked") === | ||||||
|       "data-checked"; |       "data-checked"; | ||||||
|     const password = document.getElementById("file_pwd").value; |     const password = document.getElementById("file_pwd").value; | ||||||
|  |     const resultsElement = document.getElementById("results"); | ||||||
| 
 | 
 | ||||||
|     if (window.fileList === undefined || window.fileList === null) { |     if (window.fileList === undefined || window.fileList === null) { | ||||||
|       window.fileList = filesArray; // Convert FileList to an array
 |       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) { |       if (resultsElement) { | ||||||
|         resultsElement.style.display = "block"; |         resultsElement.style.display = "block"; | ||||||
|       } |       } | ||||||
|  | @ -456,6 +448,15 @@ const handleFiles = (files = []) => { | ||||||
|       window.fileList = window.fileList.concat(filesArray); // Concatenate new 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"; |     document.body.style.cursor = "default"; | ||||||
| 
 | 
 | ||||||
|     startUpload( |     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