mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Expand fs paths with homedir
This commit is contained in:
3 files changed
+29
No files matched your search
@@ -1,8 +1,12 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
import os from 'node:os';
|
||||
|
||||
// Expose protected methods that allow the renderer process to use
|
||||
// ipcRenderer without exposing the entire object
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
// Get the home directory
|
||||
homedir: os.homedir(),
|
||||
|
||||
// Platform information
|
||||
platform: () => ipcRenderer.invoke('get-platform'),
|
||||
|
||||
|
||||
Reference in new issue
Block a user