UC done v1.0

This commit is contained in:
andrei-mihnea-cerbu
2024-03-27 17:15:57 +02:00
parent 5f902e1a28
commit d1d238287a
56 changed files with 4964 additions and 81 deletions
+34
View File
@@ -0,0 +1,34 @@
const {app, BrowserWindow, screen, Menu} = require("electron");
const path = require("path")
const isMac = process.platform === 'darwin';
const createMainWindow = ((title, width, height) => {
const mainWindows = new BrowserWindow({
title: title,
width: width,
height: height
});
mainWindows.loadFile(path.join(__dirname, '..', 'renderer', 'index.html'))
.then(r => console.log('Main window works!'));
})
app.whenReady().then(() => {
const title = "Application"
const mainScreen = screen.getPrimaryDisplay();
const {width: width, height: height} = mainScreen.size;
createMainWindow(title, width / 1.5, height / 1.5)
app.on('activate', () => {
if(BrowserWindow.getAllWindows().length === 0){
createMainWindow(title, width, height);
}
})
})
app.on('window-all-closed', () =>{
if(!isMac){
app.quit();
}
})
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content = "IE=edge">
<meta name="viewport" content="width=device width, initial-scale=1.0">
<title>App</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>