diff options
author | 2021-05-26 21:05:50 +0530 | |
---|---|---|
committer | 2021-05-26 21:05:50 +0530 | |
commit | 296ce5ce62bcde6888df291f97105fa912ed7d35 (patch) | |
tree | b28e7d2373f1020c1183469aa3a9feafecede569 /src/stores/PaymentStore.js | |
parent | Added new entry in context menu: 'Download image' (#1449) (diff) | |
download | ferdium-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/stores/PaymentStore.js')
-rw-r--r-- | src/stores/PaymentStore.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stores/PaymentStore.js b/src/stores/PaymentStore.js index 69e6eb9c3..05bb5b3d0 100644 --- a/src/stores/PaymentStore.js +++ b/src/stores/PaymentStore.js | |||
@@ -1,12 +1,10 @@ | |||
1 | import { action, observable, computed } from 'mobx'; | 1 | import { action, observable, computed } from 'mobx'; |
2 | import { remote } from 'electron'; | 2 | import { BrowserWindow, getCurrentWindow } from '@electron/remote'; |
3 | 3 | ||
4 | import Store from './lib/Store'; | 4 | import Store from './lib/Store'; |
5 | import CachedRequest from './lib/CachedRequest'; | 5 | import CachedRequest from './lib/CachedRequest'; |
6 | import Request from './lib/Request'; | 6 | import Request from './lib/Request'; |
7 | 7 | ||
8 | const { BrowserWindow } = remote; | ||
9 | |||
10 | export default class PaymentStore extends Store { | 8 | export default class PaymentStore extends Store { |
11 | @observable plansRequest = new CachedRequest(this.api.payment, 'plans'); | 9 | @observable plansRequest = new CachedRequest(this.api.payment, 'plans'); |
12 | 10 | ||
@@ -43,7 +41,7 @@ export default class PaymentStore extends Store { | |||
43 | hostedPageURL = this.stores.user.getAuthURL(`${parsedUrl.origin}${parsedUrl.pathname}?${params.toString()}`); | 41 | hostedPageURL = this.stores.user.getAuthURL(`${parsedUrl.origin}${parsedUrl.pathname}?${params.toString()}`); |
44 | 42 | ||
45 | const win = new BrowserWindow({ | 43 | const win = new BrowserWindow({ |
46 | parent: remote.getCurrentWindow(), | 44 | parent: getCurrentWindow(), |
47 | modal: true, | 45 | modal: true, |
48 | title: '🔒 Upgrade Your Franz Account', | 46 | title: '🔒 Upgrade Your Franz Account', |
49 | width: 800, | 47 | width: 800, |
@@ -54,6 +52,8 @@ export default class PaymentStore extends Store { | |||
54 | webPreferences: { | 52 | webPreferences: { |
55 | nodeIntegration: true, | 53 | nodeIntegration: true, |
56 | webviewTag: true, | 54 | webviewTag: true, |
55 | enableRemoteModule: true, | ||
56 | contextIsolation: false, | ||
57 | }, | 57 | }, |
58 | }); | 58 | }); |
59 | win.loadURL(`file://${__dirname}/../index.html#/payment/${encodeURIComponent(hostedPageURL)}`); | 59 | win.loadURL(`file://${__dirname}/../index.html#/payment/${encodeURIComponent(hostedPageURL)}`); |