From 588385bf5a254b1e24fa04316930c66161a41cb1 Mon Sep 17 00:00:00 2001 From: Brandon Tripp Date: Sat, 8 May 2021 17:53:16 -0600 Subject: [PATCH] Implement the ShowPassword component in the registration slider. --- .../Registration/RegistrationSlideCreate.vue | 105 +++++++++++++++--- 1 file changed, 90 insertions(+), 15 deletions(-) diff --git a/webapp/components/Registration/RegistrationSlideCreate.vue b/webapp/components/Registration/RegistrationSlideCreate.vue index 7ac235994..3343876b9 100644 --- a/webapp/components/Registration/RegistrationSlideCreate.vue +++ b/webapp/components/Registration/RegistrationSlideCreate.vue @@ -40,24 +40,33 @@ :label="$t('settings.data.labelName')" :placeholder="$t('settings.data.namePlaceholder')" /> - - + +
+ + +
+ +
+ + +
- { + this.$refs.password.$el.children[1].children[0].focus() + this.$emit('focus') + }) + } + else { + this.showPasswordConfirm = !this.showPasswordConfirm + this.$nextTick(() => { + this.$refs.confirmPassword.$el.children[1].children[0].focus() + this.$emit('focus') + }) + } + }, }, } @@ -259,4 +294,44 @@ export default { .password-strength { margin-bottom: 14px; } + +.password-wrapper { + display: flex; + width: 100%; + align-items: center; + padding: $input-padding-vertical $space-x-small; + padding-left: 0; + padding-right: 0; + height: $input-height; + margin-bottom: 10px; + margin-bottom: 16px; + + color: $text-color-base; + background: $background-color-disabled; + + border: $input-border-size solid $border-color-softer; + border-left: none; + border-radius: $border-radius-base; + outline: none; + transition: all $duration-short $ease-out; + + &:focus-within { + background-color: $background-color-base; + border: $input-border-size solid $border-color-active; + + .toggle-icon { + color: $text-color-base; + } + } + + .password-field { + position: relative; + padding-top: 16px; + border: none; + border-style: none; + appearance: none; + margin-left: 0; + width: 100%; + } +}