forked from open-webui/open-webui
		
	feat: archive button
This commit is contained in:
		
							parent
							
								
									f04164378a
								
							
						
					
					
						commit
						00b01c973e
					
				
					 2 changed files with 33 additions and 1 deletions
				
			
		
							
								
								
									
										19
									
								
								src/lib/components/icons/ArchiveBox.svelte
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/lib/components/icons/ArchiveBox.svelte
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | <script lang="ts"> | ||||||
|  | 	export let className = 'size-3.5'; | ||||||
|  | 	export let strokeWidth = '2.5'; | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <svg | ||||||
|  | 	xmlns="http://www.w3.org/2000/svg" | ||||||
|  | 	fill="none" | ||||||
|  | 	viewBox="0 0 24 24" | ||||||
|  | 	stroke-width={strokeWidth} | ||||||
|  | 	stroke="currentColor" | ||||||
|  | 	class={className} | ||||||
|  | > | ||||||
|  | 	<path | ||||||
|  | 		stroke-linecap="round" | ||||||
|  | 		stroke-linejoin="round" | ||||||
|  | 		d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z" | ||||||
|  | 	/> | ||||||
|  | </svg> | ||||||
|  | @ -25,6 +25,7 @@ | ||||||
| 	import Tooltip from '../common/Tooltip.svelte'; | 	import Tooltip from '../common/Tooltip.svelte'; | ||||||
| 	import ChatMenu from './Sidebar/ChatMenu.svelte'; | 	import ChatMenu from './Sidebar/ChatMenu.svelte'; | ||||||
| 	import ShareChatModal from '../chat/ShareChatModal.svelte'; | 	import ShareChatModal from '../chat/ShareChatModal.svelte'; | ||||||
|  | 	import ArchiveBox from '../icons/ArchiveBox.svelte'; | ||||||
| 
 | 
 | ||||||
| 	let show = false; | 	let show = false; | ||||||
| 	let navElement; | 	let navElement; | ||||||
|  | @ -550,7 +551,7 @@ | ||||||
| 									</button> | 									</button> | ||||||
| 								</div> | 								</div> | ||||||
| 							{:else} | 							{:else} | ||||||
| 								<div class="flex self-center space-x-1.5 z-10"> | 								<div class="flex self-center space-x-1 z-10"> | ||||||
| 									<ChatMenu | 									<ChatMenu | ||||||
| 										chatId={chat.id} | 										chatId={chat.id} | ||||||
| 										shareHandler={() => { | 										shareHandler={() => { | ||||||
|  | @ -587,6 +588,18 @@ | ||||||
| 											</svg> | 											</svg> | ||||||
| 										</button> | 										</button> | ||||||
| 									</ChatMenu> | 									</ChatMenu> | ||||||
|  | 
 | ||||||
|  | 									<Tooltip content="Archive"> | ||||||
|  | 										<button | ||||||
|  | 											aria-label="Archive" | ||||||
|  | 											class=" self-center dark:hover:text-white transition" | ||||||
|  | 											on:click={() => { | ||||||
|  | 												selectedChatId = chat.id; | ||||||
|  | 											}} | ||||||
|  | 										> | ||||||
|  | 											<ArchiveBox /> | ||||||
|  | 										</button> | ||||||
|  | 									</Tooltip> | ||||||
| 								</div> | 								</div> | ||||||
| 							{/if} | 							{/if} | ||||||
| 						</div> | 						</div> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek