diff options
author | Vijay A <avijayr@protonmail.com> | 2021-07-17 20:32:22 +0530 |
---|---|---|
committer | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-07-20 16:02:15 +0000 |
commit | 45373f655f68fdd0b320cde175b6108454ad4731 (patch) | |
tree | c1ccb0c73639d754b68a36a1977b74471fe4b566 /src/components/subscription/SubscriptionPopup.js | |
parent | New Crowdin updates (#1668) (diff) | |
download | ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.tar.gz ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.tar.zst ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.zip |
Removed Franz paid plans features:
- serviceLimit
- planSelection
- trialStatusBar
and other Franz features that were for different tiers of subscription.
Diffstat (limited to 'src/components/subscription/SubscriptionPopup.js')
-rw-r--r-- | src/components/subscription/SubscriptionPopup.js | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/components/subscription/SubscriptionPopup.js b/src/components/subscription/SubscriptionPopup.js deleted file mode 100644 index 0df43fd4b..000000000 --- a/src/components/subscription/SubscriptionPopup.js +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { defineMessages, intlShape } from 'react-intl'; | ||
5 | import Webview from 'react-electron-web-view'; | ||
6 | import ms from 'ms'; | ||
7 | |||
8 | import Button from '../ui/Button'; | ||
9 | |||
10 | const messages = defineMessages({ | ||
11 | buttonCancel: { | ||
12 | id: 'subscriptionPopup.buttonCancel', | ||
13 | defaultMessage: '!!!Cancel', | ||
14 | }, | ||
15 | buttonDone: { | ||
16 | id: 'subscriptionPopup.buttonDone', | ||
17 | defaultMessage: '!!!Done', | ||
18 | }, | ||
19 | }); | ||
20 | |||
21 | export default @observer class SubscriptionPopup extends Component { | ||
22 | static propTypes = { | ||
23 | url: PropTypes.string.isRequired, | ||
24 | closeWindow: PropTypes.func.isRequired, | ||
25 | completeCheck: PropTypes.func.isRequired, | ||
26 | isCompleted: PropTypes.bool.isRequired, | ||
27 | }; | ||
28 | |||
29 | static contextTypes = { | ||
30 | intl: intlShape, | ||
31 | }; | ||
32 | |||
33 | state = { | ||
34 | isFakeLoading: false, | ||
35 | }; | ||
36 | |||
37 | // We delay the window closing a bit in order to give | ||
38 | // the Recurly webhook a few seconds to do it's magic | ||
39 | delayedCloseWindow() { | ||
40 | this.setState({ | ||
41 | isFakeLoading: true, | ||
42 | }); | ||
43 | |||
44 | setTimeout(() => { | ||
45 | this.props.closeWindow(); | ||
46 | }, ms('1s')); | ||
47 | } | ||
48 | |||
49 | render() { | ||
50 | const { | ||
51 | url, closeWindow, completeCheck, isCompleted, | ||
52 | } = this.props; | ||
53 | const { intl } = this.context; | ||
54 | |||
55 | return ( | ||
56 | <div className="subscription-popup"> | ||
57 | <div className="subscription-popup__content"> | ||
58 | <Webview | ||
59 | className="subscription-popup__webview" | ||
60 | autosize | ||
61 | allowpopups | ||
62 | src={encodeURI(url)} | ||
63 | onDidNavigate={completeCheck} | ||
64 | onDidNavigateInPage={completeCheck} | ||
65 | /> | ||
66 | </div> | ||
67 | <div className="subscription-popup__toolbar franz-form"> | ||
68 | <Button | ||
69 | label={intl.formatMessage(messages.buttonCancel)} | ||
70 | buttonType="secondary" | ||
71 | onClick={closeWindow} | ||
72 | disabled={isCompleted} | ||
73 | /> | ||
74 | <Button | ||
75 | label={intl.formatMessage(messages.buttonDone)} | ||
76 | onClick={() => this.delayedCloseWindow()} | ||
77 | disabled={!isCompleted} | ||
78 | loaded={!this.state.isFakeLoading} | ||
79 | /> | ||
80 | </div> | ||
81 | </div> | ||
82 | ); | ||
83 | } | ||
84 | } | ||