X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FUpsertUser.vue;h=c8df869a49fe6ca4390eaed9bfe04440d5bca3a2;hb=9330b976e02148bb89e11819070d5d818e82e522;hp=2b72ac27583651e6ad4c5e0667f19df5f6f59416;hpb=98f485791e915563996de4f37430b285ffc773ae;p=vchess.git diff --git a/client/src/components/UpsertUser.vue b/client/src/components/UpsertUser.vue index 2b72ac27..c8df869a 100644 --- a/client/src/components/UpsertUser.vue +++ b/client/src/components/UpsertUser.vue @@ -46,6 +46,20 @@ export default { 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)