fix(usernames): various

z-index modals above Resting banner
force reload after verify username
add missing e-mail validation on frontpage
let Yesterdaily modal float behind username modal
This commit is contained in:
Sabe Jones
2018-10-24 18:39:54 -05:00
parent 5cd0f56811
commit 804fe1c6d5
6 changed files with 26 additions and 2 deletions

View File

@@ -11,6 +11,10 @@
}
}
.modal {
z-index: 1350;
}
.modal-dialog {
width: auto;

View File

@@ -156,6 +156,10 @@ export default {
}
});
}, 500),
validateEmail (email) {
let re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
},
// @TODO: Abstract hello in to action or lib
async socialAuth (network) {
try {

View File

@@ -415,6 +415,10 @@ export default {
}
});
}, 500),
validateEmail (email) {
let re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
},
async register () {
// @TODO do not use alert
if (!this.email) {

View File

@@ -206,6 +206,7 @@
await this.$store.dispatch('user:fetch', {forceLoad: true});
this.$root.$emit('habitica::resync-completed');
this.$root.$emit('bv::hide::modal', 'verify-username');
this.$router.go(0);
},
restoreEmptyDisplayName () {
if (this.temporaryDisplayName.length < 1) {

View File

@@ -9,7 +9,7 @@
position: fixed;
right: 10px;
width: 350px;
z-index: 1070; // 1070 is above modal backgrounds
z-index: 1400; // 1400 is above modal backgrounds
&-top-pos {
&-normal {

View File

@@ -22,6 +22,17 @@
button.btn.btn-primary(@click='close()') {{ $t('yesterDailiesCallToAction') }}
</template>
<style lang="scss">
#yesterdaily___BV_modal_outer_ {
.modal-dialog {
-webkit-transform: translate(-5%, calc(50vh - 60%));
-ms-transform: translate(0, 50vh) translate(-5%, -60%);
-o-transform: translate(-5%, calc(50vh - 60%));
transform: translate(0, 50vh) translate(-5%, -60%);
}
}
</style>
<style lang="scss" scoped>
@import '~client/assets/scss/colors.scss';