mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Add Electron support
This commit is contained in:
25 files changed
+6304
-16
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
|
||||
// Expose protected methods that allow the renderer process to use
|
||||
// ipcRenderer without exposing the entire object
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
// Platform information
|
||||
platform: () => ipcRenderer.invoke('get-platform'),
|
||||
|
||||
// App version
|
||||
version: () => ipcRenderer.invoke('get-app-version'),
|
||||
|
||||
// Flag to indicate we're running in Electron
|
||||
isElectron: true,
|
||||
});
|
||||
Reference in new issue
Block a user