adding latest

This commit is contained in:
2020-03-16 02:41:23 +00:00
parent 0f33f70ee4
commit 3334659bec
7 changed files with 153 additions and 54 deletions

View File

@@ -1,28 +1,34 @@
<template>
<div class="sign-in">
<h1>Sign In</h1>
<v-form v-model="valid" ref="form" lazy-validation>
<v-text-field
v-model="username"
:rules="emailRules"
label="Email Address"
required
></v-text-field>
<v-text-field
v-model="password"
:append-icon="passwordVisible ? 'mdi-eye' : 'mdi-eye-off'"
:rules="[passwordRules.required, passwordRules.min]"
:type="passwordVisible ? 'text' : 'password'"
name="password"
label="Password"
hint="At least 8 characters"
counter
@click:append="passwordVisible = !passwordVisible"
required
></v-text-field>
<v-btn :disabled="!valid" @click="submit">Submit</v-btn>
</v-form>
</div>
<v-container class="grey lighten-5">
<v-row class="mb-6" justify="center" no-gutters>
<v-col lg="2">
<div class="sign-in">
<h1>Sign In</h1>
<v-form v-model="valid" ref="form" lazy-validation>
<v-text-field
v-model="username"
:rules="emailRules"
label="Email Address"
required
></v-text-field>
<v-text-field
v-model="password"
:append-icon="passwordVisible ? 'mdi-eye' : 'mdi-eye-off'"
:rules="[passwordRules.required, passwordRules.min]"
:type="passwordVisible ? 'text' : 'password'"
name="password"
label="Password"
hint="At least 8 characters"
counter
@click:append="passwordVisible = !passwordVisible"
required
></v-text-field>
<v-btn :disabled="!valid" @click="submit">Submit</v-btn>
</v-form>
</div>
</v-col>
</v-row>
</v-container>
</template>
<script>
@@ -53,12 +59,13 @@ export default {
}
},
methods: {
submit() {
async submit() {
if (this.$refs.form.validate()) {
console.log(
`SIGN IN username: ${this.username}, password: ${this.password}`
);
signIn(this.username, this.password);
await signIn(this.username, this.password);
console.log("Signed in");
}
}
}

View File

@@ -22,7 +22,7 @@
required
>
</v-text-field>
<v-btn :disabled="!valid" @click="submit"></v-btn>
<v-btn :disabled="!valid" @click="submit">Submit</v-btn>
</v-form>
</div>
</template>
@@ -61,6 +61,7 @@ export default {
`SIGN UP username: ${this.username}, password: ${this.password}, email: ${this.username}`
);
signUp(this.username, this.password);
console.log("finished");
}
}
}

View File

@@ -46,15 +46,15 @@ export default {
}
},
methods: {
submit() {
async submit() {
if (this.$refs.form.validate()) {
console.log(`CONFIRM username: ${this.username}, code: ${this.code}`);
confirmSignUp(this.username, this.code)
await confirmSignUp(this.username, this.code);
}
},
resend() {
console.log(`RESEND username: ${this.username}`);
resendSignUp(this.username)
resendSignUp(this.username);
}
}
};