<template lang="pug">
div
input#modalUser.modal(type="checkbox" @change="trySetEnterTime")
- div(role="dialog")
+ div(role="dialog" data-checkbox="modalUser")
.card
label.modal-close(for="modalUser")
h3 {{ stage }}
- form#userForm(@submit.prevent="onSubmit()")
+ form#userForm(@submit.prevent="onSubmit()" @keyup.enter="onSubmit")
div(v-show="stage!='Login'")
fieldset
label(for="username") Name
enterTime: Number.MAX_SAFE_INTEGER, //for a basic anti-bot strategy
};
},
+ watch: {
+ nameOrEmail: function(newValue) {
+ if (newValue.indexOf('@') >= 0)
+ {
+ this.user.email = newValue;
+ this.user.name = "";
+ }
+ else
+ {
+ this.user.name = newValue;
+ this.user.email = "";
+ }
+ },
+ },
computed: {
submitMessage: function() {
switch (this.stage)