Initial commit
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const { app, BrowserWindow, ipcMain } = require('electron');
|
||||
const path = require('path');
|
||||
|
||||
function createWindow() {
|
||||
const win = new BrowserWindow({
|
||||
width: 550,
|
||||
height: 800,
|
||||
frame: false,
|
||||
transparent: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
webSecurity: false // Важно для работы с Obsidian API
|
||||
}
|
||||
});
|
||||
|
||||
win.loadFile('index.html');
|
||||
// win.webContents.openDevTools(); // Раскомментируйте для отладки
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow);
|
||||
ipcMain.on('close-app', () => app.quit());
|
||||
ipcMain.on('minimize-app', () => {
|
||||
const win = BrowserWindow.getFocusedWindow();
|
||||
if (win) win.minimize();
|
||||
});
|
||||
Reference in New Issue
Block a user