forked from Qortal/qortal-ui
Add clear cache
This commit is contained in:
parent
3b26e82d42
commit
38c4c7baa2
@ -10,7 +10,8 @@ const {
|
|||||||
dialog,
|
dialog,
|
||||||
webContents,
|
webContents,
|
||||||
nativeTheme,
|
nativeTheme,
|
||||||
crashReporter
|
crashReporter,
|
||||||
|
webFrame
|
||||||
} = require('electron')
|
} = require('electron')
|
||||||
|
|
||||||
const { autoUpdater } = require('electron-updater')
|
const { autoUpdater } = require('electron-updater')
|
||||||
@ -1031,6 +1032,12 @@ if (!isLock) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
ipcMain.on('clear-all-cache', (event) => {
|
||||||
|
const theWindows = BrowserWindow.getAllWindows()[0]
|
||||||
|
const ses = theWindows.webContents.session
|
||||||
|
console.clear()
|
||||||
|
ses.clearCache()
|
||||||
|
})
|
||||||
ipcMain.on('check-for-update', (event) => {
|
ipcMain.on('check-for-update', (event) => {
|
||||||
const check = new Notification({
|
const check = new Notification({
|
||||||
title: i18n.__("electron_translate_43"),
|
title: i18n.__("electron_translate_43"),
|
||||||
|
@ -5,4 +5,5 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
|||||||
checkForUpdate: () => ipcRenderer.send('check-for-update'),
|
checkForUpdate: () => ipcRenderer.send('check-for-update'),
|
||||||
showMyMenu: () => ipcRenderer.send('show-my-menu'),
|
showMyMenu: () => ipcRenderer.send('show-my-menu'),
|
||||||
focusApp: () => ipcRenderer.send('focus-app'),
|
focusApp: () => ipcRenderer.send('focus-app'),
|
||||||
|
clearMyCache: () => ipcRenderer.send('clear-all-cache'),
|
||||||
})
|
})
|
Loading…
x
Reference in New Issue
Block a user