mirror of
				https://github.com/hydralauncher/hydra.git
				synced 2025-03-09 15:40:26 +00:00 
			
		
		
		
	Merge branch 'fix/migrate-repacks-from-sqlite-to-dexie' of github.com:hydralauncher/hydra into fix/migrate-repacks-from-sqlite-to-dexie
This commit is contained in:
		
						commit
						2aa393967f
					
				
					 14 changed files with 240 additions and 50 deletions
				
			
		|  | @ -5,6 +5,7 @@ import { useAppSelector, useUserDetails } from "@renderer/hooks"; | |||
| import { useEffect, useMemo, useRef } from "react"; | ||||
| import { useTranslation } from "react-i18next"; | ||||
| import { UserFriendModalTab } from "@renderer/pages/shared-modals/user-friend-modal"; | ||||
| import SteamLogo from "@renderer/assets/steam-logo.svg?react"; | ||||
| 
 | ||||
| const LONG_POLLING_INTERVAL = 60_000; | ||||
| 
 | ||||
|  | @ -68,6 +69,23 @@ export function SidebarProfile() { | |||
|     ); | ||||
|   }, [userDetails, t, friendRequestCount, showFriendsModal]); | ||||
| 
 | ||||
|   const gameRunningDetails = () => { | ||||
|     if (!userDetails || !gameRunning) return null; | ||||
| 
 | ||||
|     if (gameRunning.iconUrl) { | ||||
|       return ( | ||||
|         <img | ||||
|           alt={gameRunning.title} | ||||
|           width={24} | ||||
|           style={{ borderRadius: 4 }} | ||||
|           src={gameRunning.iconUrl} | ||||
|         /> | ||||
|       ); | ||||
|     } | ||||
| 
 | ||||
|     return <SteamLogo />; | ||||
|   }; | ||||
| 
 | ||||
|   return ( | ||||
|     <div className={styles.profileContainer}> | ||||
|       <button | ||||
|  | @ -108,14 +126,7 @@ export function SidebarProfile() { | |||
|             )} | ||||
|           </div> | ||||
| 
 | ||||
|           {userDetails && gameRunning && ( | ||||
|             <img | ||||
|               alt={gameRunning.title} | ||||
|               width={24} | ||||
|               style={{ borderRadius: 4 }} | ||||
|               src={gameRunning.iconUrl!} | ||||
|             /> | ||||
|           )} | ||||
|           {gameRunningDetails()} | ||||
|         </div> | ||||
|       </button> | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue