1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

refactor: modifications for electron 12 support

This commit is contained in:
2021-04-26 10:07:47 +02:00
parent 2d85295093
commit 15948b30c9
4 changed files with 36 additions and 30 deletions

View File

@ -25,7 +25,8 @@
<script>
import { mapActions, mapGetters } from 'vuex';
import { ipcRenderer, remote } from 'electron';
import { ipcRenderer } from 'electron';
import { Menu, getCurrentWindow } from '@electron/remote';
export default {
name: 'App',
@ -60,8 +61,6 @@ export default {
ipcRenderer.send('check-for-updates');
this.checkVersionUpdate();
const Menu = remote.Menu;
const InputMenu = Menu.buildFromTemplate([
{
label: this.$t('word.cut'),
@ -92,7 +91,7 @@ export default {
while (node) {
if (node.nodeName.match(/^(input|textarea)$/i) || node.isContentEditable) {
InputMenu.popup(remote.getCurrentWindow());
InputMenu.popup(getCurrentWindow());
break;
}
node = node.parentNode;