mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.6 KiB
139 lines
3.6 KiB
4 years ago
|
<template>
|
||
|
<v-container class="text-center" fluid>
|
||
|
<v-row align="center">
|
||
|
<v-col md="6" offset-md="3">
|
||
|
<v-card v-if="showMsg" class="pa-5 ma-5">
|
||
|
<v-alert type="success" :value="true" outline>
|
||
|
<p class="display-1">
|
||
3 years ago
|
{{ $t('msg.info.passwordRecovery.success') }}
|
||
4 years ago
|
</p>
|
||
|
</v-alert>
|
||
|
</v-card>
|
||
|
|
||
3 years ago
|
<v-card v-else class="pa-5 elevation-10" color="">
|
||
3 years ago
|
<h1>{{ $t('title.resetPassword') }}</h1>
|
||
4 years ago
|
|
||
3 years ago
|
<br />
|
||
3 years ago
|
<p>{{ $t('msg.info.passwordRecovery.message_1') }}</p>
|
||
|
<p>{{ $t('msg.info.passwordRecovery.message_2') }}</p>
|
||
4 years ago
|
|
||
|
<div>
|
||
3 years ago
|
<v-alert v-model="formUtil.formErr" type="error" dismissible>
|
||
|
{{ formUtil.formErrMsg }}
|
||
4 years ago
|
</v-alert>
|
||
|
</div>
|
||
|
|
||
3 years ago
|
<v-form ref="formType" v-model="valid" lazy-validation>
|
||
3 years ago
|
<v-text-field v-model="form.email" label="E-mail" :rules="formRules.email" required />
|
||
4 years ago
|
|
||
3 years ago
|
<v-btn color="primary" large :disabled="!valid" @click="resetPasswordHandle">
|
||
3 years ago
|
{{ $t('activity.sendEmail') }}
|
||
4 years ago
|
</v-btn>
|
||
|
</v-form>
|
||
|
</v-card>
|
||
|
</v-col>
|
||
|
</v-row>
|
||
|
</v-container>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
3 years ago
|
// import VueRecaptcha from 'vue-recaptcha'
|
||
3 years ago
|
import { isEmail } from '@/helpers';
|
||
3 years ago
|
|
||
|
export default {
|
||
|
directives: {},
|
||
|
components: {
|
||
|
// VueRecaptcha
|
||
|
},
|
||
3 years ago
|
validate({ params }) {
|
||
3 years ago
|
return true;
|
||
3 years ago
|
},
|
||
|
props: {},
|
||
|
|
||
3 years ago
|
data() {
|
||
3 years ago
|
return {
|
||
|
recpatcha: false,
|
||
|
showMsg: false,
|
||
|
|
||
|
form: {
|
||
3 years ago
|
email: '',
|
||
4 years ago
|
},
|
||
|
|
||
3 years ago
|
formRules: {
|
||
|
email: [
|
||
3 years ago
|
v => !!v || this.$t('msg.error.signUpRules.emailReqd'),
|
||
3 years ago
|
v => isEmail(v) || this.$t('msg.error.signUpRules.emailInvalid'),
|
||
|
],
|
||
3 years ago
|
},
|
||
|
formUtil: {
|
||
|
formErr: false,
|
||
3 years ago
|
formErrMsg: '',
|
||
3 years ago
|
},
|
||
4 years ago
|
|
||
3 years ago
|
valid: true,
|
||
3 years ago
|
e3: false,
|
||
|
};
|
||
3 years ago
|
},
|
||
3 years ago
|
head() {
|
||
3 years ago
|
return {};
|
||
3 years ago
|
},
|
||
|
computed: {},
|
||
|
watch: {},
|
||
3 years ago
|
created() {},
|
||
|
mounted() {},
|
||
|
beforeDestroy() {},
|
||
3 years ago
|
methods: {
|
||
3 years ago
|
onNormalVerify() {
|
||
3 years ago
|
this.recpatcha = true;
|
||
3 years ago
|
},
|
||
3 years ago
|
async resetPasswordHandle(e) {
|
||
3 years ago
|
if (this.$refs.formType.validate()) {
|
||
3 years ago
|
e.preventDefault();
|
||
3 years ago
|
// await this.$recaptchaLoaded()
|
||
|
// const recaptchaToken = await this.$recaptcha('login')
|
||
3 years ago
|
try {
|
||
3 years ago
|
await this.$api.auth.passwordForgot({
|
||
|
email: this.form.email,
|
||
|
});
|
||
|
this.showMsg = true;
|
||
3 years ago
|
} catch (e) {
|
||
3 years ago
|
const err = await this._extractSdkResponseErrorMsg(e);
|
||
|
this.formUtil.formErr = true;
|
||
|
this.formUtil.formErrMsg = err;
|
||
3 years ago
|
return;
|
||
4 years ago
|
}
|
||
|
}
|
||
3 years ago
|
},
|
||
3 years ago
|
},
|
||
3 years ago
|
beforeCreated() {},
|
||
|
destroy() {},
|
||
|
};
|
||
4 years ago
|
</script>
|
||
|
|
||
3 years ago
|
<style scoped></style>
|
||
4 years ago
|
<!--
|
||
|
/**
|
||
|
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
|
||
|
*
|
||
|
* @author Naveen MR <oof1lab@gmail.com>
|
||
|
* @author Pranav C Balan <pranavxc@gmail.com>
|
||
3 years ago
|
* @author Alejandro Moreno <info@pixplix.com>
|
||
4 years ago
|
*
|
||
|
* @license GNU AGPL version 3 or any later version
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of the
|
||
|
* License, or (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Affero General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
-->
|