diff options
author | 2019-04-08 15:32:16 +0200 | |
---|---|---|
committer | 2019-04-08 15:32:16 +0200 | |
commit | 229c6017efbd0198747cba6e8997dc8ce4f9a7d4 (patch) | |
tree | 6718efa3381f7e82d7ff7754109bd7fa9b899a4f | |
parent | Replace invoices & subscription info with links to website (diff) | |
download | ferdium-app-229c6017efbd0198747cba6e8997dc8ce4f9a7d4.tar.gz ferdium-app-229c6017efbd0198747cba6e8997dc8ce4f9a7d4.tar.zst ferdium-app-229c6017efbd0198747cba6e8997dc8ce4f9a7d4.zip |
Clean up
-rw-r--r-- | src/containers/settings/AccountScreen.js | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/containers/settings/AccountScreen.js b/src/containers/settings/AccountScreen.js index 0c837fab9..4ac7328c6 100644 --- a/src/containers/settings/AccountScreen.js +++ b/src/containers/settings/AccountScreen.js | |||
@@ -1,4 +1,3 @@ | |||
1 | import { remote } from 'electron'; | ||
2 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
3 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
4 | import { inject, observer } from 'mobx-react'; | 3 | import { inject, observer } from 'mobx-react'; |
@@ -11,8 +10,6 @@ import AccountDashboard from '../../components/settings/account/AccountDashboard | |||
11 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 10 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
12 | import { WEBSITE } from '../../environment'; | 11 | import { WEBSITE } from '../../environment'; |
13 | 12 | ||
14 | const { BrowserWindow } = remote; | ||
15 | |||
16 | export default @inject('stores', 'actions') @observer class AccountScreen extends Component { | 13 | export default @inject('stores', 'actions') @observer class AccountScreen extends Component { |
17 | componentWillMount() { | 14 | componentWillMount() { |
18 | const { | 15 | const { |
@@ -23,7 +20,7 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
23 | } | 20 | } |
24 | 21 | ||
25 | onCloseWindow() { | 22 | onCloseWindow() { |
26 | const { user, payment } = this.props.stores; | 23 | const { user } = this.props.stores; |
27 | user.getUserInfoRequest.invalidate({ immediately: true }); | 24 | user.getUserInfoRequest.invalidate({ immediately: true }); |
28 | } | 25 | } |
29 | 26 | ||
@@ -34,36 +31,6 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
34 | payment.plansRequest.reload(); | 31 | payment.plansRequest.reload(); |
35 | } | 32 | } |
36 | 33 | ||
37 | async handlePaymentDashboard() { | ||
38 | const { actions, stores } = this.props; | ||
39 | |||
40 | // actions.payment.createDashboardUrl(); | ||
41 | |||
42 | // const dashboard = await stores.payment.createDashboardUrlRequest; | ||
43 | |||
44 | // if (dashboard.url) { | ||
45 | // const paymentWindow = new BrowserWindow({ | ||
46 | // title: '🔒 Franz Subscription Dashboard', | ||
47 | // parent: remote.getCurrentWindow(), | ||
48 | // modal: false, | ||
49 | // width: 900, | ||
50 | // minWidth: 600, | ||
51 | // webPreferences: { | ||
52 | // nodeIntegration: false, | ||
53 | // }, | ||
54 | // }); | ||
55 | // paymentWindow.loadURL(dashboard.url); | ||
56 | |||
57 | // paymentWindow.on('closed', () => { | ||
58 | // this.onCloseWindow(); | ||
59 | // }); | ||
60 | // } | ||
61 | |||
62 | const url = `${WEBSITE}/user/billing?token=${stores.user.authToken}&utm_source=app&utm_medium=edit_profile`; | ||
63 | |||
64 | actions.app.openExternalUrl({ url }); | ||
65 | } | ||
66 | |||
67 | handleWebsiteLink(route) { | 34 | handleWebsiteLink(route) { |
68 | const { actions, stores } = this.props; | 35 | const { actions, stores } = this.props; |
69 | 36 | ||
@@ -84,7 +51,6 @@ export default @inject('stores', 'actions') @observer class AccountScreen extend | |||
84 | <ErrorBoundary> | 51 | <ErrorBoundary> |
85 | <AccountDashboard | 52 | <AccountDashboard |
86 | user={user.data} | 53 | user={user.data} |
87 | orders={payment.orders} // das muss raus | ||
88 | isLoading={isLoadingUserInfo} | 54 | isLoading={isLoadingUserInfo} |
89 | isLoadingPlans={isLoadingPlans} | 55 | isLoadingPlans={isLoadingPlans} |
90 | userInfoRequestFailed={user.getUserInfoRequest.wasExecuted && user.getUserInfoRequest.isError} | 56 | userInfoRequestFailed={user.getUserInfoRequest.wasExecuted && user.getUserInfoRequest.isError} |