Skip to content

Commit

Permalink
🪟 update electron to 23
Browse files Browse the repository at this point in the history
sadly this will break linux file-dialog attachment due to an upstream bug
  • Loading branch information
anuejn authored and pajowu committed May 3, 2023
1 parent 5dfc2a5 commit 7614880
Show file tree
Hide file tree
Showing 6 changed files with 1,875 additions and 7,469 deletions.
22 changes: 6 additions & 16 deletions app/main_process/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,21 @@ export const createWindow = (): void => {
const window = new BrowserWindow({
height: 600,
width: 800,
frame: false,
titleBarStyle: 'hiddenInset',
titleBarOverlay: true,
titleBarStyle: 'hidden',
trafficLightPosition: { x: 21, y: 21 },
titleBarOverlay: {
color: '#fff',
symbolColor: '#000',
height: 55,
},
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableBlinkFeatures: 'ClipboardCustomFormats',
nativeWindowOpen: true,
},
show: false,
});

window.webContents.on('new-window', (event, url, frameName, disposition, options) => {
if (frameName === 'modal') {
event.preventDefault();
event.newGuest = new BrowserWindow({
...options,
parent: window,
width: 500,
height: 400,
});
}
});

if (process.env.NODE_ENV === 'development') {
installExtension([REDUX_DEVTOOLS, REACT_DEVELOPER_TOOLS])
.then((name: string) => console.log(`Added Extension: ${name}`))
Expand Down
2 changes: 1 addition & 1 deletion app/main_process/vite_main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
build: {
lib: {
entry: 'index.ts',
fileName: 'start',
fileName: 'start.cjs',
formats: ['cjs'],
},
outDir: '../build/main_process/',
Expand Down
Loading

0 comments on commit 7614880

Please sign in to comment.