feat: Initialize the Electron frontend with core UI components and integrate Convex backend services.
This commit is contained in:
@@ -7,6 +7,7 @@ function createWindow() {
|
||||
const win = new BrowserWindow({
|
||||
width: 1200,
|
||||
height: 800,
|
||||
frame: false,
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
@@ -30,6 +31,22 @@ function createWindow() {
|
||||
app.whenReady().then(() => {
|
||||
createWindow();
|
||||
|
||||
ipcMain.on('window-minimize', () => {
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
if (win) win.minimize();
|
||||
});
|
||||
ipcMain.on('window-maximize', () => {
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
if (win) {
|
||||
if (win.isMaximized()) win.unmaximize();
|
||||
else win.maximize();
|
||||
}
|
||||
});
|
||||
ipcMain.on('window-close', () => {
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
if (win) win.close();
|
||||
});
|
||||
|
||||
// Helper to fetch metadata (Zero-Knowledge: Client fetches previews)
|
||||
ipcMain.handle('fetch-metadata', async (event, url) => {
|
||||
return new Promise((resolve) => {
|
||||
|
||||
Reference in New Issue
Block a user