Added loading indicator to js.
This commit is contained in:
		
							parent
							
								
									df8a6dd192
								
							
						
					
					
						commit
						3d194eb2a0
					
				| 
						 | 
				
			
			@ -2,10 +2,8 @@ const form = document.getElementById("schematic-form");
 | 
			
		|||
const resultContainer = document.getElementById("result-container");
 | 
			
		||||
form.onsubmit = async (e) => {
 | 
			
		||||
    e.preventDefault();
 | 
			
		||||
    resultContainer.innerHTML = "";
 | 
			
		||||
    console.log(e);
 | 
			
		||||
    resultContainer.innerHTML = "<p>Uploading and extracting contents...</p>";
 | 
			
		||||
    const data = new FormData(form);
 | 
			
		||||
    console.log(data);
 | 
			
		||||
    try {
 | 
			
		||||
        const response = await fetch("/extracts", {
 | 
			
		||||
            method: "POST",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue