Upgrade to Electron14 (not working)

-- add @electron/remote module
-- attempt configuration
-- add path-browserify and tsconfig path
This commit is contained in:
Djones4822
2023-02-16 19:02:31 -05:00
parent e977b1599a
commit 571dd7bdba
5 changed files with 79 additions and 151 deletions

View File

@@ -5,6 +5,8 @@ import { Injectable } from '@angular/core'
import * as electron from 'electron'
import { IPCInvokeEvents, IPCEmitEvents } from '../../../electron/shared/IPCHandler'
import { app, getCurrentWindow, dialog, session } from '@electron/remote'
@Injectable({
providedIn: 'root'
})
@@ -23,7 +25,7 @@ export class ElectronService {
}
get currentWindow() {
return this.electron.remote.getCurrentWindow()
return getCurrentWindow()
}
/**
@@ -57,7 +59,7 @@ export class ElectronService {
}
quit() {
this.electron.remote.app.exit()
app.exit()
}
openFolder(filepath: string) {
@@ -69,10 +71,10 @@ export class ElectronService {
}
showOpenDialog(options: Electron.OpenDialogOptions) {
return this.electron.remote.dialog.showOpenDialog(this.currentWindow, options)
return dialog.showOpenDialog(this.currentWindow, options)
}
get defaultSession() {
return this.electron.remote.session.defaultSession
return session.defaultSession
}
}