forked from open-webui/open-webui
		
	rf: dom queries in Chats component
This commit is contained in:
		
							parent
							
								
									13f0052122
								
							
						
					
					
						commit
						f4f6724d96
					
				
					 1 changed files with 10 additions and 4 deletions
				
			
		|  | @ -22,6 +22,7 @@ | ||||||
| 	let saveChatHistory = true; | 	let saveChatHistory = true; | ||||||
| 	let importFiles; | 	let importFiles; | ||||||
| 	let showDeleteConfirm = false; | 	let showDeleteConfirm = false; | ||||||
|  | 	let chatImportInputElement: HTMLInputElement; | ||||||
| 
 | 
 | ||||||
| 	$: if (importFiles) { | 	$: if (importFiles) { | ||||||
| 		console.log(importFiles); | 		console.log(importFiles); | ||||||
|  | @ -159,12 +160,17 @@ | ||||||
| 		<hr class=" dark:border-gray-700" /> | 		<hr class=" dark:border-gray-700" /> | ||||||
| 
 | 
 | ||||||
| 		<div class="flex flex-col"> | 		<div class="flex flex-col"> | ||||||
| 			<input id="chat-import-input" bind:files={importFiles} type="file" accept=".json" hidden /> | 			<input | ||||||
|  | 				id="chat-import-input" | ||||||
|  | 				bind:this={chatImportInputElement} | ||||||
|  | 				bind:files={importFiles} | ||||||
|  | 				type="file" | ||||||
|  | 				accept=".json" | ||||||
|  | 				hidden | ||||||
|  | 			/> | ||||||
| 			<button | 			<button | ||||||
| 				class=" flex rounded-md py-2 px-3.5 w-full hover:bg-gray-200 dark:hover:bg-gray-800 transition" | 				class=" flex rounded-md py-2 px-3.5 w-full hover:bg-gray-200 dark:hover:bg-gray-800 transition" | ||||||
| 				on:click={() => { | 				on:click={chatImportInputElement.click} | ||||||
| 					document.getElementById('chat-import-input').click(); |  | ||||||
| 				}} |  | ||||||
| 			> | 			> | ||||||
| 				<div class=" self-center mr-3"> | 				<div class=" self-center mr-3"> | ||||||
| 					<svg | 					<svg | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Carlos Daniel Vilaseca
						Carlos Daniel Vilaseca