Logic for opening settings.json (#77)
Co-authored-by: Julian pettersen <darlion2301@gmail.com>
This commit is contained in:
parent
ed2d0045ff
commit
4606f93e52
2 changed files with 9 additions and 1 deletions
|
@ -30,4 +30,11 @@ exports.open = () => {
|
|||
app.relaunch();
|
||||
app.exit();
|
||||
});
|
||||
|
||||
ipcMain.on('of', () => {
|
||||
const { shell } = require('electron')
|
||||
const { getUserData } = require('../paths')
|
||||
const {join} = require('path')
|
||||
shell.openPath(join(getUserData(), 'settings.json'))
|
||||
})
|
||||
};
|
|
@ -4,5 +4,6 @@ const { contextBridge, ipcRenderer } = require('electron');
|
|||
contextBridge.exposeInMainWorld('Native', {
|
||||
restart: () => ipcRenderer.send('cr'),
|
||||
set: c => ipcRenderer.send('cs', c),
|
||||
get: () => ipcRenderer.sendSync('cg')
|
||||
get: () => ipcRenderer.sendSync('cg'),
|
||||
openFile: () => ipcRenderer.send('of')
|
||||
});
|
Loading…
Reference in a new issue