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

MISC: Added a quit button

parent e0545167
Aucune branche associée trouvée
Aucune étiquette associée trouvée
2 requêtes de fusion!3Dev kubat,!1Create basic lib
......@@ -7,12 +7,20 @@
<link rel="stylesheet" href="../style/bootstrap-4.5.2-dist/css/bootstrap.min.css">
<script src="../style/jquery/jquery-3.5.1.js"></script>
<script src="../style/bootstrap-4.5.2-dist/js/bootstrap.min.js"></script>
<script src="./index.js"></script>
</head>
<body>
<div class="container">
<h2 class="text-center">
LektorApp Admin Interface
</h2>
<div class="card">
<div class="card-header text-center">
<h2 class="text-center">
LektorApp Admin Interface
</h2>
</div>
<div class="card-body text-center">
<button id="closeButton" type="button" class="btn btn-outline-primary">
Quit LektorApp
</button>
</div>
</div>
</body>
</html>
const {ipcRenderer} = require('electron');
window.onload = function(){
const closeApp = document.getElementById("closeButton");
closeApp.addEventListener('click', () => {
ipcRenderer.send('close-app')
});
}
\ No newline at end of file
const electron = require('electron')
const { app, BrowserWindow } = require('electron')
const {ipcMain} = require('electron')
/** Creates the main window and process for the admin interface
......@@ -18,7 +18,7 @@ function createInstanceWindow () {
})
// and load the index.html of the app.
win.loadFile('instance/index.html')
win.loadFile('instance/index.html');
}
......@@ -43,6 +43,9 @@ function createExpressClient (){
ipcMain.on('close-app', (evt, arg) => {
app.quit()
})
app.on('ready', () => {
......
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