diff options
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/RecipesScreen.js | 5 | ||||
-rw-r--r-- | src/containers/subscription/SubscriptionFormScreen.js | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 40e32ff37..74abcacee 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -1,4 +1,5 @@ | |||
1 | import { remote, shell } from 'electron'; | 1 | import { shell } from 'electron'; |
2 | import { app } from '@electron/remote'; | ||
2 | import fs from 'fs-extra'; | 3 | import fs from 'fs-extra'; |
3 | import React, { Component } from 'react'; | 4 | import React, { Component } from 'react'; |
4 | import PropTypes from 'prop-types'; | 5 | import PropTypes from 'prop-types'; |
@@ -17,8 +18,6 @@ import { FRANZ_DEV_DOCS, RECIPES_PATH } from '../../config'; | |||
17 | import { communityRecipesStore } from '../../features/communityRecipes'; | 18 | import { communityRecipesStore } from '../../features/communityRecipes'; |
18 | import RecipePreview from '../../models/RecipePreview'; | 19 | import RecipePreview from '../../models/RecipePreview'; |
19 | 20 | ||
20 | const { app } = remote; | ||
21 | |||
22 | export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { | 21 | export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { |
23 | static propTypes = { | 22 | static propTypes = { |
24 | params: PropTypes.shape({ | 23 | params: PropTypes.shape({ |
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)}`); |