mirror of
				https://github.com/open-webui/open-webui
				synced 2025-06-26 18:26:48 +00:00 
			
		
		
		
	refac
This commit is contained in:
		
							parent
							
								
									5f89c1b137
								
							
						
					
					
						commit
						3e7077bb73
					
				| @ -1142,9 +1142,10 @@ async def get_app_config(request: Request): | ||||
|         if data is not None and "id" in data: | ||||
|             user = Users.get_user_by_id(data["id"]) | ||||
| 
 | ||||
|     user_count = Users.get_num_users() | ||||
|     onboarding = False | ||||
| 
 | ||||
|     if user is None: | ||||
|         user_count = Users.get_num_users() | ||||
|         onboarding = user_count == 0 | ||||
| 
 | ||||
|     return { | ||||
| @ -1213,6 +1214,14 @@ async def get_app_config(request: Request): | ||||
|                     "api_key": GOOGLE_DRIVE_API_KEY.value, | ||||
|                 }, | ||||
|                 "onedrive": {"client_id": ONEDRIVE_CLIENT_ID.value}, | ||||
|                 **( | ||||
|                     { | ||||
|                         "record_count": user_count, | ||||
|                         "active_entries": app.state.USER_COUNT, | ||||
|                     } | ||||
|                     if user.role == "admin" | ||||
|                     else {} | ||||
|                 ), | ||||
|             } | ||||
|             if user is not None | ||||
|             else {} | ||||
|  | ||||
| @ -334,7 +334,7 @@ | ||||
| 							<button | ||||
| 								class="min-w-fit outline-none p-1.5 {selectedTag === '' | ||||
| 									? '' | ||||
| 									: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition" | ||||
| 									: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition capitalize" | ||||
| 								on:click={() => { | ||||
| 									selectedTag = ''; | ||||
| 								}} | ||||
| @ -346,7 +346,7 @@ | ||||
| 								<button | ||||
| 									class="min-w-fit outline-none p-1.5 {selectedTag === tag | ||||
| 										? '' | ||||
| 										: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition" | ||||
| 										: 'text-gray-300 dark:text-gray-600 hover:text-gray-700 dark:hover:text-white'} transition capitalize" | ||||
| 									on:click={() => { | ||||
| 										selectedTag = tag; | ||||
| 									}} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user