aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-26 21:05:50 +0530
committerLibravatar GitHub <noreply@github.com>2021-05-26 21:05:50 +0530
commit296ce5ce62bcde6888df291f97105fa912ed7d35 (patch)
treeb28e7d2373f1020c1183469aa3a9feafecede569 /src/containers
parentAdded new entry in context menu: 'Download image' (#1449) (diff)
downloadferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.tar.gz
ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.tar.zst
ferdium-app-296ce5ce62bcde6888df291f97105fa912ed7d35.zip
Replace 'remote' with 'electron/remote' (#1448)
* Locked new version of 'recipes' submodule with corresponding changes.
Diffstat (limited to 'src/containers')
-rw-r--r--src/containers/settings/RecipesScreen.js5
-rw-r--r--src/containers/subscription/SubscriptionFormScreen.js8
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 @@
1import { remote, shell } from 'electron'; 1import { shell } from 'electron';
2import { app } from '@electron/remote';
2import fs from 'fs-extra'; 3import fs from 'fs-extra';
3import React, { Component } from 'react'; 4import React, { Component } from 'react';
4import PropTypes from 'prop-types'; 5import PropTypes from 'prop-types';
@@ -17,8 +18,6 @@ import { FRANZ_DEV_DOCS, RECIPES_PATH } from '../../config';
17import { communityRecipesStore } from '../../features/communityRecipes'; 18import { communityRecipesStore } from '../../features/communityRecipes';
18import RecipePreview from '../../models/RecipePreview'; 19import RecipePreview from '../../models/RecipePreview';
19 20
20const { app } = remote;
21
22export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { 21export 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 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import { remote } from 'electron'; 2import { BrowserWindow, getCurrentWindow } from '@electron/remote';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import { inject, observer } from 'mobx-react'; 4import { inject, observer } from 'mobx-react';
5 5
@@ -8,8 +8,6 @@ import PaymentStore from '../../stores/PaymentStore';
8import SubscriptionForm from '../../components/subscription/SubscriptionForm'; 8import SubscriptionForm from '../../components/subscription/SubscriptionForm';
9import TrialForm from '../../components/subscription/TrialForm'; 9import TrialForm from '../../components/subscription/TrialForm';
10 10
11const { BrowserWindow } = remote;
12
13export default @inject('stores', 'actions') @observer class SubscriptionFormScreen extends Component { 11export 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)}`);