diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js
index ab27e92bf..fe1e48c5b 100644
--- a/src/api/server/ServerApi.js
+++ b/src/api/server/ServerApi.js
@@ -486,7 +486,7 @@ export default class ServerApi {
return services;
}
} catch (err) {
- throw (new Error('ServerApi::getLegacyServices no config found'));
+ console.warn('ServerApi::getLegacyServices no config found');
}
return [];
diff --git a/src/app.js b/src/app.js
index fb9f1c6ab..ffb0db79f 100644
--- a/src/app.js
+++ b/src/app.js
@@ -34,7 +34,6 @@ import WelcomeScreen from './containers/auth/WelcomeScreen';
import LoginScreen from './containers/auth/LoginScreen';
import PasswordScreen from './containers/auth/PasswordScreen';
import SignupScreen from './containers/auth/SignupScreen';
-import ImportScreen from './containers/auth/ImportScreen';
import PricingScreen from './containers/auth/PricingScreen';
import InviteScreen from './containers/auth/InviteScreen';
import AuthLayoutContainer from './containers/auth/AuthLayoutContainer';
@@ -90,13 +89,7 @@ window.addEventListener('load', () => {
-
-
-
-
-
-
-
+
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js
deleted file mode 100644
index 0d5feb274..000000000
--- a/src/components/auth/Import.js
+++ /dev/null
@@ -1,165 +0,0 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
-import { defineMessages, intlShape } from 'react-intl';
-import { Link } from 'react-router';
-import classnames from 'classnames';
-
-import Form from '../../lib/Form';
-import Toggle from '../ui/Toggle';
-import Button from '../ui/Button';
-
-const messages = defineMessages({
- headline: {
- id: 'import.headline',
- defaultMessage: '!!!Import your Franz 4 services',
- },
- notSupportedHeadline: {
- id: 'import.notSupportedHeadline',
- defaultMessage: '!!!Services not yet supported in Franz 5',
- },
- submitButtonLabel: {
- id: 'import.submit.label',
- defaultMessage: '!!!Import {count} services',
- },
- skipButtonLabel: {
- id: 'import.skip.label',
- defaultMessage: '!!!I want to add services manually',
- },
-});
-
-export default @observer class Import extends Component {
- static propTypes = {
- services: MobxPropTypes.arrayOrObservableArray.isRequired,
- onSubmit: PropTypes.func.isRequired,
- isSubmitting: PropTypes.bool.isRequired,
- inviteRoute: PropTypes.string.isRequired,
- };
-
- static contextTypes = {
- intl: intlShape,
- };
-
- componentWillMount() {
- const config = {
- fields: {
- import: [...this.props.services.filter(s => s.recipe).map(s => ({
- fields: {
- add: {
- default: true,
- options: s,
- },
- },
- }))],
- },
- };
-
- this.form = new Form(config, this.context.intl);
- }
-
- submit(e) {
- const { services } = this.props;
- e.preventDefault();
- this.form.submit({
- onSuccess: (form) => {
- const servicesImport = form.values().import
- .map((value, i) => !value.add || services.filter(s => s.recipe)[i])
- .filter(s => typeof s !== 'boolean');
-
- this.props.onSubmit({ services: servicesImport });
- },
- onError: () => {},
- });
- }
-
- render() {
- const { intl } = this.context;
- const { services, isSubmitting, inviteRoute } = this.props;
-
- const availableServices = services.filter(s => s.recipe);
- const unavailableServices = services.filter(s => !s.recipe);
-
- return (
-
- );
- }
-}
diff --git a/src/components/auth/Pricing.js b/src/components/auth/Pricing.js
deleted file mode 100644
index 7ab14f429..000000000
--- a/src/components/auth/Pricing.js
+++ /dev/null
@@ -1,134 +0,0 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
-import { defineMessages, intlShape } from 'react-intl';
-// import { Link } from 'react-router';
-
-// import Button from '../ui/Button';
-import Loader from '../ui/Loader';
-import Appear from '../ui/effects/Appear';
-import SubscriptionForm from '../../containers/subscription/SubscriptionFormScreen';
-
-const messages = defineMessages({
- headline: {
- id: 'pricing.headline',
- defaultMessage: '!!!Support Franz',
- },
- monthlySupportLabel: {
- id: 'pricing.support.label',
- defaultMessage: '!!!Select your support plan',
- },
- submitButtonLabel: {
- id: 'pricing.submit.label',
- defaultMessage: '!!!Support the development of Franz',
- },
- skipPayment: {
- id: 'pricing.link.skipPayment',
- defaultMessage: '!!!I don\'t want to support the development of Franz.',
- },
-});
-
-export default @observer class Signup extends Component {
- static propTypes = {
- donor: MobxPropTypes.objectOrObservableObject.isRequired,
- isLoading: PropTypes.bool.isRequired,
- isLoadingUser: PropTypes.bool.isRequired,
- onCloseSubscriptionWindow: PropTypes.func.isRequired,
- skipAction: PropTypes.func.isRequired,
- };
-
- static contextTypes = {
- intl: intlShape,
- };
-
- render() {
- const {
- donor,
- isLoading,
- isLoadingUser,
- onCloseSubscriptionWindow,
- skipAction,
- } = this.props;
- const { intl } = this.context;
-
- return (
-
- );
- }
-}
diff --git a/src/containers/auth/ImportScreen.js b/src/containers/auth/ImportScreen.js
deleted file mode 100644
index 4a93891d6..000000000
--- a/src/containers/auth/ImportScreen.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import { inject, observer } from 'mobx-react';
-import Import from '../../components/auth/Import';
-import UserStore from '../../stores/UserStore';
-
-export default @inject('stores', 'actions') @observer class ImportScreen extends Component {
- render() {
- const { actions, stores } = this.props;
-
- if (stores.user.isImportLegacyServicesCompleted) {
- stores.router.push(stores.user.inviteRoute);
- }
-
- return (
-
- );
- }
-}
-
-ImportScreen.wrappedComponent.propTypes = {
- actions: PropTypes.shape({
- user: PropTypes.shape({
- importLegacyServices: PropTypes.func.isRequired,
- }).isRequired,
- }).isRequired,
- stores: PropTypes.shape({
- user: PropTypes.instanceOf(UserStore).isRequired,
- }).isRequired,
-};
diff --git a/src/containers/auth/PricingScreen.js b/src/containers/auth/PricingScreen.js
deleted file mode 100644
index 8d179a170..000000000
--- a/src/containers/auth/PricingScreen.js
+++ /dev/null
@@ -1,47 +0,0 @@
-import React, { Component } from 'react';
-import PropTypes from 'prop-types';
-import { inject, observer } from 'mobx-react';
-import { RouterStore } from 'mobx-react-router';
-
-import Pricing from '../../components/auth/Pricing';
-import UserStore from '../../stores/UserStore';
-import PaymentStore from '../../stores/PaymentStore';
-
-import { globalError as globalErrorPropType } from '../../prop-types';
-
-export default @inject('stores', 'actions') @observer class PricingScreen extends Component {
- static propTypes = {
- error: globalErrorPropType.isRequired,
- };
-
- render() {
- const { actions, stores, error } = this.props;
-
- const nextStepRoute = stores.user.legacyServices.length ? stores.user.importRoute : stores.user.inviteRoute;
-
- return (
- this.props.stores.router.push(nextStepRoute)}
- isLoading={stores.payment.plansRequest.isExecuting}
- isLoadingUser={stores.user.getUserInfoRequest.isExecuting}
- error={error}
- skipAction={() => this.props.stores.router.push(nextStepRoute)}
- />
- );
- }
-}
-
-PricingScreen.wrappedComponent.propTypes = {
- actions: PropTypes.shape({
- user: PropTypes.shape({
- signup: PropTypes.func.isRequired,
- }).isRequired,
- }).isRequired,
- stores: PropTypes.shape({
- user: PropTypes.instanceOf(UserStore).isRequired,
- payment: PropTypes.instanceOf(PaymentStore).isRequired,
- router: PropTypes.instanceOf(RouterStore).isRequired,
- }).isRequired,
-};
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js
index 31555dd5c..80a45c9c4 100644
--- a/src/stores/UserStore.js
+++ b/src/stores/UserStore.js
@@ -23,12 +23,8 @@ export default class UserStore extends Store {
SIGNUP_ROUTE = `${this.BASE_ROUTE}/signup`;
- PRICING_ROUTE = `${this.BASE_ROUTE}/signup/pricing`;
-
IMPORT_ROUTE = `${this.BASE_ROUTE}/signup/import`;
- INVITE_ROUTE = `${this.BASE_ROUTE}/signup/invite`;
-
PASSWORD_ROUTE = `${this.BASE_ROUTE}/password`;
@observable loginRequest = new Request(this.api.user, 'login');
@@ -108,14 +104,6 @@ export default class UserStore extends Store {
return this.SIGNUP_ROUTE;
}
- get pricingRoute() {
- return this.PRICING_ROUTE;
- }
-
- get inviteRoute() {
- return this.INVITE_ROUTE;
- }
-
get importRoute() {
return this.IMPORT_ROUTE;
}
@@ -181,11 +169,11 @@ export default class UserStore extends Store {
locale: this.stores.app.locale,
});
- this.hasCompletedSignup = false;
+ this.hasCompletedSignup = true;
this._setUserData(authToken);
- this.stores.router.push(this.PRICING_ROUTE);
+ this.stores.router.push('/settings/recipes');
gaEvent('User', 'signup');
}
@@ -206,11 +194,6 @@ export default class UserStore extends Store {
this.actionStatus = response.status || [];
- // we do not wait for a server response before redirecting the user ONLY DURING SIGNUP
- if (this.stores.router.location.pathname.includes(this.INVITE_ROUTE)) {
- this.stores.router.push('/');
- }
-
gaEvent('User', 'inviteUsers');
}