Initial code commit for project

This commit is contained in:
2026-06-09 02:29:12 -06:00
parent 78fb9ad2ac
commit d39e202de2
14 changed files with 4583 additions and 0 deletions

21
preload.js Normal file
View File

@@ -0,0 +1,21 @@
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('electronAPI', {
// USB
usbListDevices: () => ipcRenderer.invoke('usb:listDevices'),
usbConnect: (vendorId, productId) => ipcRenderer.invoke('usb:connect', { vendorId, productId }),
// Preferences
prefsGet: (key) => ipcRenderer.invoke('prefs:get', key),
prefsSet: (key, value) => ipcRenderer.invoke('prefs:set', key, value),
prefsDelete: (key) => ipcRenderer.invoke('prefs:delete', key),
// File Picker
dialogOpenFile: (options) => ipcRenderer.invoke('dialog:openFile', options),
dialogSaveFile: (options) => ipcRenderer.invoke('dialog:saveFile', options),
// System Info
systemCpuTemp: () => ipcRenderer.invoke('system:cpuTemp'),
systemRam: () => ipcRenderer.invoke('system:ram'),
systemGpu: () => ipcRenderer.invoke('system:gpu'),
});