diff options
Diffstat (limited to 'src/containers/subscription')
-rw-r--r-- | src/containers/subscription/SubscriptionFormScreen.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/containers/subscription/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js index 38e46a7ba..2d1f3d0eb 100644 --- a/src/containers/subscription/SubscriptionFormScreen.js +++ b/src/containers/subscription/SubscriptionFormScreen.js | |||
@@ -1,5 +1,5 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import { remote } from 'electron'; | 2 | import { BrowserWindow, getCurrentWindow } from '@electron/remote'; |
3 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
4 | import { inject, observer } from 'mobx-react'; | 4 | import { inject, observer } from 'mobx-react'; |
5 | 5 | ||
@@ -8,8 +8,6 @@ import PaymentStore from '../../stores/PaymentStore'; | |||
8 | import SubscriptionForm from '../../components/subscription/SubscriptionForm'; | 8 | import SubscriptionForm from '../../components/subscription/SubscriptionForm'; |
9 | import TrialForm from '../../components/subscription/TrialForm'; | 9 | import TrialForm from '../../components/subscription/TrialForm'; |
10 | 10 | ||
11 | const { BrowserWindow } = remote; | ||
12 | |||
13 | export default @inject('stores', 'actions') @observer class SubscriptionFormScreen extends Component { | 11 | export default @inject('stores', 'actions') @observer class SubscriptionFormScreen extends Component { |
14 | static propTypes = { | 12 | static propTypes = { |
15 | onCloseWindow: PropTypes.func, | 13 | onCloseWindow: PropTypes.func, |
@@ -34,7 +32,7 @@ export default @inject('stores', 'actions') @observer class SubscriptionFormScre | |||
34 | hostedPageURL = user.getAuthURL(hostedPageURL); | 32 | hostedPageURL = user.getAuthURL(hostedPageURL); |
35 | 33 | ||
36 | const paymentWindow = new BrowserWindow({ | 34 | const paymentWindow = new BrowserWindow({ |
37 | parent: remote.getCurrentWindow(), | 35 | parent: getCurrentWindow(), |
38 | modal: true, | 36 | modal: true, |
39 | title: '🔒 Franz Supporter License', | 37 | title: '🔒 Franz Supporter License', |
40 | width: 800, | 38 | width: 800, |
@@ -44,6 +42,8 @@ export default @inject('stores', 'actions') @observer class SubscriptionFormScre | |||
44 | webPreferences: { | 42 | webPreferences: { |
45 | nodeIntegration: true, | 43 | nodeIntegration: true, |
46 | webviewTag: true, | 44 | webviewTag: true, |
45 | enableRemoteModule: true, | ||
46 | contextIsolation: false, | ||
47 | }, | 47 | }, |
48 | }); | 48 | }); |
49 | paymentWindow.loadURL(`file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPageURL)}`); | 49 | paymentWindow.loadURL(`file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPageURL)}`); |