From c552c343f98e5f5a7842d2433acce396ca7b3ae5 Mon Sep 17 00:00:00 2001 From: Vitalii Date: Tue, 9 Aug 2022 15:13:41 +0300 Subject: [PATCH] web/satellite: make modals responsive Made next modals reponsive: AddTeamMemberModal ChangePasswordModal CreateProjectModal CreateProjectPromptModal DisableMFAModal EditProfileModal EnableMFAModal MFARecoveryCodesModal Issue: https://github.com/storj/storj/issues/5031 Change-Id: I9c80137febd1d16678f3de523634efc5010c8a9d --- .../components/common/PasswordStrength.vue | 10 +- .../src/components/common/VModal.vue | 11 +- .../components/modals/AddTeamMemberModal.vue | 120 ++++++++++++++---- .../components/modals/ChangePasswordModal.vue | 49 ++++++- .../components/modals/CreateProjectModal.vue | 47 +++++-- .../modals/CreateProjectPromptModal.vue | 54 ++++++-- .../src/components/modals/DisableMFAModal.vue | 29 ++++- .../components/modals/EditProfileModal.vue | 19 +++ .../src/components/modals/EnableMFAModal.vue | 44 ++++++- .../modals/MFARecoveryCodesModal.vue | 16 +++ 10 files changed, 332 insertions(+), 67 deletions(-) diff --git a/web/satellite/src/components/common/PasswordStrength.vue b/web/satellite/src/components/common/PasswordStrength.vue index b41e48e82..08a548b1a 100644 --- a/web/satellite/src/components/common/PasswordStrength.vue +++ b/web/satellite/src/components/common/PasswordStrength.vue @@ -174,13 +174,13 @@ export default class PasswordStrength extends Vue { private get barWidth(): string { switch (this.passwordStrength) { case 'Weak': - return '81px'; + return '25%'; case 'Good': - return '162px'; + return '50%'; case 'Strong': - return '243px'; + return '75%'; case 'Very Strong': - return '325px'; + return '100%'; } return '0px'; @@ -198,7 +198,6 @@ export default class PasswordStrength extends Vue { top: 96px; right: -3px; padding: 25px 20px; - opacity: 0.97; border: 1px solid rgb(193 193 193 / 30%); box-shadow: 0 4px 20px rgb(204 208 214 / 25%); border-radius: 6px; @@ -242,6 +241,7 @@ export default class PasswordStrength extends Vue { line-height: 16px; color: #afb7c1; margin: 10px 0 0; + text-align: left; } &__rule-area { diff --git a/web/satellite/src/components/common/VModal.vue b/web/satellite/src/components/common/VModal.vue index 45d9eab18..8e4d3eaf5 100644 --- a/web/satellite/src/components/common/VModal.vue +++ b/web/satellite/src/components/common/VModal.vue @@ -52,17 +52,16 @@ export default class VModal extends Vue { display: inline-block; position: relative; background: #fff; - border-radius: 20px; + border-radius: 10px; box-shadow: 0 0 32px rgb(0 0 0 / 4%); + margin: 0 24px; &__close { - display: flex; position: absolute; - right: 30px; - top: 30px; - height: 24px; - width: 24px; + right: 24px; + top: 24px; cursor: pointer; + opacity: 0.55; } } } diff --git a/web/satellite/src/components/modals/AddTeamMemberModal.vue b/web/satellite/src/components/modals/AddTeamMemberModal.vue index 1498a97d9..5755c0fa0 100644 --- a/web/satellite/src/components/modals/AddTeamMemberModal.vue +++ b/web/satellite/src/components/modals/AddTeamMemberModal.vue @@ -7,16 +7,17 @@
-

Add Team Member

+

Add Team Member

add team member image
+

Add Team Member

Email Address

{{ formError }}

