From b04d18b739d4625e073dc8e929940be2d72c348a Mon Sep 17 00:00:00 2001 From: Alban Costaz Date: Wed, 11 Sep 2024 16:44:47 +0200 Subject: [PATCH] [MS] Added back buttons after server choice on organization creation --- client/src/locales/en-US.json | 3 +- client/src/locales/fr-FR.json | 1 + client/src/views/client-area/BmsLogin.vue | 20 +++++++- .../CreateOrganizationCustomServer.vue | 2 + .../creation/CreateOrganizationModal.vue | 7 +++ .../creation/CreateOrganizationSaas.vue | 3 ++ .../creation/CreateOrganizationTrial.vue | 2 + .../OrganizationNameAndServerPage.vue | 1 - .../creation/OrganizationNamePage.vue | 17 ++++++- .../OrganizationUserInformationPage.vue | 1 - client/tests/pw/e2e/client_area_login.spec.ts | 6 +-- .../tests/pw/e2e/create_organization.spec.ts | 49 +++++++++++++++++++ .../pw/e2e/create_organization_custom.spec.ts | 4 -- .../pw/e2e/create_organization_saas.spec.ts | 20 ++++---- .../pw/e2e/create_organization_trial.spec.ts | 4 -- client/tests/pw/helpers/fixtures.ts | 2 +- 16 files changed, 114 insertions(+), 28 deletions(-) diff --git a/client/src/locales/en-US.json b/client/src/locales/en-US.json index 4265b2c4e30..539226027ed 100644 --- a/client/src/locales/en-US.json +++ b/client/src/locales/en-US.json @@ -1209,12 +1209,13 @@ }, "clientArea": { "app": { - "titleLinkOrganization": "Link you customer account to your new organization", + "titleLinkOrganization": "Link your customer account to your new organization", "titleLogin": "Log in to your customer account", "emailLabel": "Email", "password": "Password", "forgottenPassword": "Forgot your password?", "login": "Log in", + "backButton": "Back", "saveLogin": "Remember me", "loginFailed": "Cannot log in. Please check your email and password.", "networkFailed": "Could not reach the server. Make sure that you are online and try again.", diff --git a/client/src/locales/fr-FR.json b/client/src/locales/fr-FR.json index cbba9e0df7e..ced393a0934 100644 --- a/client/src/locales/fr-FR.json +++ b/client/src/locales/fr-FR.json @@ -1215,6 +1215,7 @@ "password": "Mot de passe", "forgottenPassword": "Mot de passe oublié ?", "login": "Se connecter", + "backButton": "Retour", "saveLogin": "Se souvenir de moi", "loginFailed": "Impossible de se connecter. Veuillez vérifier votre email et mot de passe.", "networkFailed": "Impossible de contacter le serveur. Veuillez vérifier votre connexion à internet.", diff --git a/client/src/views/client-area/BmsLogin.vue b/client/src/views/client-area/BmsLogin.vue index 1883cd38288..135b336f3d2 100644 --- a/client/src/views/client-area/BmsLogin.vue +++ b/client/src/views/client-area/BmsLogin.vue @@ -107,8 +107,17 @@ - +
+ (); @@ -343,12 +353,18 @@ async function onLoginClicked(): Promise { display: flex; gap: 1rem; align-items: center; + justify-content: end; margin-top: 0.5rem; width: 100%; &__item { height: 2.5rem; border-radius: var(--parsec-radius-6); + border: 1px solid transparent; + + &:hover { + border: 1px solid var(--parsec-color-light-secondary-contrast); + } } .skeleton-login-button { diff --git a/client/src/views/organizations/creation/CreateOrganizationCustomServer.vue b/client/src/views/organizations/creation/CreateOrganizationCustomServer.vue index 5d668a9d646..d95d056f848 100644 --- a/client/src/views/organizations/creation/CreateOrganizationCustomServer.vue +++ b/client/src/views/organizations/creation/CreateOrganizationCustomServer.vue @@ -11,6 +11,7 @@ :disable-server-addr-field="bootstrapLink !== undefined" :disable-organization-name-field="bootstrapLink !== undefined" @organization-name-and-server-chosen="onOrganizationNameAndServerChosen" + @go-back-requested="$emit('backToServerChoice')" @close-requested="$emit('closeRequested')" :hide-previous="true" /> @@ -107,6 +108,7 @@ const props = defineProps<{ const emits = defineEmits<{ (e: 'closeRequested'): void; + (e: 'backToServerChoice'): void; (e: 'organizationCreated', organizationName: OrganizationID, device: AvailableDevice, saveStrategy: DeviceSaveStrategy): void; }>(); diff --git a/client/src/views/organizations/creation/CreateOrganizationModal.vue b/client/src/views/organizations/creation/CreateOrganizationModal.vue index e48d17de5a5..3370b43bf40 100644 --- a/client/src/views/organizations/creation/CreateOrganizationModal.vue +++ b/client/src/views/organizations/creation/CreateOrganizationModal.vue @@ -14,18 +14,21 @@ :information-manager="informationManager" @close-requested="onCloseRequested" @organization-created="onOrganizationCreated" + @back-to-server-choice="onBackToServerChoice" />
@@ -103,6 +106,10 @@ async function onOrganizationCreated( : AccessStrategy.usePassword(device, (saveStrategy as DeviceSaveStrategyPassword).password); await modalController.dismiss({ device: device, access: accessStrategy }, MsModalResult.Confirm); } + +async function onBackToServerChoice(): Promise { + serverType.value = undefined; +}