aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-01 14:26:06 +0100
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-03-01 14:26:06 +0100
commit3b03ae4aadc7a70e1da77acdf432cbacea20df4c (patch)
tree505ea6e93ed0029686748b7c00880246e91efcca /src
parentfinish workspaces mvp (diff)
parentfix module reference (diff)
downloadferdium-app-3b03ae4aadc7a70e1da77acdf432cbacea20df4c.tar.gz
ferdium-app-3b03ae4aadc7a70e1da77acdf432cbacea20df4c.tar.zst
ferdium-app-3b03ae4aadc7a70e1da77acdf432cbacea20df4c.zip
Merge branch 'develop' into feature/workspaces
Diffstat (limited to 'src')
-rw-r--r--src/components/ui/Modal/index.js2
-rw-r--r--src/containers/subscription/SubscriptionFormScreen.js39
2 files changed, 23 insertions, 18 deletions
diff --git a/src/components/ui/Modal/index.js b/src/components/ui/Modal/index.js
index 8e6ec5a0e..0b7154760 100644
--- a/src/components/ui/Modal/index.js
+++ b/src/components/ui/Modal/index.js
@@ -3,9 +3,9 @@ import ReactModal from 'react-modal';
3import PropTypes from 'prop-types'; 3import PropTypes from 'prop-types';
4import classnames from 'classnames'; 4import classnames from 'classnames';
5import injectCSS from 'react-jss'; 5import injectCSS from 'react-jss';
6import { Icon } from '@meetfranz/ui';
6 7
7import styles from './styles'; 8import styles from './styles';
8import { Icon } from '../../../../packages/ui/lib';
9 9
10// ReactModal.setAppElement('#root'); 10// ReactModal.setAppElement('#root');
11 11
diff --git a/src/containers/subscription/SubscriptionFormScreen.js b/src/containers/subscription/SubscriptionFormScreen.js
index 3eb7b6255..cb67ee7f2 100644
--- a/src/containers/subscription/SubscriptionFormScreen.js
+++ b/src/containers/subscription/SubscriptionFormScreen.js
@@ -43,26 +43,31 @@ export default @inject('stores', 'actions') @observer class SubscriptionFormScre
43 }); 43 });
44 44
45 const hostedPage = await stores.payment.createHostedPageRequest; 45 const hostedPage = await stores.payment.createHostedPageRequest;
46 const url = `file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`;
47 46
48 if (hostedPage.url) { 47 if (hostedPage.url) {
49 const paymentWindow = new BrowserWindow({ 48 if (hostedPage.legacyCheckoutFlow) {
50 parent: remote.getCurrentWindow(), 49 const paymentWindow = new BrowserWindow({
51 modal: true, 50 parent: remote.getCurrentWindow(),
52 title: '🔒 Franz Supporter License', 51 modal: true,
53 width: 600, 52 title: '🔒 Franz Supporter License',
54 height: window.innerHeight - 100, 53 width: 600,
55 maxWidth: 600, 54 height: window.innerHeight - 100,
56 minWidth: 600, 55 maxWidth: 600,
57 webPreferences: { 56 minWidth: 600,
58 nodeIntegration: true, 57 webPreferences: {
59 }, 58 nodeIntegration: true,
60 }); 59 },
61 paymentWindow.loadURL(url); 60 });
61 paymentWindow.loadURL(`file://${__dirname}/../../index.html#/payment/${encodeURIComponent(hostedPage.url)}`);
62 62
63 paymentWindow.on('closed', () => { 63 paymentWindow.on('closed', () => {
64 onCloseWindow(); 64 onCloseWindow();
65 }); 65 });
66 } else {
67 actions.app.openExternalUrl({
68 url: hostedPage.url,
69 });
70 }
66 } 71 }
67 } 72 }
68 73