Fix quit button

This commit is contained in:
DeionSi 2023-01-13 19:53:38 +01:00
parent c710b5c27b
commit d3f76d205a
3 changed files with 14 additions and 2 deletions

View File

@ -123,7 +123,7 @@
<li><input type='button' value="Get Base Tune" id="btnBasetune" /></li>
</ul>
<ul class="actions">
<li><input type='button' value="Exit" id="btnExit" onclick="quit();" /></li>
<li><input type='button' value="Exit" id="btnExit" /></li>
</ul>
</div>
</section>
@ -146,7 +146,7 @@
</div>
<ul class="actions">
<li><input type='button' id="btnDownloadBasetune" value="Download tune" /></li>
<li><input type='button' value="Exit" id="btnExit" onclick="quit();" /></li>
<li><input type='button' value="Exit" id="btnExit2" /></li>
</ul>
</p>
</div>

View File

@ -309,4 +309,8 @@ ipcMain.on('uploadFW', (e, args) => {
ipcMain.handle('getAppVersion', async (e) => {
return app.getVersion();
});
ipcMain.handle('quit-app', () => {
app.quit();
});

View File

@ -634,3 +634,11 @@ window.onload = function () {
};
window.addEventListener('DOMContentLoaded', () => {
document.getElementById('btnExit').addEventListener('click', () => {
ipcRenderer.invoke('quit-app');
});
document.getElementById('btnExit2').addEventListener('click', () => {
ipcRenderer.invoke('quit-app');
});
});