feat: optimize register setup page.

This commit is contained in:
Ahmed Bouhuolia
2020-10-13 14:45:59 +02:00
parent 1467f1c284
commit 892ace5566
10 changed files with 41 additions and 34 deletions

View File

@@ -1,9 +1,8 @@
import React, { useState, useCallback } from 'react';
import React, { useCallback } from 'react';
import { Icon, For } from 'components';
import { FormattedMessage as T } from 'react-intl';
import withAuthenticationActions from 'containers/Authentication/withAuthenticationActions';
import withAuthentication from 'containers/Authentication/withAuthentication';
import footerLinks from 'config/footerLinks';
import { compose } from 'utils';
@@ -22,6 +21,9 @@ function FooterLinkItem({ title, link }) {
function SetupLeftSection({
// #withAuthenticationActions
requestLogout,
// #withAuthentication
currentOrganizationId
}) {
const onClickLogout = useCallback(() => {
requestLogout();
@@ -43,7 +45,7 @@ function SetupLeftSection({
</p>
<div className={'content__organization'}>
<span class="organization-id">Your oragnization ID: <span class="id">12342313</span>,</span><br />
<span class="organization-id">Your oragnization ID: <span class="id">{ currentOrganizationId }</span>,</span><br />
<span class="signout"><a onClick={onClickLogout} href="#"><T id={'sign_out'} /></a></span>
</div>
@@ -65,4 +67,5 @@ function SetupLeftSection({
export default compose(
withAuthenticationActions,
withAuthentication(({ currentOrganizationId }) => ({ currentOrganizationId })),
)(SetupLeftSection);

View File

@@ -56,6 +56,7 @@ function SetupSubscriptionForm({
<BillingPlans title={'a_select_a_plan'} formik={formik} />
<BillingPeriods title={'b_choose_your_billing'} formik={formik} />
<BillingPaymentmethod title={'c_payment_methods'} formik={formik} />
<div className={'subscribe-button'}>
<Button
intent={Intent.PRIMARY}

View File

@@ -11,7 +11,7 @@ function LicenseTab({
<h4>
<T id={'license_code'} />
</h4>
<p className={'bg-message'}>
<p className="paragraph">
<T id={'cards_will_be_charged'} />
</p>

View File

@@ -4,11 +4,11 @@ import { PaymentMethodTabs } from './SubscriptionTabs';
export const BillingPaymentmethod = ({ formik, title }) => {
return (
<section>
<section class="billing-section">
<h1 className={'bg-title'}>
<T id={title} />
</h1>
<p className={'bg-message'}>
<p className='paragraph'>
<T id={'please_enter_your_preferred_payment_method'} />
</p>
<PaymentMethodTabs formik={formik} />

View File

@@ -15,6 +15,7 @@ function BillingPeriod({ price, period, currency, onSelected, selected }) {
<span className={'bg-period'}>
<T id={period} />
</span>
<div className={'plan-price'}>
<span className={'amount'}>
{price} {currency}
@@ -43,11 +44,11 @@ function BillingPeriods({ formik, title, selected = 1 }) {
});
return (
<section>
<section class="billing-section">
<h1 className={'bg-title'}>
<T id={title} />
</h1>
<p className={'bg-message'}>
<p className='paragraph'>
<T id={'please_enter_your_preferred_payment_method'} />
</p>
<div className={'payment-method-continer'} ref={billingRef}>

View File

@@ -61,11 +61,11 @@ function BillingPlans({ formik, title, selected = 1 }) {
});
return (
<section>
<section class="billing-section">
<h1 className={'bg-title'}>
<T id={title} />
</h1>
<p className={'bg-message '}>
<p className='paragraph'>
<T id={'please_enter_your_preferred_payment_method'} />
</p>
<div className={'billing-form__plan-container'} ref={planRef}>

View File

@@ -709,7 +709,7 @@ export default {
please_enter_your_preferred_payment_method:
'Please enter your preferred payment method below. You can use a credit / debit card or prepay through PayPal. ',
cards_will_be_charged:
'Cards will be charged either at the end of the month or whenever your balance exceeds the usage threshold.All major credit / debit cards accepted.',
'Cards will be charged either at the end of the month or whenever your balance exceeds the usage threshold. All major credit / debit cards accepted.',
license_number: 'License number',
subscribe: 'Subscribe',
year_per: 'year',

View File

@@ -11,4 +11,9 @@ body{
.divider{
border-top: 1px solid #e8e8e8;
height: 1px;
}
.paragraph{
line-height: 1.5;
font-size: 14px;
}

View File

@@ -1,18 +1,19 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.billing-form {
padding: 25px 45px;
width: 800px;
margin: 0 auto;
.billing-section{
margin-bottom: 30px;
}
.paragraph + .billing-form__plan-container{
margin-top: 20px;
}
&__plan-container {
display: flex;
flex-flow: row wrap;
margin-bottom: 30px;
.plan-wrapper {
display: flex;
@@ -76,8 +77,14 @@
background-color: #fcfdff;
}
}
.paragraph + .payment-method-continer{
margin-top: 20px;
}
.payment-method-continer {
margin-bottom: 30px;
.period-container {
display: inline-flex;
background-color: #fcfdff;
@@ -110,22 +117,12 @@
}
}
// .bg-title {
// font-size: 22px;
// font-weight: 400;
// color: #666666;
// }
// .bg-message {
// margin-bottom: 23px;
// font-size: 14px;
// }
.license-container {
.bp3-form-group {
margin-bottom: 20px;
.bp3-label {
margin-bottom: 15px;
}
.form-group-license_code{
margin-top: 20px;
}
.bp3-form-content {
.bp3-input-group {
display: block;

View File

@@ -20,7 +20,7 @@
h1{
font-size: 22px;
font-weight: 600;
font-weight: 500;
color: #6d6d6d;
}
}