diff --git a/app/assets/images/blocked-tenant.png b/app/assets/images/blocked-tenant.png new file mode 100644 index 00000000..7740e71e Binary files /dev/null and b/app/assets/images/blocked-tenant.png differ diff --git a/app/assets/images/favicon.png b/app/assets/images/favicon.png new file mode 100644 index 00000000..98a0fdbe Binary files /dev/null and b/app/assets/images/favicon.png differ diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png new file mode 100644 index 00000000..34f4994c Binary files /dev/null and b/app/assets/images/logo.png differ diff --git a/app/assets/images/pending-tenant.png b/app/assets/images/pending-tenant.png new file mode 100644 index 00000000..8e34a148 Binary files /dev/null and b/app/assets/images/pending-tenant.png differ diff --git a/app/assets/stylesheets/components/Post.scss b/app/assets/stylesheets/components/Post.scss index a3b7bad2..1e50f910 100644 --- a/app/assets/stylesheets/components/Post.scss +++ b/app/assets/stylesheets/components/Post.scss @@ -152,6 +152,9 @@ .postEditFormButtons { @extend .d-flex, .justify-content-end; } + + #selectPickerBoard { margin-right: 4px !important; } + #selectPickerStatus { margin-left: 4px !important; } } } } \ No newline at end of file diff --git a/app/assets/stylesheets/components/TenantSignUp.scss b/app/assets/stylesheets/components/TenantSignUp.scss index 540ee519..335173f5 100644 --- a/app/assets/stylesheets/components/TenantSignUp.scss +++ b/app/assets/stylesheets/components/TenantSignUp.scss @@ -1,3 +1,41 @@ +.astutoLogo { + display: block; + margin: 12px auto; +} + .tenantSignUpContainer { @extend .smallContainer; -} \ No newline at end of file + + h1, h2, h3 { + text-align: center; + margin-bottom: 16px; + } + + .userConfirm, .tenantConfirm { + display: block; + margin: 0 auto; + margin-top: 16px; + } + + .userPasswordDiv, .userPasswordConfirmationDiv { + @extend .col-6; + padding-left: 0; + padding-right: 0; + } + + .userPasswordDiv { padding-right: 4px; } + .userPasswordConfirmationDiv { padding-left: 4px; } + + .userRecap { + text-align: center; + margin-bottom: 0; + + .editUser { + display: block; + width: fit-content; + margin-top: 4px; + margin-left: auto; + margin-right: auto; + } + } +} diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb index 914a11f5..f9cc2519 100644 --- a/app/controllers/tenants_controller.rb +++ b/app/controllers/tenants_controller.rb @@ -4,7 +4,7 @@ class TenantsController < ApplicationController before_action :authenticate_admin, only: [:show, :update] def new - @page_title = t('signup.page_title') + @page_title = "Create your feedback space" @o_auths = OAuth.unscoped.where(tenant_id: nil) end diff --git a/app/javascript/components/TenantSignUp/ConfirmSignUpPage.tsx b/app/javascript/components/TenantSignUp/ConfirmSignUpPage.tsx index f0b281f5..5253a419 100644 --- a/app/javascript/components/TenantSignUp/ConfirmSignUpPage.tsx +++ b/app/javascript/components/TenantSignUp/ConfirmSignUpPage.tsx @@ -1,20 +1,25 @@ import * as React from 'react'; -import I18n from 'i18n-js'; import Box from '../common/Box'; interface Props { subdomain: string; userEmail: string; + pendingTenantImage: string; } const ConfirmSignUpPage = ({ subdomain, userEmail, + pendingTenantImage, }: Props) => ( -

{ I18n.t('signup.step3.title') }

+

You're almost done!

-

{ I18n.t('signup.step3.message', { email: userEmail, subdomain: `${subdomain}.astuto.io` }) }

+ + +

+ Check your email {userEmail} to activate your new feedback space {subdomain}.astuto.io! +

); diff --git a/app/javascript/components/TenantSignUp/TenantSignUpForm.tsx b/app/javascript/components/TenantSignUp/TenantSignUpForm.tsx index 3bd55019..19d18c26 100644 --- a/app/javascript/components/TenantSignUp/TenantSignUpForm.tsx +++ b/app/javascript/components/TenantSignUp/TenantSignUpForm.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import { SubmitHandler, useForm } from 'react-hook-form'; -import I18n from 'i18n-js'; import Box from '../common/Box'; import Button from '../common/Button'; @@ -28,7 +27,7 @@ const TenantSignUpForm = ({ return ( -

{ I18n.t('signup.step2.title') }

+

Create feedback space

@@ -68,10 +67,10 @@ const TenantSignUpForm = ({ {errors.subdomain?.type === 'required' && getValidationMessage('required', 'tenant', 'subdomain')} - {errors.subdomain?.type === 'pattern' && I18n.t('signup.step2.validations.subdomain_only_letters_and_numbers')} + {errors.subdomain?.type === 'pattern' && 'Subdomain can only contain alphanumeric characters and hyphens'} - {errors.subdomain?.type === 'notAlreadyTaken' && I18n.t('signup.step2.validations.subdomain_already_taken')} + {errors.subdomain?.type === 'notAlreadyTaken' && 'Sorry, this subdomain is not available'}
@@ -79,7 +78,7 @@ const TenantSignUpForm = ({ onClick={() => null} className="tenantConfirm" > - { isSubmitting ? : I18n.t('signup.step2.create_button') } + { isSubmitting ? : 'Create feedback space' } { error !== '' && { error } } diff --git a/app/javascript/components/TenantSignUp/TenantSignUpP.tsx b/app/javascript/components/TenantSignUp/TenantSignUpP.tsx index 1389ae6a..7f9b8a44 100644 --- a/app/javascript/components/TenantSignUp/TenantSignUpP.tsx +++ b/app/javascript/components/TenantSignUp/TenantSignUpP.tsx @@ -26,6 +26,9 @@ interface Props { authenticityToken: string, ): Promise; + astutoLogoImage: string; + pendingTenantImage: string; + baseUrl: string; authenticityToken: string; } @@ -50,6 +53,8 @@ const TenantSignUpP = ({ isSubmitting, error, handleSubmit, + astutoLogoImage, + pendingTenantImage, baseUrl, authenticityToken }: Props) => { @@ -93,6 +98,9 @@ const TenantSignUpP = ({ } return ( + <> + +
{ (currentStep === 1 || currentStep === 2) && @@ -124,9 +132,11 @@ const TenantSignUpP = ({ }
+ ); } diff --git a/app/javascript/components/TenantSignUp/UserSignUpForm.tsx b/app/javascript/components/TenantSignUp/UserSignUpForm.tsx index 4aff9514..0b801d97 100644 --- a/app/javascript/components/TenantSignUp/UserSignUpForm.tsx +++ b/app/javascript/components/TenantSignUp/UserSignUpForm.tsx @@ -11,7 +11,7 @@ import { getLabel, getValidationMessage } from '../../helpers/formUtils'; import { EMAIL_REGEX } from '../../constants/regex'; import { IOAuth } from '../../interfaces/IOAuth'; import ActionLink from '../common/ActionLink'; -import { BackIcon } from '../common/Icons'; +import { BackIcon, EditIcon } from '../common/Icons'; interface Props { currentStep: number; @@ -47,7 +47,7 @@ const UserSignUpForm = ({ } = useForm(); const onSubmit: SubmitHandler = data => { if (data.password !== data.passwordConfirmation) { - setError('passwordConfirmation', I18n.t('signup.step1.validations.password_mismatch')); + setError('passwordConfirmation', I18n.t('common.validations.password_mismatch')); return; } @@ -57,13 +57,13 @@ const UserSignUpForm = ({ return ( -

{ I18n.t('signup.step1.title') }

+

Create user account

{ currentStep === 1 && !emailAuth && <> { @@ -118,7 +118,7 @@ const UserSignUpForm = ({
-
+
{ errors.password && I18n.t('common.validations.password', { n: 6 }) }
-
+
{userData.fullName} ({userData.email})

- } - - { - currentStep === 2 && oAuthLoginCompleted && -

{oauthUserName} ({oauthUserEmail})

+

+ {oAuthLoginCompleted ? oauthUserName : userData.fullName} ({oAuthLoginCompleted ? oauthUserEmail : userData.email}) + setCurrentStep(currentStep-1)} icon={} customClass="editUser">Edit +

} ); diff --git a/app/javascript/components/TenantSignUp/index.tsx b/app/javascript/components/TenantSignUp/index.tsx index a65a6f94..621bb93d 100644 --- a/app/javascript/components/TenantSignUp/index.tsx +++ b/app/javascript/components/TenantSignUp/index.tsx @@ -13,6 +13,8 @@ interface Props { oauthUserEmail?: string; oauthUserName?: string; baseUrl: string; + astutoLogoImage: string; + pendingTenantImage: string; authenticityToken: string; } @@ -31,6 +33,8 @@ class TenantSignUpRoot extends React.Component { oAuthLoginCompleted, oauthUserEmail, oauthUserName, + astutoLogoImage, + pendingTenantImage, baseUrl, authenticityToken, } = this.props; @@ -42,6 +46,8 @@ class TenantSignUpRoot extends React.Component { oauthUserEmail={oauthUserEmail} oauthUserName={oauthUserName} oAuths={oAuths.map(oAuth => oAuthJSON2JS(oAuth))} + astutoLogoImage={astutoLogoImage} + pendingTenantImage={pendingTenantImage} baseUrl={baseUrl} authenticityToken={authenticityToken} /> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ff75eb33..a5466ac8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -13,6 +13,8 @@ <%= javascript_include_tag "application", "data-turbo-track": "reload" %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> + + <%= favicon_link_tag asset_path('favicon.png') %> diff --git a/app/views/static_pages/blocked_tenant.html.erb b/app/views/static_pages/blocked_tenant.html.erb index 1caa1e91..f0d89ea9 100644 --- a/app/views/static_pages/blocked_tenant.html.erb +++ b/app/views/static_pages/blocked_tenant.html.erb @@ -1,5 +1,7 @@
-
+

<%= t('blocked_tenant.title') %>

+ + <%= image_tag("blocked-tenant.png", size: 64, style: "margin: 0 auto") %>
\ No newline at end of file diff --git a/app/views/static_pages/pending_tenant.html.erb b/app/views/static_pages/pending_tenant.html.erb index 26ab7106..7bb86e3d 100644 --- a/app/views/static_pages/pending_tenant.html.erb +++ b/app/views/static_pages/pending_tenant.html.erb @@ -1,6 +1,16 @@
-
-

<%= t('pending_tenant.title') %>

-

<%= t('pending_tenant.message') %>

+
+

Verify your email address

+ + <%= image_tag("pending-tenant.png", size: 64, style: "margin: 0 auto") %> + +

Please check your email inbox (and your spam folder!) and click on the activation link.

+ +

+ Need help? + > + Contact us. + +

\ No newline at end of file diff --git a/app/views/tenants/new.html.erb b/app/views/tenants/new.html.erb index 837e0617..1ca01d30 100644 --- a/app/views/tenants/new.html.erb +++ b/app/views/tenants/new.html.erb @@ -7,6 +7,8 @@ oauthUserEmail: @user_email, oauthUserName: @user_name, baseUrl: Rails.application.base_url, + astutoLogoImage: image_url("logo.png"), + pendingTenantImage: image_url("pending-tenant.png"), authenticityToken: form_authenticity_token } ) diff --git a/config/locales/en.yml b/config/locales/en.yml index 07c5f24e..b9e4c110 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -68,20 +68,6 @@ en: days: one: '1 day ago' other: '%{count} days ago' - signup: - page_title: 'Create your feedback space' - step1: - title: '1. Create user account' - email_auth: 'Sign up with email' - step2: - title: '2. Create feedback space' - create_button: 'Create feedback space' - validations: - subdomain_already_taken: 'Sorry, this subdomain is not available' - subdomain_only_letters_and_numbers: 'Subdomain can only contain alphanumeric characters and hyphen' - step3: - title: "You're almost done!" - message: "Check your email %{email} to activate your new feedback space %{subdomain}!" header: menu: site_settings: 'Site settings' @@ -90,9 +76,6 @@ en: log_in: 'Log in / Sign up' roadmap: title: 'Roadmap' - pending_tenant: - title: 'Verify your email address' - message: 'We''ve sent an email with an activation link to the email you provided during registration. Click on that link to activate this feedback space!' blocked_tenant: title: 'This feedback space has been blocked' board: