Files
actual/packages/desktop-electron/about.js
Jed Fox 5d559afe30 Enable linting for all packages (#861)
<!-- Thank you for submitting a pull request! Make sure to follow the
instructions to write release notes for your PR — it should only take a
minute or two:
https://github.com/actualbudget/docs#writing-good-release-notes -->
2023-04-06 15:49:43 -04:00

32 lines
677 B
JavaScript

const { BrowserWindow } = require('electron');
const isDev = require('electron-is-dev');
let window;
function openAboutWindow() {
if (window != null) {
window.focus();
return window;
}
window = new BrowserWindow({
width: 290,
height: process.platform === 'win32' ? 255 : 240,
show: true,
resizable: isDev,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});
window.setBackgroundColor('white');
window.setTitle('');
window.loadURL(`file://${__dirname}/about/about.html`);
window.once('closed', () => {
window = null;
});
}
module.exports = { openAboutWindow, getWindow: () => window };