forked from open-webui/open-webui
		
	refac: share chat page
This commit is contained in:
		
							parent
							
								
									456a78ada9
								
							
						
					
					
						commit
						52e83891b4
					
				
					 1 changed files with 32 additions and 16 deletions
				
			
		|  | @ -3,6 +3,8 @@ | ||||||
| 	import { goto } from '$app/navigation'; | 	import { goto } from '$app/navigation'; | ||||||
| 	import { page } from '$app/stores'; | 	import { page } from '$app/stores'; | ||||||
| 
 | 
 | ||||||
|  | 	import dayjs from 'dayjs'; | ||||||
|  | 
 | ||||||
| 	import { modelfiles, settings, chatId, WEBUI_NAME } from '$lib/stores'; | 	import { modelfiles, settings, chatId, WEBUI_NAME } from '$lib/stores'; | ||||||
| 	import { convertMessagesToHistory } from '$lib/utils'; | 	import { convertMessagesToHistory } from '$lib/utils'; | ||||||
| 
 | 
 | ||||||
|  | @ -135,12 +137,25 @@ | ||||||
| 	<div | 	<div | ||||||
| 		class="min-h-screen max-h-screen w-full flex flex-col text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900" | 		class="min-h-screen max-h-screen w-full flex flex-col text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900" | ||||||
| 	> | 	> | ||||||
| 		<div class="flex flex-col flex-auto"> | 		<div class="flex flex-col flex-auto justify-center"> | ||||||
| 			<div | 			<div | ||||||
| 				class=" py-6 flex flex-col justify-between w-full flex-auto overflow-auto h-0" | 				class=" py-6 flex flex-col justify-center w-full flex-auto overflow-auto h-0 max-w-3xl mx-auto" | ||||||
| 				id="messages-container" | 				id="messages-container" | ||||||
| 			> | 			> | ||||||
| 				<div class=" h-full w-full flex flex-col py-4"> | 				<div class=" h-full w-full flex flex-col py-4"> | ||||||
|  | 					<div> | ||||||
|  | 						<div class=" text-3xl font-semibold line-clamp-1"> | ||||||
|  | 							{title} | ||||||
|  | 						</div> | ||||||
|  | 
 | ||||||
|  | 						<div class=" mt-1 text-gray-400"> | ||||||
|  | 							{dayjs(chat.chat.timestamp).format('MMMM D, YYYY')} | ||||||
|  | 						</div> | ||||||
|  | 					</div> | ||||||
|  | 
 | ||||||
|  | 					<hr class=" dark:border-gray-800 my-6" /> | ||||||
|  | 
 | ||||||
|  | 					<div class="py-2"> | ||||||
| 						<Messages | 						<Messages | ||||||
| 							chatId={$chatId} | 							chatId={$chatId} | ||||||
| 							readOnly={true} | 							readOnly={true} | ||||||
|  | @ -159,4 +174,5 @@ | ||||||
| 				</div> | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
|  | 	</div> | ||||||
| {/if} | {/if} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek