mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Set minimum windows boundaries
This commit is contained in:
+12
-10
@@ -1,15 +1,17 @@
|
|||||||
import { app, BrowserWindow } from 'electron';
|
import { app, BrowserWindow } from 'electron';
|
||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
const win = new BrowserWindow({
|
const win = new BrowserWindow({
|
||||||
title: 'Main window',
|
title: 'Main window',
|
||||||
})
|
minWidth: 650,
|
||||||
|
minHeight: 420
|
||||||
|
})
|
||||||
|
|
||||||
// You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve`
|
// You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve`
|
||||||
if (process.env.VITE_DEV_SERVER_URL) {
|
if (process.env.VITE_DEV_SERVER_URL) {
|
||||||
win.loadURL(process.env.VITE_DEV_SERVER_URL)
|
win.loadURL(process.env.VITE_DEV_SERVER_URL)
|
||||||
} else {
|
} else {
|
||||||
// Load your file
|
// Load your file
|
||||||
win.loadFile('dist/index.html');
|
win.loadFile('dist/index.html');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user