X-Git-Url: https://git.auder.net/pieces/Checkered/cp.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUpsertUser.vue;h=93c1fd4b8a9dcad94ce2107c854161062d6e32e8;hb=3837d4f7885a3c3cdb468da2f3fa3fa1e5a1415a;hp=5ea93a05531f80bfb1cd493768f5bdd16a7a25b9;hpb=c66a829b3770122fe0ff2fb9db8def9635bbc334;p=vchess.git
diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue
index 5ea93a05..93c1fd4b 100644
--- a/client/src/components/UpsertUser.vue
+++ b/client/src/components/UpsertUser.vue
@@ -1,4 +1,3 @@
-// Logic to login, or create / update a user (and also logout)
div
input#modalUser.modal(type="checkbox" @change="trySetEnterTime")
@@ -6,148 +5,169 @@ div
.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
input#username(type="text" v-model="user.name")
fieldset
-
-
+ label(for="useremail") Email
+ input#useremail(type="email" v-model="user.email")
fieldset
-
-
+ label(for="notifyNew") Notify new moves & games
+ input#notifyNew(type="checkbox" v-model="user.notify")
div(v-show="stage=='Login'")
fieldset
-
-
+ label(for="nameOrEmail") Name or Email
+ input#nameOrEmail(type="text" v-model="nameOrEmail")
.button-group
- button#submit(@click="onSubmit()")
+ button#submit(type="button" @click="onSubmit()")
span {{ submitMessage }}
i.material-icons send
button(v-if="stage!='Update'" @click="toggleStage()")
span {{ stage=="Login" ? "Register" : "Login" }}
- button(v-if="stage=='Update'" onClick="location.replace('/logout')")
+ button(v-else @click="doLogout()")
span Logout
#dialog(:style="{display: displayInfo}") {{ infoMsg }}