projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finished. Now some last styling
[vchess.git]
/
client
/
src
/
components
/
UpsertUser.vue
diff --git
a/client/src/components/UpsertUser.vue
b/client/src/components/UpsertUser.vue
index
8d0b736
..
6461657
100644
(file)
--- a/
client/src/components/UpsertUser.vue
+++ b/
client/src/components/UpsertUser.vue
@@
-1,11
+1,11
@@
<template lang="pug">
div
input#modalUser.modal(type="checkbox" @change="trySetEnterTime")
<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 }}
.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
div(v-show="stage!='Login'")
fieldset
label(for="username") Name
@@
-46,6
+46,20
@@
export default {
enterTime: Number.MAX_SAFE_INTEGER, //for a basic anti-bot strategy
};
},
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)
computed: {
submitMessage: function() {
switch (this.stage)
@@
-149,6
+163,8
@@
export default {
this.user.name = "";
this.user.email = "";
this.user.notify = false;
this.user.name = "";
this.user.email = "";
this.user.notify = false;
+ delete localStorage["myid"];
+ delete localStorage["myname"];
}
);
},
}
);
},