-
+
4; - } - /** * Removes error for selected input. */ @@ -293,14 +290,17 @@ export default class AddTeamMemberModal extends Vue { font-family: 'font_regular', sans-serif; &__main { - border-top-left-radius: 6px; - border-top-right-radius: 6px; + border-radius: 6px 6px 0 0; display: flex; align-items: flex-start; justify-content: center; background-color: #fff; - padding: 80px 20px 80px 30px; - width: calc(100% - 50px); + padding: 80px 24px; + width: calc(100% - 48px); + + @media screen and (max-width: 950px) { + padding: 48px 24px; + } } &__info-panel-container { @@ -310,7 +310,11 @@ export default class AddTeamMemberModal extends Vue { align-items: center; margin-right: 150px; - &__main-label-text { + @media screen and (max-width: 950px) { + display: none; + } + + &__title { font-family: 'font_bold', sans-serif; font-size: 32px; line-height: 29px; @@ -330,24 +334,57 @@ export default class AddTeamMemberModal extends Vue { width: 100%; max-width: 600px; + @media screen and (max-width: 950px) { + max-width: unset; + } + + &__title { + display: none; + font-family: 'font_bold', sans-serif; + font-size: 28px; + color: #384b65; + margin-bottom: 20px; + text-align: left; + + @media screen and (max-width: 950px) { + display: block; + } + } + &__label { display: flex; - flex-direction: row; padding-left: 50px; margin-bottom: 15px; + @media screen and (max-width: 950px) { + padding: 0; + } + + @media screen and (max-width: 550px) { + + svg { + display: none; + } + } + &__error { - margin: 0; - padding-left: 10px; + margin-left: 10px; color: #eb5757; + text-align: left; + + @media screen and (max-width: 550px) { + margin: 0; + } } } &__inputs-group { - max-height: 35vh; - overflow-y: hidden; padding: 3px 50px 0; + @media screen and (max-width: 950px) { + padding: 0; + } + &__item { display: flex; align-items: center; @@ -395,15 +432,29 @@ export default class AddTeamMemberModal extends Vue { line-height: 25px; padding-left: 50px; text-align: left; + + @media screen and (max-width: 950px) { + padding-left: unset; + } } &__button-container { display: flex; - flex-direction: row; justify-content: space-between; align-items: center; margin-top: 30px; padding: 0 80px 0 50px; + column-gap: 20px; + + @media screen and (max-width: 950px) { + padding: 0; + } + + @media screen and (max-width: 420px) { + flex-direction: column-reverse; + row-gap: 10px; + column-gap: unset; + } } } } @@ -414,6 +465,10 @@ export default class AddTeamMemberModal extends Vue { justify-content: space-between; padding: 0 80px 0 50px; + @media screen and (max-width: 950px) { + padding: 0; + } + &__item { display: flex; align-items: center; @@ -477,12 +532,20 @@ export default class AddTeamMemberModal extends Vue { justify-content: flex-start; padding: 0 50px; align-items: center; - border-bottom-left-radius: 6px; - border-bottom-right-radius: 6px; + border-radius: 0 0 6px 6px; + + @media screen and (max-width: 950px) { + height: unset; + padding: 24px; + } &__image { margin-right: 40px; min-width: 40px; + + @media screen and (max-width: 500px) { + display: none; + } } &__text-area { @@ -493,11 +556,22 @@ export default class AddTeamMemberModal extends Vue { font-family: 'font_medium', sans-serif; font-size: 16px; text-align: left; + + @media screen and (max-width: 500px) { + font-size: 14px; + } } } } - .scrollable { - overflow-y: scroll; + ::v-deep .container { + padding: 0 10px; + } + + @media screen and (max-width: 500px) { + + ::v-deep .container { + padding: 0; + } } diff --git a/web/satellite/src/components/modals/ChangePasswordModal.vue b/web/satellite/src/components/modals/ChangePasswordModal.vue index a705e52d4..0651c8003 100644 --- a/web/satellite/src/components/modals/ChangePasswordModal.vue +++ b/web/satellite/src/components/modals/ChangePasswordModal.vue @@ -12,7 +12,7 @@ @@ -215,17 +215,34 @@ export default class ChangePasswordModal extends Vue { flex-direction: column; padding: 48px; + @media screen and (max-width: 600px) { + padding: 48px 24px; + } + &__row { display: flex; align-items: center; margin-bottom: 20px; + @media screen and (max-width: 600px) { + + svg { + display: none; + } + } + &__label { font-family: 'font_bold', sans-serif; font-size: 32px; line-height: 60px; color: #384b65; margin: 0 0 0 32px; + + @media screen and (max-width: 600px) { + font-size: 24px; + line-height: 28px; + margin: 0; + } } } @@ -235,6 +252,13 @@ export default class ChangePasswordModal extends Vue { align-items: center; margin-top: 32px; column-gap: 20px; + + @media screen and (max-width: 600px) { + flex-direction: column-reverse; + column-gap: unset; + row-gap: 10px; + margin-top: 15px; + } } } @@ -246,4 +270,21 @@ export default class ChangePasswordModal extends Vue { .full-input { margin-bottom: 15px; } + + @media screen and (max-width: 600px) { + + ::v-deep .password-strength-container { + width: unset; + height: unset; + + &__header { + flex-direction: column; + align-items: flex-start; + } + + &__rule-area__rule { + text-align: left; + } + } + } diff --git a/web/satellite/src/components/modals/CreateProjectModal.vue b/web/satellite/src/components/modals/CreateProjectModal.vue index a87942a00..6598cf083 100644 --- a/web/satellite/src/components/modals/CreateProjectModal.vue +++ b/web/satellite/src/components/modals/CreateProjectModal.vue @@ -14,9 +14,9 @@ Create a Project @@ -65,15 +67,29 @@ export default class CreateProjectPromptModal extends Vue { diff --git a/web/satellite/src/components/modals/DisableMFAModal.vue b/web/satellite/src/components/modals/DisableMFAModal.vue index d3aeb188f..ea920bd21 100644 --- a/web/satellite/src/components/modals/DisableMFAModal.vue +++ b/web/satellite/src/components/modals/DisableMFAModal.vue @@ -21,16 +21,15 @@

diff --git a/web/satellite/src/components/modals/EnableMFAModal.vue b/web/satellite/src/components/modals/EnableMFAModal.vue index 8dd991436..39817ed79 100644 --- a/web/satellite/src/components/modals/EnableMFAModal.vue +++ b/web/satellite/src/components/modals/EnableMFAModal.vue @@ -42,7 +42,6 @@