X-Git-Url: https://git.auder.net/images/pieces/Cwda/bt.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUpsertUser.vue;h=50b702da5e9d6156bedd06d6fc293029bc96ba62;hb=5b3dc10e34bf5bf970494be6ee1fa0b67e2ca88c;hp=46f3bfe8df9e0237f4703c0b63e2ea7bb08a7ef8;hpb=a7f9f050e44080e8caf888e3b230660abffa2400;p=vchess.git
diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue
index 46f3bfe8..50b702da 100644
--- a/client/src/components/UpsertUser.vue
+++ b/client/src/components/UpsertUser.vue
@@ -1,34 +1,58 @@
div
- input#modalUser.modal(type="checkbox" @change="trySetEnterTime")
- div(role="dialog")
+ input#modalUser.modal(
+ type="checkbox"
+ @change="trySetEnterTime($event)"
+ )
+ div(
+ role="dialog"
+ data-checkbox="modalUser"
+ )
.card
label.modal-close(for="modalUser")
- h3 {{ stage }}
- form#userForm(@submit.prevent="onSubmit()")
+ h3.section {{ st.tr[stage] }}
+ div(@keyup.enter="onSubmit()")
div(v-show="stage!='Login'")
fieldset
- label(for="username") Name
- input#username(type="text" v-model="user.name")
+ label(for="username") {{ st.tr["User name"] }}
+ input#username(
+ type="text"
+ v-model="st.user.name"
+ )
fieldset
- label(for="useremail") Email
- input#useremail(type="email" v-model="user.email")
+ label(for="useremail") {{ st.tr["Email"] }}
+ input#useremail(
+ type="email"
+ v-model="st.user.email"
+ )
fieldset
- label(for="notifyNew") Notify new moves & games
- input#notifyNew(type="checkbox" v-model="user.notify")
+ label(for="notifyNew") {{ st.tr["Notifications by email"] }}
+ input#notifyNew(
+ type="checkbox"
+ v-model="st.user.notify"
+ )
div(v-show="stage=='Login'")
fieldset
- label(for="nameOrEmail") Name or Email
- input#nameOrEmail(type="text" v-model="nameOrEmail")
+ label(for="nameOrEmail") {{ st.tr["Name or Email"] }}
+ input#nameOrEmail(
+ type="text"
+ v-model="nameOrEmail"
+ )
.button-group
- 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-else onClick="location.replace('/logout')")
- span Logout
- #dialog(:style="{display: displayInfo}") {{ infoMsg }}
+ button(@click="onSubmit()")
+ span {{ st.tr[submitMessage] }}
+ button(
+ v-if="stage!='Update'"
+ type="button"
+ @click="toggleStage()"
+ )
+ span {{ st.tr[stage=="Login" ? "Register" : "Login"] }}
+ button(
+ v-else type="button"
+ @click="doLogout()"
+ )
+ span {{ st.tr["Logout"] }}
+ #dialog.text-center {{ st.tr[infoMsg] }}
+
+