mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Add Iris Studio app
- Add the Electron studio (electron-vite, React, three) - Ignore node_modules and build output under studio/
This commit is contained in:
1 parent
832070cd69
commit
564dcdcc72
252 files changed
+24496
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { contextBridge, ipcRenderer, type IpcRendererEvent } from 'electron'
|
||||
import type { StoredShortcuts, StudioHost, ThemeChoice } from '../shared/bridge'
|
||||
|
||||
const host: StudioHost = {
|
||||
listBridges: () => ipcRenderer.invoke('studio:list-bridges'),
|
||||
initialLink: () => ipcRenderer.invoke('studio:initial-link'),
|
||||
onLink: (listener) => {
|
||||
const forward = (_event: IpcRendererEvent, link: string): void => listener(link)
|
||||
ipcRenderer.on('studio:link', forward)
|
||||
return () => ipcRenderer.removeListener('studio:link', forward)
|
||||
},
|
||||
setTheme: (theme: ThemeChoice) => ipcRenderer.send('studio:set-theme', theme),
|
||||
copyText: (text: string) => ipcRenderer.send('studio:copy-text', text),
|
||||
loadShortcuts: () => ipcRenderer.invoke('studio:load-shortcuts'),
|
||||
saveShortcuts: (shortcuts: StoredShortcuts) => ipcRenderer.send('studio:save-shortcuts', shortcuts),
|
||||
graphics: () => ipcRenderer.invoke('studio:graphics'),
|
||||
useDedicatedGpu: (dedicated: boolean) => ipcRenderer.send('studio:use-dedicated-gpu', dedicated)
|
||||
}
|
||||
|
||||
contextBridge.exposeInMainWorld('studio', host)
|
||||
Reference in new issue
Block a user