X-Git-Url: https://git.auder.net/doc/index.css?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUpsertUser.vue;h=e5b8c79bc3351ec8e522dfcdc5a41939409b40a4;hb=7f1df0d95d2190fd69ef7c58f5a795aef3f92869;hp=86f8558d8847d18b1219247fdf621a7131b3837c;hpb=f05815d7da84284bd9d7c1ce5b808acd675f2a3e;p=vchess.git
diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue
index 86f8558d..e5b8c79b 100644
--- a/client/src/components/UpsertUser.vue
+++ b/client/src/components/UpsertUser.vue
@@ -1,56 +1,97 @@
-// Logic to login, or create / update a user (and also logout)
div
- input#modalUser.modal(type="checkbox" @change="trySetEnterTime")
- div(role="dialog")
+ input#modalUser.modal(
+ type="checkbox"
+ @change="trySetEnterTime($event)"
+ )
+ #upsertDiv(
+ role="dialog"
+ data-checkbox="modalUser"
+ )
.card
label.modal-close(for="modalUser")
- h3 {{ stage }}
- form#userForm(@submit.prevent="onSubmit()")
+ h3.section
+ span.title {{ st.tr[stage] }}
+ | (
+ span.link(
+ v-if="stage!='Update'"
+ @click="toggleStage()"
+ )
+ | {{ st.tr[stage=="Login" ? "Register" : "Login"] }}
+ span.link(
+ v-else
+ @click="doLogout()"
+ )
+ | {{ st.tr["Logout"] }}
+ img(src="/images/icons/rightArrow.svg")
+ | )
+ div(@keyup.enter="onSubmit()")
div(v-show="stage!='Login'")
fieldset
- label(for="username") Name
- input#username(type="text" v-model="user.name")
+ label(for="u_username") {{ st.tr["User name"] }}
+ input#u_username(
+ type="text"
+ v-model="user.name"
+ )
fieldset
-
-
+ label(for="u_useremail") {{ st.tr["Email"] }}
+ input#u_useremail(
+ type="email"
+ v-model="user.email"
+ )
fieldset
-
-
+ label(for="notifyNew") {{ st.tr["Notifications by email"] }}
+ input#notifyNew(
+ type="checkbox"
+ v-model="user.notify"
+ )
div(v-show="stage=='Login'")
fieldset
-
-
- .button-group
- button#submit(@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')")
- span Logout
- #dialog(:style="{display: displayInfo}") {{ infoMsg }}
+ label(for="nameOrEmail") {{ st.tr["Name or Email"] }}
+ input#nameOrEmail(
+ type="text"
+ v-model="nameOrEmail"
+ )
+ button#submitBtn(@click="onSubmit()")
+ | {{ st.tr[submitMessage] }}
+ #dialog.text-center {{ st.tr[infoMsg] }}
+
+