forked from GarnBarn/garnbarn-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add style to input block * Add base ui for forgot password page * Add method to handler login and register * Add package sha1 to check compromised password * implement forget password * Add redirect after reset password * reabase master * Add the base login and register page * Add method to handler login and register * Add package sha1 to check compromised password * rebase * reverse login * add missing return
- Loading branch information
Showing
4 changed files
with
109 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<template> | ||
<div class="forgotPasswordBox"> | ||
<md-card class="forgotPasswordCard"> | ||
<md-card-media-actions> | ||
<md-card-media> | ||
<img src="@/assets/images/garnbarn-logo.png" class="garnbarnLogo" /> | ||
</md-card-media> | ||
|
||
<md-card-actions> | ||
<h3>Forgot Password</h3> | ||
<div> | ||
<form @submit.prevent="submitForm"> | ||
<div class="input-block"> | ||
<label for="email">Email:</label> | ||
<input id="email" v-model="email" type="email" /> | ||
</div> | ||
<div> | ||
<button type="submit">Submit</button> | ||
</div> | ||
</form> | ||
</div> | ||
</md-card-actions> | ||
</md-card-media-actions> | ||
</md-card> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Vue, Component } from 'vue-property-decorator'; | ||
import firebase from "firebase"; | ||
@Component | ||
export default class ForgotPassword extends Vue { | ||
email = ''; | ||
submitForm(): void { | ||
firebase | ||
.auth() | ||
.sendPasswordResetEmail(this.email) | ||
.then(() => { | ||
alert('Check your registered email to reset the password!') | ||
this.$router.push('/signin') | ||
}).catch((error) => { | ||
alert(error) | ||
}) | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.forgotPasswordBox { | ||
padding-top: 5%; | ||
padding-top: 5%; | ||
} | ||
.forgotPasswordCard { | ||
padding: 10px; | ||
padding-top: 15px; | ||
border-radius: 20px; | ||
background-color: #f9f9f9; | ||
display: inline-block; | ||
vertical-align: top; | ||
overflow: auto; | ||
border: 1px solid rgba(#000, 0.12); | ||
} | ||
.input-block { | ||
margin: 0.5rem; | ||
} | ||
.md-alignment-right { | ||
justify-content: center !important; | ||
} | ||
</style> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters