From 811011488eb6f7862a9ccfa8079edad7c8ebfd56 Mon Sep 17 00:00:00 2001 From: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Date: Mon, 4 Mar 2024 02:31:49 -0800 Subject: [PATCH 01/64] feat: Updates design for signup page for onboarding (#8942) * feat: Adds onboarding views after signup * Updates i18n strings * Review fixes * feat: Adds assets used in the onboarding pages (#8935) * feats: Adds assets used in the onboarding pages * Adds icons and translations * Update app/javascript/dashboard/i18n/locale/en/signup.json * Updates locale string * Review fixes * Fixes layout on large and extra large screens * Reverts unwanted changes * Fixes styles on signup page * Adds signup page APIs * Update app/javascript/dashboard/routes/index.js * Updates signup page --- .../dashboard/i18n/locale/en/signup.json | 83 +++++++ .../FluentIcon/dashboard-icons.json | 7 +- app/javascript/v3/api/auth.js | 28 +++ app/javascript/v3/components/Form/Input.vue | 2 +- app/javascript/v3/views/auth/signup/Index.vue | 78 +++---- .../signup/components/Signup/CutoutSVG.vue | 19 ++ .../auth/signup/components/Signup/Form.vue | 91 +++----- .../signup/components/Testimonials/Index.vue | 30 ++- .../Testimonials/TestimonialCard.vue | 28 ++- .../images/auth/speech-bubble-checkmark.svg | 17 ++ .../images/auth/speech-bubble-heart.svg | 19 ++ public/assets/images/auth/star-icon.svg | 19 ++ .../dashboard/onboarding/intro-dark.svg | 207 ++++++++++++++++++ .../images/dashboard/onboarding/intro.svg | 207 ++++++++++++++++++ .../dashboard/onboarding/waving-hand.svg | 5 + tailwind.config.js | 34 +++ 16 files changed, 755 insertions(+), 119 deletions(-) create mode 100644 app/javascript/v3/views/auth/signup/components/Signup/CutoutSVG.vue create mode 100644 public/assets/images/auth/speech-bubble-checkmark.svg create mode 100644 public/assets/images/auth/speech-bubble-heart.svg create mode 100644 public/assets/images/auth/star-icon.svg create mode 100644 public/assets/images/dashboard/onboarding/intro-dark.svg create mode 100644 public/assets/images/dashboard/onboarding/intro.svg create mode 100644 public/assets/images/dashboard/onboarding/waving-hand.svg diff --git a/app/javascript/dashboard/i18n/locale/en/signup.json b/app/javascript/dashboard/i18n/locale/en/signup.json index 1ad4865ff2d8..57251aa5bb22 100644 --- a/app/javascript/dashboard/i18n/locale/en/signup.json +++ b/app/javascript/dashboard/i18n/locale/en/signup.json @@ -40,5 +40,88 @@ }, "SUBMIT": "Create account", "HAVE_AN_ACCOUNT": "Already have an account?" + }, + "START_ONBOARDING": { + "PROFILE": { + "INTRO": "Welcome, let’s get started.", + "TITLE": "Set up profile", + "BODY": "These are details visible to end users, to make a positive first impression.", + "SUBMIT": { + "BUTTON": "Continue to company setup", + "ERROR": "Error in setting up profile, try again.", + "SUCCESS": "πŸ”₯ Lets add your business details" + }, + "AVATAR": { + "LABEL": "Avatar", + "PLACEHOLDER": "Upload Profile Image" + }, + "FULL_NAME": { + "LABEL": "Full name", + "PLACEHOLDER": "Enter your full name", + "ERROR": "Add a valid full name" + }, + "DISPLAY_NAME": { + "LABEL": "Display name (Optional)", + "PLACEHOLDER": "Enter the name you want to display your customers", + "ERROR": "Add a valid display name or leave it blank" + }, + "PHONE_NUMBER": { + "LABEL": "Phone number (Optional)", + "PLACEHOLDER": "Enter your phone number" + }, + "SIGNATURE": { + "LABEL": "Signature", + "PLACEHOLDER": "Add a signature for your messages. You can set this later in your settings." + } + }, + "COMPANY": { + "PAGE_TITLE": "Hello %{userName},\nwe are almost done.", + "TITLE": "Tell us about your company", + "BODY": "In this section, we'll set up the language, timezone, and company size. This information allows us to provide contextually accurate information and suggest relevant features for you.", + "SUBMIT": { + "BUTTON": "Continue to team setup", + "ERROR": "Error in setting up company, try again.", + "SUCCESS": "πŸš€ Lets invite your team" + }, + "COMPANY_NAME": { + "LABEL": "Company name", + "PLACEHOLDER": "Enter your company name", + "ERROR": "Company name is too short." + }, + "INDUSTRY": { + "LABEL": "Industry", + "PLACEHOLDER": "Select your industry" + }, + "TIMEZONE": { + "LABEL": "Timezone", + "PLACEHOLDER": "What timezone do you work from?" + }, + "LOCALE": { + "LABEL": "Language", + "PLACEHOLDER": "Select the language you want to use" + }, + "SIZE": { + "LABEL": "Company size", + "PLACEHOLDER": "How many people work at your company?" + } + }, + "INVITE_TEAM": { + "TITLE": "Invite your team", + "ADD": "Add", + "LIST_EMPTY": "No members to invite", + "BODY": "Invite your team members to Chatwoot. You can add them later as well.", + "PLACEHOLDER": "robin@chatwoot.com", + "SKIP": "Skip for now", + "SUBMIT": { + "BUTTON": "Send invitations", + "ERROR": "Error while inviting team members, try again.", + "NO_MEMBER_ERROR": "Please add atleast one team member or skip this step", + "SUCCESS": "πŸͺ„ Setup complete" + } + }, + "FOUNDERS_NOTE": { + "TITLE": "A note from the founder", + "SUBMIT": "Go to dashboard" + } } } diff --git a/app/javascript/shared/components/FluentIcon/dashboard-icons.json b/app/javascript/shared/components/FluentIcon/dashboard-icons.json index 678045469528..e488ba6a6bfb 100644 --- a/app/javascript/shared/components/FluentIcon/dashboard-icons.json +++ b/app/javascript/shared/components/FluentIcon/dashboard-icons.json @@ -113,6 +113,10 @@ "folder-outline": "M8.207 4c.46 0 .908.141 1.284.402l.156.12L12.022 6.5h7.728a2.25 2.25 0 0 1 2.229 1.938l.016.158.005.154v9a2.25 2.25 0 0 1-2.096 2.245L19.75 20H4.25a2.25 2.25 0 0 1-2.245-2.096L2 17.75V6.25a2.25 2.25 0 0 1 2.096-2.245L4.25 4h3.957Zm1.44 5.979a2.25 2.25 0 0 1-1.244.512l-.196.009-4.707-.001v7.251c0 .38.282.694.648.743l.102.007h15.5a.75.75 0 0 0 .743-.648l.007-.102v-9a.75.75 0 0 0-.648-.743L19.75 8h-7.729L9.647 9.979ZM8.207 5.5H4.25a.75.75 0 0 0-.743.648L3.5 6.25v2.749L8.207 9a.75.75 0 0 0 .395-.113l.085-.06 1.891-1.578-1.89-1.575a.75.75 0 0 0-.377-.167L8.207 5.5Z", "globe-desktop-outline": "M22.002 12C22.002 6.477 17.524 2 12 2 6.476 1.999 2 6.477 2 12.001c0 5.186 3.947 9.45 9.001 9.952V20.11c-.778-.612-1.478-1.905-1.939-3.61h1.94V15H8.737a18.969 18.969 0 0 1-.135-5h6.794c.068.64.105 1.31.105 2h1.5c0-.684-.033-1.353-.095-2h3.358c.154.64.237 1.31.237 2h1.5ZM4.786 16.5h2.722l.102.396c.317 1.17.748 2.195 1.27 3.015a8.532 8.532 0 0 1-4.094-3.41ZM3.736 10h3.358a20.847 20.847 0 0 0-.095 2c0 1.043.075 2.051.217 3H4.043a8.483 8.483 0 0 1-.544-3c0-.682.08-1.347.232-1.983L3.736 10Zm5.122-5.902.023-.008C8.16 5.222 7.611 6.748 7.298 8.5H4.25c.905-2 2.56-3.587 4.608-4.402Zm3.026-.594L12 3.5l.126.006c1.262.126 2.48 2.125 3.045 4.995H8.83c.568-2.878 1.79-4.88 3.055-4.996Zm3.343.76-.107-.174.291.121a8.533 8.533 0 0 1 4.339 4.29h-3.048c-.298-1.665-.806-3.125-1.475-4.237Z M12 19a1 1 0 0 0 1 1h3v2h-.5a.5.5 0 1 0 0 1h4a.5.5 0 0 0 0-1H19v-2h3a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1h-9a1 1 0 0 0-1 1v5Z", "globe-outline": "M12 1.999c5.524 0 10.002 4.478 10.002 10.002 0 5.523-4.478 10.001-10.002 10.001-5.524 0-10.002-4.478-10.002-10.001C1.998 6.477 6.476 1.999 12 1.999ZM14.939 16.5H9.06c.652 2.414 1.786 4.002 2.939 4.002s2.287-1.588 2.939-4.002Zm-7.43 0H4.785a8.532 8.532 0 0 0 4.094 3.411c-.522-.82-.953-1.846-1.27-3.015l-.102-.395Zm11.705 0h-2.722c-.324 1.335-.792 2.5-1.373 3.411a8.528 8.528 0 0 0 3.91-3.127l.185-.283ZM7.094 10H3.735l-.005.017a8.525 8.525 0 0 0-.233 1.984c0 1.056.193 2.067.545 3h3.173a20.847 20.847 0 0 1-.123-5Zm8.303 0H8.603a18.966 18.966 0 0 0 .135 5h6.524a18.974 18.974 0 0 0 .135-5Zm4.868 0h-3.358c.062.647.095 1.317.095 2a20.3 20.3 0 0 1-.218 3h3.173a8.482 8.482 0 0 0 .544-3c0-.689-.082-1.36-.236-2ZM8.88 4.09l-.023.008A8.531 8.531 0 0 0 4.25 8.5h3.048c.314-1.752.86-3.278 1.583-4.41ZM12 3.499l-.116.005C10.62 3.62 9.396 5.622 8.83 8.5h6.342c-.566-2.87-1.783-4.869-3.045-4.995L12 3.5Zm3.12.59.107.175c.669 1.112 1.177 2.572 1.475 4.237h3.048a8.533 8.533 0 0 0-4.339-4.29l-.291-.121Z", + "globe-clock-outline": [ + "M22.003 12.002C22.003 6.478 17.525 2 12.002 2 6.478 2 2 6.478 2 12.002c0 5.523 4.478 10.001 10.002 10.001.263 0 .524-.01.781-.03a6.506 6.506 0 0 1-1.065-1.502c-1.053-.235-2.057-1.754-2.655-3.97h2.013c.081-.523.224-1.026.422-1.5H8.74a18.966 18.966 0 0 1-.135-5h6.793c.046.426.077.865.092 1.316a6.429 6.429 0 0 1 1.49-.296 20.38 20.38 0 0 0-.072-1.02H20.266c.124.513.201 1.044.227 1.59l.008.317-.004-.177c.541.281 1.037.637 1.476 1.053.02-.258.03-.52.03-.782Zm-17.216 4.5H7.51c.324 1.334.791 2.5 1.372 3.41a8.531 8.531 0 0 1-4.095-3.41Zm-1.054-6.484.004-.017h3.358A20.845 20.845 0 0 0 7 12c0 1.043.075 2.051.218 3H4.045a8.483 8.483 0 0 1-.545-3c0-.682.08-1.346.233-1.983ZM8.86 4.1l.023-.008C8.16 5.223 7.613 6.749 7.3 8.5H4.252c.904-2 2.56-3.587 4.608-4.402Zm3.026-.594.116-.005c1.306 0 2.586 2.035 3.17 5.001H8.83c.568-2.878 1.79-4.88 3.056-4.996Zm3.342.76-.106-.174a8.531 8.531 0 0 1 4.63 4.41h-3.049c-.297-1.664-.805-3.124-1.475-4.236Z", + "M23 17.5a5.5 5.5 0 1 0-11 0 5.5 5.5 0 0 0 11 0Zm-5.5 0h2a.5.5 0 0 1 0 1H17a.5.5 0 0 1-.5-.491v-3.01a.5.5 0 0 1 1 0V17.5Z" + ], "headset-add-outline": "M23 6.5C23 3.46243 20.5376 1 17.5 1C14.4624 1 12 3.46243 12 6.5C12 9.53757 14.4624 12 17.5 12C20.5376 12 23 9.53757 23 6.5ZM18.0006 7.00001L18.0011 9.50352C18.0011 9.77966 17.7773 10.0035 17.5011 10.0035C17.225 10.0035 17.0011 9.77966 17.0011 9.50352L17.0006 7.00001H14.4956C14.2197 7.00001 13.9961 6.77615 13.9961 6.50001C13.9961 6.22387 14.2197 6.00001 14.4956 6.00001H17.0005L17 3.49927C17 3.22313 17.2239 2.99927 17.5 2.99927C17.7761 2.99927 18 3.22313 18 3.49927L18.0005 6.00001H20.4966C20.7725 6.00001 20.9961 6.22387 20.9961 6.50001C20.9961 6.77615 20.7725 7.00001 20.4966 7.00001H18.0006ZM17.5 13C18.0163 13 18.5185 12.9398 19 12.8261V15C19 16.0544 18.1841 16.9182 17.1493 16.9945L17 17H15C14.4872 17 14.0645 16.614 14.0067 16.1166L14 16V12L14.0002 11.9783C14.4634 12.2748 14.9666 12.5142 15.5 12.6865V15.5H17C17.2455 15.5 17.4496 15.3231 17.4919 15.0899L17.5 15V13ZM12.0218 3.00003C11.7171 3.47601 11.4727 3.99433 11.2994 4.5442C8.59265 4.88833 6.5 7.19978 6.5 10V11H9C9.55228 11 10 11.4477 10 12V16C10 16.5523 9.55228 17 9 17H6.5V17.25C6.5 18.4409 7.42516 19.4156 8.59595 19.4948L8.75 19.5L9.87812 19.4997C10.1871 18.626 11.0204 18 12 18C13.2426 18 14.25 19.0074 14.25 20.25C14.25 21.4926 13.2426 22.5 12 22.5C11.0201 22.5 10.1864 21.8735 9.87776 20.9992L8.75 21C6.74574 21 5.10873 19.4276 5.0052 17.4492L5 17.25V10C5 6.13401 8.13401 3 12 3L12.0218 3.00003ZM12 19.5C11.5858 19.5 11.25 19.8358 11.25 20.25C11.25 20.6642 11.5858 21 12 21C12.4142 21 12.75 20.6642 12.75 20.25C12.75 19.8358 12.4142 19.5 12 19.5ZM8.5 12.5H6.5V15.5H8.5V12.5Z", "headphones-sound-wave-outline": "M3.5 12a8.5 8.5 0 0 1 17 0v2h-2.25a.75.75 0 0 0-.75.75v6.5c0 .414.336.75.75.75H19a3 3 0 0 0 3-3v-7c0-5.523-4.477-10-10-10S2 6.477 2 12v7a3 3 0 0 0 3 3h.75a.75.75 0 0 0 .75-.75v-6.5a.75.75 0 0 0-.75-.75H3.5v-2Zm17 3.5V19a1.5 1.5 0 0 1-1.5 1.5v-5h1.5ZM3.5 19v-3.5H5v5A1.5 1.5 0 0 1 3.5 19Zm9.25-7.25a.75.75 0 0 0-1.5 0v10.5a.75.75 0 0 0 1.5 0v-10.5Zm-4 2.25a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5a.75.75 0 0 1 .75-.75Zm7.25.75a.75.75 0 0 0-1.5 0v4.5a.75.75 0 0 0 1.5 0v-4.5Z", "image-outline": "M17.75 3A3.25 3.25 0 0 1 21 6.25v11.5A3.25 3.25 0 0 1 17.75 21H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5Zm.58 16.401-5.805-5.686a.75.75 0 0 0-.966-.071l-.084.07-5.807 5.687c.182.064.378.099.582.099h11.5c.203 0 .399-.035.58-.099l-5.805-5.686L18.33 19.4ZM17.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v11.5c0 .208.036.408.103.594l5.823-5.701a2.25 2.25 0 0 1 3.02-.116l.128.116 5.822 5.702c.067-.186.104-.386.104-.595V6.25a1.75 1.75 0 0 0-1.75-1.75Zm-2.498 2a2.252 2.252 0 1 1 0 4.504 2.252 2.252 0 0 1 0-4.504Zm0 1.5a.752.752 0 1 0 0 1.504.752.752 0 0 0 0-1.504Z", @@ -122,6 +126,7 @@ "library-outline": "M4 3h1c1.054 0 1.918.816 1.995 1.85L7 5v14a2.001 2.001 0 0 1-1.85 1.994L5 21H4a2.001 2.001 0 0 1-1.995-1.85L2 19V5c0-1.054.816-1.918 1.85-1.995L4 3h1-1Zm6 0h1c1.054 0 1.918.816 1.995 1.85L13 5v14a2.001 2.001 0 0 1-1.85 1.994L11 21h-1a2.001 2.001 0 0 1-1.995-1.85L8 19V5c0-1.054.816-1.918 1.85-1.995L10 3h1-1Zm6.974 2c.84 0 1.608.531 1.89 1.346l.047.157 3.015 11.745a2 2 0 0 1-1.296 2.392l-.144.043-.969.248a2.002 2.002 0 0 1-2.387-1.284l-.047-.155-3.016-11.745a2 2 0 0 1 1.298-2.392l.143-.043.968-.248c.166-.043.334-.064.498-.064ZM5 4.5H4a.501.501 0 0 0-.492.41L3.5 5v14c0 .244.177.45.41.492L4 19.5h1c.245 0 .45-.178.492-.41L5.5 19V5a.501.501 0 0 0-.41-.492L5 4.5Zm6 0h-1a.501.501 0 0 0-.492.41L9.5 5v14c0 .244.177.45.41.492l.09.008h1c.245 0 .45-.178.492-.41L11.5 19V5a.501.501 0 0 0-.41-.492L11 4.5Zm5.975 2-.063.004-.063.013-.968.247a.498.498 0 0 0-.376.51l.015.1 3.016 11.745a.5.5 0 0 0 .483.375l.063-.003.062-.012.97-.25a.5.5 0 0 0 .374-.519l-.015-.088-3.015-11.747a.501.501 0 0 0-.483-.375Z", "link-outline": "M9.25 7a.75.75 0 0 1 .11 1.492l-.11.008H7a3.5 3.5 0 0 0-.206 6.994L7 15.5h2.25a.75.75 0 0 1 .11 1.492L9.25 17H7a5 5 0 0 1-.25-9.994L7 7h2.25ZM17 7a5 5 0 0 1 .25 9.994L17 17h-2.25a.75.75 0 0 1-.11-1.492l.11-.008H17a3.5 3.5 0 0 0 .206-6.994L17 8.5h-2.25a.75.75 0 0 1-.11-1.492L14.75 7H17ZM7 11.25h10a.75.75 0 0 1 .102 1.493L17 12.75H7a.75.75 0 0 1-.102-1.493L7 11.25h10H7Z", "list-outline": "M2.75 18h12.5a.75.75 0 0 1 .102 1.493l-.102.007H2.75a.75.75 0 0 1-.102-1.494L2.75 18h12.5-12.5Zm0-6.5h18.5a.75.75 0 0 1 .102 1.493L21.25 13H2.75a.75.75 0 0 1-.102-1.493l.102-.007h18.5-18.5Zm0-6.497h15.5a.75.75 0 0 1 .102 1.493l-.102.007H2.75a.75.75 0 0 1-.102-1.493l.102-.007h15.5-15.5Z", + "local-language-outline": "m9.34 6.372.05.105 5.56 14.5a.755.755 0 0 1-.418.971.73.73 0 0 1-.91-.333l-.043-.092-1.433-3.737H5.06l-.094-.006-1.546 3.76a.73.73 0 0 1-.963.401.754.754 0 0 1-.427-.885l.033-.096 5.964-14.5a.73.73 0 0 1 1.314-.088Zm9.406-4.37a.75.75 0 0 1 .743.65l.007.1V7.5h1.75a.75.75 0 0 1 .743.649l.007.102a.75.75 0 0 1-.648.743L21.245 9l-1.75-.001v7.25a.75.75 0 0 1-.648.744l-.102.007a.75.75 0 0 1-.743-.648l-.007-.102V2.753a.75.75 0 0 1 .75-.75ZM8.81 8.748 5.65 16.286h6.11L8.81 8.747Zm1.937-6.744h5.498a.75.75 0 0 1 .743.648l.006.102v3.004c0 2.344-1.9 4.245-4.245 4.245a.75.75 0 0 1 0-1.5c1.46 0 2.654-1.14 2.74-2.578l.005-.167V3.503h-4.747a.75.75 0 0 1-.102-1.493l.102-.007h5.498-5.498Z", "location-outline": "M5.843 4.568a8.707 8.707 0 1 1 12.314 12.314l-1.187 1.174c-.875.858-2.01 1.962-3.406 3.312a2.25 2.25 0 0 1-3.128 0l-3.491-3.396c-.439-.431-.806-.794-1.102-1.09a8.707 8.707 0 0 1 0-12.314Zm11.253 1.06A7.207 7.207 0 1 0 6.904 15.822L8.39 17.29a753.98 753.98 0 0 0 3.088 3 .75.75 0 0 0 1.043 0l3.394-3.3c.47-.461.863-.85 1.18-1.168a7.207 7.207 0 0 0 0-10.192ZM12 7.999a3.002 3.002 0 1 1 0 6.004 3.002 3.002 0 0 1 0-6.003Zm0 1.5a1.501 1.501 0 1 0 0 3.004 1.501 1.501 0 0 0 0-3.003Z", "lock-closed-outline": "M12 2a4 4 0 0 1 4 4v2h1.75A2.25 2.25 0 0 1 20 10.25v9.5A2.25 2.25 0 0 1 17.75 22H6.25A2.25 2.25 0 0 1 4 19.75v-9.5A2.25 2.25 0 0 1 6.25 8H8V6a4 4 0 0 1 4-4Zm5.75 7.5H6.25a.75.75 0 0 0-.75.75v9.5c0 .414.336.75.75.75h11.5a.75.75 0 0 0 .75-.75v-9.5a.75.75 0 0 0-.75-.75Zm-5.75 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-10A2.5 2.5 0 0 0 9.5 6v2h5V6A2.5 2.5 0 0 0 12 3.5Z", "lock-shield-outline": "M10 2a4 4 0 0 1 4 4v2h1.75A2.25 2.25 0 0 1 18 10.25V11c-.319 0-.637.11-.896.329l-.107.1c-.164.17-.33.323-.496.457L16.5 10.25a.75.75 0 0 0-.75-.75H4.25a.75.75 0 0 0-.75.75v9.5c0 .414.336.75.75.75h9.888a6.024 6.024 0 0 0 1.54 1.5H4.25A2.25 2.25 0 0 1 2 19.75v-9.5A2.25 2.25 0 0 1 4.25 8H6V6a4 4 0 0 1 4-4Zm8.284 10.122c.992 1.036 2.091 1.545 3.316 1.545.193 0 .355.143.392.332l.008.084v2.501c0 2.682-1.313 4.506-3.873 5.395a.385.385 0 0 1-.253 0c-2.476-.86-3.785-2.592-3.87-5.13L14 16.585v-2.5c0-.23.18-.417.4-.417 1.223 0 2.323-.51 3.318-1.545a.389.389 0 0 1 .566 0ZM10 13.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-10A2.5 2.5 0 0 0 7.5 6v2h5V6A2.5 2.5 0 0 0 10 3.5Z", @@ -192,6 +197,7 @@ "M2.75 17h7.775l-1.5 1.5H2.75a.75.75 0 0 1-.102-1.493L2.75 17ZM2.75 14.5h7.564a1.745 1.745 0 0 1-.241-1.5H2.75l-.102.007A.75.75 0 0 0 2.75 14.5ZM12.72 16.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l4.5-4.5ZM2.75 9h10.5a.75.75 0 0 1 .102 1.493l-.102.007H2.75a.75.75 0 0 1-.102-1.493L2.75 9ZM2.75 5h18.5a.75.75 0 0 1 .102 1.493l-.102.007H2.75a.75.75 0 0 1-.102-1.493L2.75 5Z", "M16.5 8a.75.75 0 0 1 .744.658l.14 1.13a3.25 3.25 0 0 0 2.828 2.829l1.13.139a.75.75 0 0 1 0 1.488l-1.13.14a3.25 3.25 0 0 0-2.829 2.828l-.139 1.13a.75.75 0 0 1-1.488 0l-.14-1.13a3.25 3.25 0 0 0-2.828-2.829l-1.13-.139a.75.75 0 0 1 0-1.488l1.13-.14a3.25 3.25 0 0 0 2.829-2.828l.139-1.13A.75.75 0 0 1 16.5 8Zm0 3.774a4.761 4.761 0 0 1-1.726 1.726 4.761 4.761 0 0 1 1.726 1.726 4.761 4.761 0 0 1 1.726-1.726 4.761 4.761 0 0 1-1.726-1.726Z" ], + "toolbox-outline": "M7 6.252V7H4.25A2.25 2.25 0 0 0 2 9.25v8.497a2.25 2.25 0 0 0 2.25 2.25h15.5a2.25 2.25 0 0 0 2.25-2.25V9.25A2.25 2.25 0 0 0 19.75 7H17v-.748a2.25 2.25 0 0 0-2.25-2.25h-5.5A2.25 2.25 0 0 0 7 6.252Zm2.25-.75h5.5a.75.75 0 0 1 .75.75V7h-7v-.748a.75.75 0 0 1 .75-.75Zm-2.25 3h1.5V8.5h7v.002H17V8.5h2.75a.75.75 0 0 1 .75.75v2.25h-3v-.75a.75.75 0 0 0-1.5 0v.75H8v-.75a.75.75 0 0 0-1.5 0v.75h-3V9.25a.75.75 0 0 1 .75-.75H7v.002ZM16 13v1.25a.75.75 0 0 0 1.5 0V13h3v4.747a.75.75 0 0 1-.75.75H4.25a.75.75 0 0 1-.75-.75V13h3v1.25a.75.75 0 0 0 1.5 0V13h8Z", "translate-outline": "M16.953 5.303a1 1 0 0 0-1.906-.606c-.124.389-.236.899-.324 1.344-.565.012-1.12 0-1.652-.038a1 1 0 1 0-.142 1.995c.46.032.934.048 1.416.047a25.649 25.649 0 0 0-.24 1.698c-1.263.716-2.142 1.684-2.636 2.7-.624 1.283-.7 2.857.239 3.883.675.736 1.704.758 2.499.588.322-.068.654-.176.988-.32a1 1 0 0 0 1.746-.93 13.17 13.17 0 0 0-.041-.115 8.404 8.404 0 0 0 2.735-4.06c.286.251.507.55.658.864.284.594.334 1.271.099 1.91-.234.633-.78 1.313-1.84 1.843a1 1 0 0 0 .895 1.789c1.44-.72 2.385-1.758 2.821-2.94a4.436 4.436 0 0 0-.17-3.464 4.752 4.752 0 0 0-2.104-2.165C19.998 9.22 20 9.11 20 9a1 1 0 0 0-1.974-.23 5.984 5.984 0 0 0-1.796.138c.047-.305.102-.626.166-.964a20.142 20.142 0 0 0 2.842-.473 1 1 0 0 0-.476-1.942c-.622.152-1.286.272-1.964.358.048-.208.1-.409.155-.584Zm-3.686 8.015c.166-.34.414-.697.758-1.037.02.348.053.67.098.973.083.56.207 1.048.341 1.477a3.41 3.41 0 0 1-.674.227c-.429.092-.588.019-.614.006l-.004-.001c-.162-.193-.329-.774.095-1.645Zm4.498-2.562a6.362 6.362 0 0 1-1.568 2.73 7.763 7.763 0 0 1-.095-.525 10.294 10.294 0 0 1-.088-1.904c.033-.013.067-.024.1-.036l1.651-.265Zm0 0-1.651.265c.602-.212 1.155-.29 1.651-.265ZM7.536 6.29a6.342 6.342 0 0 0-4.456.331 1 1 0 0 0 .848 1.811 4.342 4.342 0 0 1 3.049-.222c.364.107.568.248.69.37.12.123.203.27.257.454.067.225.087.446.09.69a8.195 8.195 0 0 0-.555-.117c-1.146-.199-2.733-.215-4.262.64-1.271.713-1.796 2.168-1.682 3.448.12 1.326.94 2.679 2.572 3.136 1.48.414 2.913-.045 3.877-.507l.08-.04a1 1 0 0 0 1.96-.281V10.5c0-.053.002-.12.005-.2.012-.417.034-1.16-.168-1.838a3.043 3.043 0 0 0-.755-1.29c-.394-.398-.91-.694-1.547-.881h-.003Zm-.419 5.288c.344.06.647.143.887.222v2.197a7.021 7.021 0 0 1-.905.524c-.792.38-1.682.605-2.473.384-.698-.195-1.06-.742-1.119-1.389-.062-.693.243-1.286.667-1.523.987-.553 2.06-.569 2.943-.415Z", "eye-show-outline": "M12 9.005a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 1.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5ZM12 5.5c4.613 0 8.596 3.15 9.701 7.564a.75.75 0 1 1-1.455.365 8.503 8.503 0 0 0-16.493.004.75.75 0 0 1-1.455-.363A10.003 10.003 0 0 1 12 5.5Z", "eye-hide-outline": "M2.22 2.22a.75.75 0 0 0-.073.976l.073.084 4.034 4.035a9.986 9.986 0 0 0-3.955 5.75.75.75 0 0 0 1.455.364 8.49 8.49 0 0 1 3.58-5.034l1.81 1.81A4 4 0 0 0 14.8 15.86l5.919 5.92a.75.75 0 0 0 1.133-.977l-.073-.084-6.113-6.114.001-.002-1.2-1.198-2.87-2.87h.002L8.719 7.658l.001-.002-1.133-1.13L3.28 2.22a.75.75 0 0 0-1.06 0Zm7.984 9.045 3.535 3.536a2.5 2.5 0 0 1-3.535-3.535ZM12 5.5c-1 0-1.97.148-2.889.425l1.237 1.236a8.503 8.503 0 0 1 9.899 6.272.75.75 0 0 0 1.455-.363A10.003 10.003 0 0 0 12 5.5Zm.195 3.51 3.801 3.8a4.003 4.003 0 0 0-3.801-3.8Z", @@ -232,7 +238,6 @@ "M14 0L13.9093 0.00622212C13.7497 0.0281315 13.6035 0.107093 13.4976 0.228504C13.3917 0.349915 13.3333 0.505562 13.3333 0.666661V1.33332H12.6667L12.576 1.33954C12.4164 1.36145 12.2701 1.44041 12.1642 1.56183C12.0584 1.68324 12 1.83888 12 1.99998L12.0062 2.09065C12.0281 2.25025 12.1071 2.39652 12.2285 2.50241C12.3499 2.60829 12.5056 2.66664 12.6667 2.66664H13.3333V3.3333L13.3396 3.42397C13.3615 3.58357 13.4404 3.72984 13.5618 3.83573C13.6833 3.94162 13.8389 3.99996 14 3.99996L14.0907 3.99374C14.416 3.9493 14.6667 3.67108 14.6667 3.3333V2.66664H15.3333L15.424 2.66042C15.7493 2.61598 16 2.33776 16 1.99998L15.9938 1.90932C15.9719 1.74971 15.8929 1.60345 15.7715 1.49756C15.6501 1.39167 15.4944 1.33333 15.3333 1.33332H14.6667V0.666661L14.6605 0.575995C14.6385 0.416393 14.5596 0.270123 14.4382 0.164236C14.3168 0.0583485 14.1611 6.79363e-06 14 0Z", "M16 12.0001L15.8187 12.0125C15.4995 12.0563 15.2069 12.2143 14.9951 12.4571C14.7834 12.6999 14.6667 13.0112 14.6667 13.3334V14.6667H13.3333L13.152 14.6792C12.8328 14.723 12.5403 14.8809 12.3285 15.1237C12.1167 15.3665 12 15.6778 12 16L12.0124 16.1814C12.0563 16.5006 12.2142 16.7931 12.457 17.0049C12.6998 17.2167 13.0111 17.3333 13.3333 17.3334H14.6667V18.6667L14.6791 18.848C14.7229 19.1672 14.8809 19.4598 15.1237 19.6715C15.3665 19.8833 15.6778 20 16 20L16.1813 19.9876C16.832 19.8987 17.3333 19.3422 17.3333 18.6667V17.3334H18.6667L18.848 17.3209C19.4987 17.232 20 16.6756 20 16L19.9876 15.8187C19.9437 15.4995 19.7858 15.207 19.543 14.9952C19.3002 14.7834 18.9889 14.6667 18.6667 14.6667H17.3333V13.3334L17.3209 13.1521C17.2771 12.8329 17.1191 12.5403 16.8763 12.3285C16.6335 12.1168 16.3222 12.0001 16 12.0001Z" ], - "book-copy-outline": [ "M3.66675 15.3334V5.33341C3.66675 4.89139 3.84234 4.46746 4.1549 4.1549C4.46746 3.84234 4.89139 3.66675 5.33341 3.66675H14.5001", "M6.16675 13.6667H5.33341C4.89139 13.6667 4.46746 13.8423 4.1549 14.1549C3.84234 14.4675 3.66675 14.8914 3.66675 15.3334C3.66675 15.7754 3.84234 16.1994 4.1549 16.5119C4.46746 16.8245 4.89139 17.0001 5.33341 17.0001H6.16675", diff --git a/app/javascript/v3/api/auth.js b/app/javascript/v3/api/auth.js index a4793d3d0d70..d57ec6ffa96b 100644 --- a/app/javascript/v3/api/auth.js +++ b/app/javascript/v3/api/auth.js @@ -42,6 +42,34 @@ export const register = async creds => { return null; }; +export const registerV2 = async creds => { + try { + const response = await wootAPI.post('api/v2/accounts', { + email: creds.email, + password: creds.password, + h_captcha_client_response: creds.hCaptchaClientResponse, + }); + setAuthCredentials(response); + return response.data; + } catch (error) { + throwErrorMessage(error); + } + return null; +}; + +export const accountSetup = async ({ id, name, locale }) => { + try { + const response = await wootAPI.put(`api/v2/accounts/${id}`, { + name, + locale, + }); + return response.data; + } catch (error) { + throwErrorMessage(error); + } + return null; +}; + export const verifyPasswordToken = async ({ confirmationToken }) => { try { const response = await wootAPI.post('auth/confirmation', { diff --git a/app/javascript/v3/components/Form/Input.vue b/app/javascript/v3/components/Form/Input.vue index 63064b6545b3..787b89d8de33 100644 --- a/app/javascript/v3/components/Form/Input.vue +++ b/app/javascript/v3/components/Form/Input.vue @@ -28,7 +28,7 @@ 'px-3 py-2 mb-0': spacing === 'compact', 'pl-9': icon, }" - class="block w-full border-none rounded-md shadow-sm appearance-none outline outline-1 focus:outline-2 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 sm:text-sm sm:leading-6 dark:bg-slate-800" + class="block w-full border-none shadow-sm appearance-none rounded-xl outline outline-1 focus:outline focus:outline-2 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 sm:text-sm sm:leading-6 dark:bg-slate-800" @input="onInput" @blur="$emit('blur')" /> diff --git a/app/javascript/v3/views/auth/signup/Index.vue b/app/javascript/v3/views/auth/signup/Index.vue index e1621db183b8..1b01e6d6262a 100644 --- a/app/javascript/v3/views/auth/signup/Index.vue +++ b/app/javascript/v3/views/auth/signup/Index.vue @@ -1,42 +1,43 @@ diff --git a/app/javascript/v3/views/auth/signup/components/Signup/Form.vue b/app/javascript/v3/views/auth/signup/components/Signup/Form.vue index 898e26ddd6ab..401ea1b4ae1b 100644 --- a/app/javascript/v3/views/auth/signup/components/Signup/Form.vue +++ b/app/javascript/v3/views/auth/signup/components/Signup/Form.vue @@ -1,52 +1,30 @@ @@ -63,10 +71,10 @@ import globalConfigMixin from 'shared/mixins/globalConfigMixin'; import alertMixin from 'shared/mixins/alertMixin'; import VueHcaptcha from '@hcaptcha/vue-hcaptcha'; import FormInput from 'v3/components/Form/Input.vue'; -import SubmitButton from '../../../../../components/Button/SubmitButton.vue'; +import SubmitButton from 'v3/components/Button/SubmitButton.vue'; import { isValidPassword } from 'shared/helpers/Validators'; -import GoogleOAuthButton from '../../../../../components/GoogleOauth/Button.vue'; -import { registerV2 } from '../../../../../api/auth'; +import GoogleOAuthButton from 'v3/components/GoogleOauth/Button.vue'; +import { registerV2 } from 'v3/api/auth'; var CompanyEmailValidator = require('company-email-validator'); export const generateOnboardingUrl = accountId => From 4110245ecedb67f807fac6a7982d724120b40a98 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 7 Mar 2024 14:09:16 +0530 Subject: [PATCH 31/64] fix: remove unused style --- .../v3/views/auth/signup/components/Testimonials/Index.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/javascript/v3/views/auth/signup/components/Testimonials/Index.vue b/app/javascript/v3/views/auth/signup/components/Testimonials/Index.vue index 6c0cf5cf6710..c991aa9657d9 100644 --- a/app/javascript/v3/views/auth/signup/components/Testimonials/Index.vue +++ b/app/javascript/v3/views/auth/signup/components/Testimonials/Index.vue @@ -66,8 +66,3 @@ export default { }, }; - - From a3e4f8a45a6f10536b21acee6569c762769e79a7 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 7 Mar 2024 14:14:59 +0530 Subject: [PATCH 32/64] refactor: use script setup syntax --- .../v3/views/onboarding/BaseModal.vue | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/app/javascript/v3/views/onboarding/BaseModal.vue b/app/javascript/v3/views/onboarding/BaseModal.vue index 0ec6e684a1cf..3681d36d4b1e 100644 --- a/app/javascript/v3/views/onboarding/BaseModal.vue +++ b/app/javascript/v3/views/onboarding/BaseModal.vue @@ -1,3 +1,18 @@ + + - - From be3c52dbcd1451aad51535a4c62b9214e0b64006 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 7 Mar 2024 14:34:09 +0530 Subject: [PATCH 33/64] fix: onboarding layout --- .../v3/views/onboarding/RouteLayout.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/javascript/v3/views/onboarding/RouteLayout.vue b/app/javascript/v3/views/onboarding/RouteLayout.vue index 5f1bb198bf03..5b9dd7bb15be 100644 --- a/app/javascript/v3/views/onboarding/RouteLayout.vue +++ b/app/javascript/v3/views/onboarding/RouteLayout.vue @@ -1,15 +1,18 @@ @@ -92,10 +94,10 @@ export default { validator: value => ['base', 'compact'].includes(value), }, }, - methods: { - onInput(e) { - this.$emit('input', e.target.value); - }, + mounted() { + if (this.$attrs.autofocus) { + this.$refs.input.focus(); + } }, }; diff --git a/app/javascript/v3/views/onboarding/InviteTeam.vue b/app/javascript/v3/views/onboarding/InviteTeam.vue index 5474821407b1..edfbb9a0266e 100644 --- a/app/javascript/v3/views/onboarding/InviteTeam.vue +++ b/app/javascript/v3/views/onboarding/InviteTeam.vue @@ -11,7 +11,8 @@ spacing="compact" class="flex-grow" :placeholder="$t('START_ONBOARDING.INVITE_TEAM.PLACEHOLDER')" - @keyup-enter="pushEmail" + :autofocus="true" + @keyup.enter="pushEmail" /> Date: Thu, 7 Mar 2024 15:04:01 +0530 Subject: [PATCH 38/64] refactor: event handling in text area --- app/javascript/v3/components/Form/Textarea.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/javascript/v3/components/Form/Textarea.vue b/app/javascript/v3/components/Form/Textarea.vue index 0a06860578bd..37ccf643faad 100644 --- a/app/javascript/v3/components/Form/Textarea.vue +++ b/app/javascript/v3/components/Form/Textarea.vue @@ -21,8 +21,10 @@ 'resize-none': !allowResize, }" class="block w-full p-3 bg-white border-none rounded-md shadow-sm appearance-none outline outline-1 focus:outline focus:outline-2 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 dark:bg-slate-800 sm:text-sm" - @input="onInput" - @blur="$emit('blur')" + v-on="{ + ...$listeners, + input: event => $emit('input', event.target.value), + }" /> @@ -74,10 +76,5 @@ export default { default: '', }, }, - methods: { - onInput(e) { - this.$emit('input', e.target.value); - }, - }, }; From 7d20322fcbc6621844011473923963097880172f Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 7 Mar 2024 16:43:58 +0530 Subject: [PATCH 39/64] feat: update size limit --- package.json | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index ac353f186414..c6bb8d808e69 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "size-limit": [ { "path": "public/packs/js/widget-*.js", - "limit": "280 KB" + "limit": "300 KB" }, { "path": "public/packs/js/sdk.js", @@ -160,12 +160,7 @@ } }, "lint-staged": { - "app/**/*.{js,vue}": [ - "eslint --fix", - "git add" - ], - "*.scss": [ - "scss-lint" - ] + "app/**/*.{js,vue}": ["eslint --fix", "git add"], + "*.scss": ["scss-lint"] } } From 69a139e347aa3037595710a97a55bb28e7a8457a Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 11 Mar 2024 11:39:16 +0530 Subject: [PATCH 40/64] feat: handle onboarding --- .../omniauth_callbacks_controller.rb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/controllers/devise_overrides/omniauth_callbacks_controller.rb b/app/controllers/devise_overrides/omniauth_callbacks_controller.rb index e1cf76d6bff4..ec98594a10a9 100644 --- a/app/controllers/devise_overrides/omniauth_callbacks_controller.rb +++ b/app/controllers/devise_overrides/omniauth_callbacks_controller.rb @@ -25,8 +25,9 @@ def sign_up_user create_account_for_user token = @resource.send(:set_reset_password_token) - frontend_url = ENV.fetch('FRONTEND_URL', nil) - redirect_to "#{frontend_url}/app/auth/password/edit?config=default&reset_password_token=#{token}" + base_url = password_reset_url + onboarding_url = account_onboarding_url(@account) + redirect_to "#{base_url}?config=default&reset_password_token=#{token}&redirect_url=#{onboarding_url}" end def login_page_url(error: nil, email: nil, sso_auth_token: nil) @@ -72,4 +73,16 @@ def create_account_for_user def default_devise_mapping 'user' end + + def account_onboarding_url(account) + frontend_url = ENV.fetch('FRONTEND_URL', nil) + + "#{frontend_url}app/accounts/#{account.id}/start/setup-profile" + end + + def password_reset_url + frontend_url = ENV.fetch('FRONTEND_URL', nil) + + "#{frontend_url}/app/auth/password/edit" + end end From cef28ff3d12c2b0d9324345438be85e0bd7a27f0 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 11 Mar 2024 11:39:40 +0530 Subject: [PATCH 41/64] feat: handle redirecturl --- app/javascript/v3/views/auth/password/Edit.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/javascript/v3/views/auth/password/Edit.vue b/app/javascript/v3/views/auth/password/Edit.vue index 4c61ce15a4ce..25b941601b0a 100644 --- a/app/javascript/v3/views/auth/password/Edit.vue +++ b/app/javascript/v3/views/auth/password/Edit.vue @@ -1,13 +1,13 @@