Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 9033eb6b rédigé par Sting's avatar Sting Validation de Kubat
Parcourir les fichiers

MISC: Basic skeleton for client + admin interface

parent 8426ba82
Aucune branche associée trouvée
Aucune étiquette associée trouvée
2 requêtes de fusion!3Dev kubat,!1Create basic lib
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Lektor App</title>
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<link rel="stylesheet" href="../style/bootstrap-4.5.2-dist/css/bootstrap.min.css">
<script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
<!-- main file running the express app -->
<script src='./main.js' type='text/javascript'></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
...@@ -5,8 +5,15 @@ ...@@ -5,8 +5,15 @@
<title>Lektor App</title> <title>Lektor App</title>
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag --> <!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" /> <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
<link rel="stylesheet" href="../style/bootstrap-4.5.2-dist/css/bootstrap.min.css">
<script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
</head> </head>
<body> <body>
toto <div class="container">
<h2 class="text-center">
LektorApp Admin Interface
</h2>
</div>
</body> </body>
</html> </html>
const electron = require('electron') const electron = require('electron')
const { app, BrowserWindow } = require('electron') const { app, BrowserWindow } = require('electron')
function createWindow () { function createInstanceWindow () {
// Create the browser window. // Create the browser window.
const win = new BrowserWindow({ const win = new BrowserWindow({
width: 800, width: 800,
height: 600, height: 600,
frame: false,
webPreferences: { webPreferences: {
nodeIntegration: true nodeIntegration: true
} }
...@@ -15,4 +16,19 @@ function createWindow () { ...@@ -15,4 +16,19 @@ function createWindow () {
win.loadFile('instance/index.html') win.loadFile('instance/index.html')
} }
app.whenReady().then(createWindow)
function createExpressClient (){
const win = new BrowserWindow({ show: false });
win.loadFile('client/index.html');
}
app.on('ready', () => {
console.log('Ready');
createInstanceWindow();
createExpressClient();
});
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter