|
| 1 | +const { contextBridge, ipcRenderer } = require('electron'); |
| 2 | + |
| 3 | +contextBridge.exposeInMainWorld('electronApi', { |
| 4 | + launchApp: (appName) => ipcRenderer.invoke('launchApp', appName), |
| 5 | + systemAction: (action) => ipcRenderer.invoke('systemAction', action), |
| 6 | + launchSettings: () => ipcRenderer.invoke('launchSettings'), |
| 7 | + audioAction: (action) => ipcRenderer.invoke('audioAction', action), |
| 8 | + displayAction: (action) => ipcRenderer.invoke('displayAction', action), |
| 9 | + networkAction: (action) => ipcRenderer.invoke('networkAction', action), |
| 10 | + powerAction: (profile) => ipcRenderer.invoke('powerAction', profile), |
| 11 | + setLanguage: (newLang) => ipcRenderer.invoke('setLanguage', newLang), |
| 12 | + selectWifi: (ssid) => ipcRenderer.invoke('selectWifi', ssid), |
| 13 | + connectWifi: () => ipcRenderer.invoke('connectWifi'), |
| 14 | + scanBluetooth: () => ipcRenderer.invoke('scanBluetooth'), |
| 15 | + selectBluetooth: (deviceId) => ipcRenderer.invoke('selectBluetooth', deviceId), |
| 16 | + pairBluetooth: () => ipcRenderer.invoke('pairBluetooth'), |
| 17 | + closeSettings: () => ipcRenderer.invoke('closeSettings'), |
| 18 | + initSettings: () => ipcRenderer.invoke('initSettings') |
| 19 | +}); |
0 commit comments