1
0

Cleanup code & make sure it has a common code style

This commit is contained in:
kolaente
2020-09-05 22:35:52 +02:00
parent 4a8b15e7be
commit a8a7f70a3c
132 changed files with 6821 additions and 6595 deletions

View File

@ -6,13 +6,24 @@
<div class="field">
<label class="label" for="email">E-mail address</label>
<div class="control">
<input v-focus type="email" class="input" id="email" name="email" placeholder="e.g. frederic@vikunja.io" v-model="passwordReset.email" required/>
<input
class="input"
id="email"
name="email"
placeholder="e.g. frederic@vikunja.io"
required
type="email"
v-focus
v-model="passwordReset.email"/>
</div>
</div>
<div class="field is-grouped">
<div class="control">
<button type="submit" class="button is-primary" v-bind:class="{ 'is-loading': passwordResetService.loading}">Send me a password reset link</button>
<button class="button is-primary" type="submit"
v-bind:class="{ 'is-loading': passwordResetService.loading}">Send me a password reset
link
</button>
<router-link :to="{ name: 'user.login' }" class="button">Login</router-link>
</div>
</div>
@ -20,7 +31,7 @@
{{ errorMsg }}
</div>
</form>
<div v-if="isSuccess" class="has-text-centered">
<div class="has-text-centered" v-if="isSuccess">
<div class="notification is-success">
Check your inbox! You should have a mail with instructions on how to reset your password.
</div>
@ -32,46 +43,46 @@
</template>
<script>
import PasswordResetModel from '../../models/passwordReset'
import PasswordResetService from '../../services/passwordReset'
import Legal from '../../components/misc/legal'
import PasswordResetModel from '../../models/passwordReset'
import PasswordResetService from '../../services/passwordReset'
import Legal from '../../components/misc/legal'
export default {
components: {
Legal,
},
data() {
return {
passwordResetService: PasswordResetService,
passwordReset: PasswordResetModel,
errorMsg: '',
isSuccess: false
}
},
created() {
this.passwordResetService = new PasswordResetService()
this.passwordReset = new PasswordResetModel()
},
mounted() {
this.setTitle('Reset your password')
},
methods: {
submit() {
this.errorMsg = ''
this.passwordResetService.requestResetPassword(this.passwordReset)
.then(() => {
this.isSuccess = true
})
.catch(e => {
this.errorMsg = e.response.data.message
})
},
export default {
components: {
Legal,
},
data() {
return {
passwordResetService: PasswordResetService,
passwordReset: PasswordResetModel,
errorMsg: '',
isSuccess: false,
}
}
},
created() {
this.passwordResetService = new PasswordResetService()
this.passwordReset = new PasswordResetModel()
},
mounted() {
this.setTitle('Reset your password')
},
methods: {
submit() {
this.errorMsg = ''
this.passwordResetService.requestResetPassword(this.passwordReset)
.then(() => {
this.isSuccess = true
})
.catch(e => {
this.errorMsg = e.response.data.message
})
},
},
}
</script>
<style scoped>
.button {
margin: 0 0.4em 0 0;
}
.button {
margin: 0 0.4em 0 0;
}
</style>