mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-27 16:10:32 +00:00
add button to quickly relaunch electron app after changing interfaces
This commit is contained in:
parent
c7b9b1d580
commit
dad956ab14
3 changed files with 25 additions and 3 deletions
|
|
@ -35,6 +35,12 @@ ipcMain.handle('prompt', async(event, message) => {
|
|||
});
|
||||
});
|
||||
|
||||
// allow relaunching app via ipc
|
||||
ipcMain.handle('relaunch', async() => {
|
||||
app.relaunch();
|
||||
app.exit();
|
||||
});
|
||||
|
||||
function log(message) {
|
||||
|
||||
// make sure main window exists
|
||||
|
|
|
|||
|
|
@ -20,4 +20,9 @@ contextBridge.exposeInMainWorld('electron', {
|
|||
return await ipcRenderer.invoke('prompt', message);
|
||||
},
|
||||
|
||||
// allow relaunching app in electron browser window
|
||||
relaunch: async function() {
|
||||
return await ipcRenderer.invoke('relaunch');
|
||||
},
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue