forked from open-webui/open-webui
		
	feat: sidebar button to anchor
This commit is contained in:
		
							parent
							
								
									cb29161146
								
							
						
					
					
						commit
						6fd13c1c55
					
				
					 2 changed files with 13 additions and 29 deletions
				
			
		|  | @ -139,11 +139,9 @@ | ||||||
| 
 | 
 | ||||||
| 		{#if $user?.role === 'admin'} | 		{#if $user?.role === 'admin'} | ||||||
| 			<div class="px-2.5 flex justify-center mt-0.5"> | 			<div class="px-2.5 flex justify-center mt-0.5"> | ||||||
| 				<button | 				<a | ||||||
| 					class="flex-grow flex space-x-3 rounded-md px-3 py-2 hover:bg-gray-900 transition" | 					class="flex-grow flex space-x-3 rounded-md px-3 py-2 hover:bg-gray-900 transition" | ||||||
| 					on:click={async () => { | 					href="/modelfiles" | ||||||
| 						goto('/modelfiles'); |  | ||||||
| 					}} |  | ||||||
| 				> | 				> | ||||||
| 					<div class="self-center"> | 					<div class="self-center"> | ||||||
| 						<svg | 						<svg | ||||||
|  | @ -165,15 +163,13 @@ | ||||||
| 					<div class="flex self-center"> | 					<div class="flex self-center"> | ||||||
| 						<div class=" self-center font-medium text-sm">Modelfiles</div> | 						<div class=" self-center font-medium text-sm">Modelfiles</div> | ||||||
| 					</div> | 					</div> | ||||||
| 				</button> | 				</a> | ||||||
| 			</div> | 			</div> | ||||||
| 
 | 
 | ||||||
| 			<div class="px-2.5 flex justify-center"> | 			<div class="px-2.5 flex justify-center"> | ||||||
| 				<button | 				<a | ||||||
| 					class="flex-grow flex space-x-3 rounded-md px-3 py-2 hover:bg-gray-900 transition" | 					class="flex-grow flex space-x-3 rounded-md px-3 py-2 hover:bg-gray-900 transition" | ||||||
| 					on:click={async () => { | 					href="/prompts" | ||||||
| 						goto('/prompts'); |  | ||||||
| 					}} |  | ||||||
| 				> | 				> | ||||||
| 					<div class="self-center"> | 					<div class="self-center"> | ||||||
| 						<svg | 						<svg | ||||||
|  | @ -195,15 +191,13 @@ | ||||||
| 					<div class="flex self-center"> | 					<div class="flex self-center"> | ||||||
| 						<div class=" self-center font-medium text-sm">Prompts</div> | 						<div class=" self-center font-medium text-sm">Prompts</div> | ||||||
| 					</div> | 					</div> | ||||||
| 				</button> | 				</a> | ||||||
| 			</div> | 			</div> | ||||||
| 
 | 
 | ||||||
| 			<div class="px-2.5 flex justify-center mb-1"> | 			<div class="px-2.5 flex justify-center mb-1"> | ||||||
| 				<button | 				<a | ||||||
| 					class="flex-grow flex space-x-3 rounded-md px-3 py-2 hover:bg-gray-900 transition" | 					class="flex-grow flex space-x-3 rounded-md px-3 py-2 hover:bg-gray-900 transition" | ||||||
| 					on:click={async () => { | 					href="/documents" | ||||||
| 						goto('/documents'); |  | ||||||
| 					}} |  | ||||||
| 				> | 				> | ||||||
| 					<div class="self-center"> | 					<div class="self-center"> | ||||||
| 						<svg | 						<svg | ||||||
|  | @ -225,7 +219,7 @@ | ||||||
| 					<div class="flex self-center"> | 					<div class="flex self-center"> | ||||||
| 						<div class=" self-center font-medium text-sm">Documents</div> | 						<div class=" self-center font-medium text-sm">Documents</div> | ||||||
| 					</div> | 					</div> | ||||||
| 				</button> | 				</a> | ||||||
| 			</div> | 			</div> | ||||||
| 		{/if} | 		{/if} | ||||||
| 
 | 
 | ||||||
|  | @ -360,22 +354,12 @@ | ||||||
| 					} | 					} | ||||||
| 				}) as chat, i} | 				}) as chat, i} | ||||||
| 					<div class=" w-full pr-2 relative"> | 					<div class=" w-full pr-2 relative"> | ||||||
| 						<button | 						<a | ||||||
| 							class=" w-full flex justify-between rounded-md px-3 py-2 hover:bg-gray-900 {chat.id === | 							class=" w-full flex justify-between rounded-md px-3 py-2 hover:bg-gray-900 {chat.id === | ||||||
| 							$chatId | 							$chatId | ||||||
| 								? 'bg-gray-900' | 								? 'bg-gray-900' | ||||||
| 								: ''} transition whitespace-nowrap text-ellipsis" | 								: ''} transition whitespace-nowrap text-ellipsis" | ||||||
| 							on:click={() => { | 							href="/c/{chat.id}" | ||||||
| 								// goto(`/c/${chat.id}`); |  | ||||||
| 								if (chat.id !== chatTitleEditId) { |  | ||||||
| 									chatTitleEditId = null; |  | ||||||
| 									chatTitle = ''; |  | ||||||
| 								} |  | ||||||
| 
 |  | ||||||
| 								if (chat.id !== $chatId) { |  | ||||||
| 									loadChat(chat.id); |  | ||||||
| 								} |  | ||||||
| 							}} |  | ||||||
| 						> | 						> | ||||||
| 							<div class=" flex self-center flex-1"> | 							<div class=" flex self-center flex-1"> | ||||||
| 								<div class=" self-center mr-3"> | 								<div class=" self-center mr-3"> | ||||||
|  | @ -406,7 +390,7 @@ | ||||||
| 									{/if} | 									{/if} | ||||||
| 								</div> | 								</div> | ||||||
| 							</div> | 							</div> | ||||||
| 						</button> | 						</a> | ||||||
| 
 | 
 | ||||||
| 						{#if chat.id === $chatId} | 						{#if chat.id === $chatId} | ||||||
| 							<div class=" absolute right-[22px] top-[10px]"> | 							<div class=" absolute right-[22px] top-[10px]"> | ||||||
|  |  | ||||||
|  | @ -296,7 +296,7 @@ | ||||||
| 			</div> | 			</div> | ||||||
| 
 | 
 | ||||||
| 			<div class=" my-16"> | 			<div class=" my-16"> | ||||||
| 				<div class=" text-2xl font-semibold mb-6">Made by OpenWebUI Community</div> | 				<div class=" text-2xl font-semibold mb-3">Made by OpenWebUI Community</div> | ||||||
| 
 | 
 | ||||||
| 				<a | 				<a | ||||||
| 					class=" flex space-x-4 cursor-pointer w-full mb-3 px-3 py-2" | 					class=" flex space-x-4 cursor-pointer w-full mb-3 px-3 py-2" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek