feat: initialize project scaffold with Electron structure, transcription engine, and dark-themed UI components

This commit is contained in:
Ümit Tunç
2026-04-23 07:40:05 +03:00
parent f05ec04f47
commit d00250948a
14 changed files with 7032 additions and 3 deletions
+22
View File
@@ -0,0 +1,22 @@
import { contextBridge, ipcRenderer } from 'electron'
import { exposeElectronAPI } from '@electron-toolkit/preload'
const api = {
windowControls: (action) => ipcRenderer.send('window-controls', action),
startTranscription: (filePath, options) => ipcRenderer.invoke('start-transcription', { filePath, options }),
onTranscriptionProgress: (callback) => ipcRenderer.on('transcription-progress', (_, progress) => callback(progress)),
onTranscriptionData: (callback) => ipcRenderer.on('transcription-data', (_, data) => callback(data)),
detectHardware: () => ipcRenderer.invoke('detect-hardware')
}
if (process.contextIsolated) {
try {
exposeElectronAPI()
contextBridge.exposeInMainWorld('api', api)
} catch (error) {
console.error(error)
}
} else {
window.electron = exposeElectronAPI()
window.api = api
}