2022-09-20 19:59:52 +00:00
|
|
|
<template>
|
2022-11-08 16:44:04 +00:00
|
|
|
<div>
|
|
|
|
<h3 class="font-semibold text-2xl text-gray-900">Password</h3>
|
|
|
|
<small class="text-gray-600">Manage your password.</small>
|
|
|
|
|
|
|
|
<form @submit.prevent="update" @keydown="form.onKeydown($event)" class="mt-3">
|
2022-09-20 19:59:52 +00:00
|
|
|
<alert-success class="mb-5" :form="form" :message="$t('password_updated')" />
|
|
|
|
|
|
|
|
<!-- Password -->
|
2022-11-08 16:44:04 +00:00
|
|
|
<text-input native-type="password"
|
2022-09-20 19:59:52 +00:00
|
|
|
name="password" :form="form" :label="$t('password')" :required="true"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- Password Confirmation-->
|
2022-11-08 16:44:04 +00:00
|
|
|
<text-input native-type="password"
|
2022-09-20 19:59:52 +00:00
|
|
|
name="password_confirmation" :form="form" :label="$t('confirm_password')" :required="true"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- Submit Button -->
|
2022-11-08 16:44:04 +00:00
|
|
|
<v-button :loading="form.busy" class="mt-4">Update password</v-button>
|
2022-09-20 19:59:52 +00:00
|
|
|
</form>
|
2022-11-08 16:44:04 +00:00
|
|
|
</div>
|
2022-09-20 19:59:52 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Form from 'vform'
|
2023-01-21 11:57:37 +00:00
|
|
|
import SeoMeta from '../../mixins/seo-meta.js'
|
2022-09-20 19:59:52 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
scrollToTop: false,
|
2022-12-22 10:55:17 +00:00
|
|
|
mixins: [SeoMeta],
|
2022-09-20 19:59:52 +00:00
|
|
|
|
|
|
|
data: () => ({
|
2022-12-22 10:55:17 +00:00
|
|
|
metaTitle: 'Password',
|
2022-09-20 19:59:52 +00:00
|
|
|
form: new Form({
|
|
|
|
password: '',
|
|
|
|
password_confirmation: ''
|
|
|
|
})
|
|
|
|
}),
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
async update () {
|
|
|
|
await this.form.patch('/api/settings/password')
|
|
|
|
|
|
|
|
this.form.reset()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|