Fix quit button
This commit is contained in:
parent
c710b5c27b
commit
d3f76d205a
|
@ -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>
|
||||
|
|
4
main.js
4
main.js
|
@ -309,4 +309,8 @@ ipcMain.on('uploadFW', (e, args) => {
|
|||
|
||||
ipcMain.handle('getAppVersion', async (e) => {
|
||||
return app.getVersion();
|
||||
});
|
||||
|
||||
ipcMain.handle('quit-app', () => {
|
||||
app.quit();
|
||||
});
|
|
@ -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');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue