mirror of
				https://github.com/hydralauncher/hydra.git
				synced 2025-03-09 15:40:26 +00:00 
			
		
		
		
	feat: browser window for notification
This commit is contained in:
		
							parent
							
								
									753a293cd7
								
							
						
					
					
						commit
						bdba3dd29c
					
				
					 6 changed files with 150 additions and 17 deletions
				
			
		|  | @ -51,12 +51,21 @@ contextBridge.exposeInMainWorld("electron", { | |||
|   getTrendingGames: () => ipcRenderer.invoke("getTrendingGames"), | ||||
|   getGameAchievements: (objectId: string, shop: GameShop) => | ||||
|     ipcRenderer.invoke("getGameAchievements", objectId, shop), | ||||
|   onAchievementUnlocked: (cb: (objectId: string, shop: GameShop) => void) => { | ||||
|   onAchievementUnlocked: ( | ||||
|     cb: ( | ||||
|       objectId: string, | ||||
|       shop: GameShop, | ||||
|       displayName: string, | ||||
|       iconUrl: string | ||||
|     ) => void | ||||
|   ) => { | ||||
|     const listener = ( | ||||
|       _event: Electron.IpcRendererEvent, | ||||
|       objectId: string, | ||||
|       shop: GameShop | ||||
|     ) => cb(objectId, shop); | ||||
|       shop: GameShop, | ||||
|       displayName: string, | ||||
|       iconUrl: string | ||||
|     ) => cb(objectId, shop, displayName, iconUrl); | ||||
|     ipcRenderer.on("on-achievement-unlocked", listener); | ||||
|     return () => | ||||
|       ipcRenderer.removeListener("on-achievement-unlocked", listener); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue