This commit is contained in:
Joan
2025-11-27 16:27:01 +01:00
parent 33cc9586c2
commit 81f8912059
304 changed files with 56149 additions and 10122 deletions

17
pwa/electron/preload.js Normal file
View File

@@ -0,0 +1,17 @@
const { contextBridge, ipcRenderer } = require('electron')
// Expose protected methods that allow the renderer process to use
// ipcRenderer without exposing the entire object
contextBridge.exposeInMainWorld('electronAPI', {
// Get Steam authentication data
getSteamAuth: () => ipcRenderer.invoke('get-steam-auth'),
// Check if Steam is available
isSteamAvailable: () => ipcRenderer.invoke('is-steam-available'),
// Get platform info
getPlatform: () => ipcRenderer.invoke('get-platform'),
// Flag to indicate we're running in Electron
isElectron: true
})