From e8a473829e29601449e3a21afe33267aa320340b Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 18 Nov 2025 18:03:20 -0600 Subject: [PATCH] Website: Update signup modal styles (#35956) Closes: https://github.com/fleetdm/fleet/issues/35955 Changes: - Updated the signup modal styles to prevent page styles from overriding the modal's stylesheet. - Added punctuation to the link to the query generator on the query library page. - Added the signup modal to the query generator page. --- .../js/components/signup-modal.component.js | 44 ++++---- .../components/signup-modal.component.less | 102 +++++++++++------- website/views/pages/admin/query-generator.ejs | 1 + website/views/pages/query-library.ejs | 2 +- 4 files changed, 88 insertions(+), 61 deletions(-) diff --git a/website/assets/js/components/signup-modal.component.js b/website/assets/js/components/signup-modal.component.js index d8c2009ab7..f0c6de1d03 100644 --- a/website/assets/js/components/signup-modal.component.js +++ b/website/assets/js/components/signup-modal.component.js @@ -35,7 +35,7 @@ parasails.registerComponent('signupModal', { firstName: {required: true}, lastName: {required: true}, emailAddress: {required: true, isEmail: true}, - password: {required: true}, + password: {required: true, minLength: 8}, }, // Login form loginFormData: {}, @@ -81,35 +81,35 @@ parasails.registerComponent('signupModal', {
- - + +
This doesn’t appear to be a valid email address
- - + +
Password too short.
Please enter a password.
-

Minimum length is 8 characters

+

Minimum length is 8 characters

- - + +
Please enter your first name.
- - + +
Please enter your last name.
- This email is already linked to a Fleet account.
Please sign in with your email and password. + This email is already linked to a Fleet account.
Please sign in with your email and password.
Please enter your work or school email address. @@ -117,32 +117,32 @@ parasails.registerComponent('signupModal', {
An icon indicating that this section has important information
-

Don’t have a work email? Try a local demo of Fleet Free instead.

+

Don’t have a work email? Try a local demo of Fleet Free instead.

-

By signing up you agree to our privacy policy and terms of service.

- Agree and continue - Try again +

By signing up you agree to our privacy policy and terms of service.

+ Agree and continue + Try again
- - + +
Please provide a valid email address.
- - + +
Please enter your password.
- The email address provided doesn't match an existing account. Create an account here. + The email address provided doesn't match an existing account. Create an account here. Something’s not quite right with your email or password.
- Sign in + Sign in
- Forgot your password? + Forgot your password?
diff --git a/website/assets/styles/components/signup-modal.component.less b/website/assets/styles/components/signup-modal.component.less index 24aacb9e14..5290f9a8f3 100644 --- a/website/assets/styles/components/signup-modal.component.less +++ b/website/assets/styles/components/signup-modal.component.less @@ -20,25 +20,24 @@ } } [purpose='form-switch'] { - [purpose='form-option'] { user-select: none; cursor: pointer; width: fit-content; padding: 8px 16px 8px 0px; - margin-bottom: 4px; + margin-bottom: 4px !important;//lesshint-disable-line importantRule display: flex; flex-direction: row; align-items: center; border-radius: 7px; border: none; - color: #515774; - font-size: 14px; - font-weight: 400; + color: #515774 !important;//lesshint-disable-line importantRule + font-size: 14px !important;//lesshint-disable-line importantRule + font-weight: 400 !important;//lesshint-disable-line importantRule line-height: 150%; white-space: nowrap; height: fit-content; - input { + input[type='radio'] { cursor: pointer; margin-right: 8px; display: none; @@ -66,56 +65,82 @@ transform: scale(1); } } - .form-control { - height: 48px; - } } - - } + [purpose='modal-form'] { - .form-control { + [purpose='modal-form-input'] { height: 40px; border-radius: 6px; } - .selectbox { - - position: relative; - } - .selectbox::after { - content: url('/images/chevron-12x8@2x.png'); - right: 14px; - transform: scale(0.5); - top: 14px; - position: absolute; - pointer-events: none; - } - .selectbox select { - border-radius: 6px; - height: 48px; - appearance: none; - -webkit-appearance: none; - } - label { - color: var(--text-text-brand, #192147); - - /* Body SM (bold) */ + [purpose='modal-form-label'] { + color: #192147; font-family: Inter; font-size: 14px; font-style: normal; font-weight: 700; line-height: 21px; /* 150% */ } - .small { - font-size: 12px; + [purpose='modal-form-note'] { + font-size: 12px !important;//lesshint-disable-line importantRule + } + + [purpose='modal-form-link'] { + color: @core-fleet-black-75 !important;//lesshint-disable-line importantRule + cursor: pointer; + font-size: 12px !important;//lesshint-disable-line importantRule + text-decoration: underline !important;//lesshint-disable-line importantRule + text-underline-offset: 4px !important;//lesshint-disable-line importantRule + text-decoration-color: #C5C7D1 !important;//lesshint-disable-line importantRule + &:hover { + color: @core-fleet-black !important;//lesshint-disable-line importantRule + text-decoration-color: @core-fleet-black !important;//lesshint-disable-line importantRule + } } [parasails-component='cloud-error'] { p { - color: @core-vibrant-red; + color: @core-vibrant-red !important;//lesshint-disable-line importantRule + font-size: 14px !important;//lesshint-disable-line importantRule + a { + text-decoration-color: @core-vibrant-red !important;//lesshint-disable-line importantRule + color: @core-vibrant-red !important;//lesshint-disable-line importantRule + font-size: unset !important;//lesshint-disable-line importantRule + &:hover { + color: darken(@core-vibrant-red, 20%) !important; //lesshint-disable-line importantRule + text-decoration-color: darken(@core-vibrant-red, 20%) !important;//lesshint-disable-line importantRule + } + } } } + [purpose='tip'] { + margin: 16px 0 32px; + background: #F4F4FF; + padding: 16px; + border-radius: 8px; + display: flex; + img { + display: flex; + margin: 4px 12px 0 0; + height: 16px; + width: 16px; + padding: 0px; + } + p { + display: block; + margin-bottom: 16px; + line-height: 24px; + font-size: 14px !important;//lesshint-disable-line importantRule + a { + font-size: unset !important;//lesshint-disable-line importantRule + color: unset !important;//lesshint-disable-line importantRule + } + } + p:last-child { + margin-bottom: 0px; + } + } } - [purpose='submit-button'] { + [purpose='modal-form-submit-button'] { margin-left: auto; margin-right: auto; @@ -296,3 +321,4 @@ } } + diff --git a/website/views/pages/admin/query-generator.ejs b/website/views/pages/admin/query-generator.ejs index 2c076ed393..0bdd386eaf 100644 --- a/website/views/pages/admin/query-generator.ejs +++ b/website/views/pages/admin/query-generator.ejs @@ -82,5 +82,6 @@ + <%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %> diff --git a/website/views/pages/query-library.ejs b/website/views/pages/query-library.ejs index ae38c1ef2a..56d6f105a6 100644 --- a/website/views/pages/query-library.ejs +++ b/website/views/pages/query-library.ejs @@ -7,7 +7,7 @@

Queries

A collection of optional queries you can run anytime. Contributions welcome over on GitHub.

-

Want to create your own? Our query robot can help

+

Want to create your own? Our query robot can help.