/** * This file will automatically be loaded by vite and run in the "renderer" context. * To learn more about the differences between the "main" and the "renderer" context in * Electron, visit: * * https://electronjs.org/docs/tutorial/process-model * * By default, Node.js integration in this file is disabled. When enabling Node.js integration * in a renderer process, please be aware of potential security implications. You can read * more about security risks here: * * https://electronjs.org/docs/tutorial/security * * To enable Node.js integration in this file, open up `main.ts` and enable the `nodeIntegration` * flag: * * ``` * // Create the browser window. * mainWindow = new BrowserWindow({ * width: 800, * height: 600, * webPreferences: { * nodeIntegration: true * } * }); * ``` */ import React, { useState } from 'react'; import { createRoot } from 'react-dom/client'; import { Button } from '@/components/ui/button'; import '@/styles/globals.css'; import ShortcutIndicator from '../components/ShortcutIndicator'; import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs'; // import { Waveform } from '../components/Waveform'; // Waveform might not be needed if hook is removed // import { useRecording } from '../hooks/useRecording'; // Remove hook import const NUM_WAVEFORM_BARS = 10; // This might be unused now const App: React.FC = () => { const [apiKey, setApiKey] = useState(''); const handleApiKeyChange = (event: React.ChangeEvent) => { setApiKey(event.target.value); }; const handleSaveApiKey = () => { window.electronAPI.setApiKey(apiKey); alert('API Key sent to main process!'); }; return (
Dictionary Configure API Key Dictionary Tab Content API Key Configuration Content
); }; const container = document.getElementById('root'); if (container) { const root = createRoot(container); root.render(); }