2021-05-04 15:05:34 +09:00
|
|
|
<template>
|
|
|
|
<FormBase v-if="token">
|
2021-09-30 00:50:45 +09:00
|
|
|
<FormInput v-model="password" type="password">
|
2021-05-04 15:05:34 +09:00
|
|
|
<template #prefix><i class="fas fa-lock"></i></template>
|
|
|
|
<span>{{ $ts.newPassword }}</span>
|
|
|
|
</FormInput>
|
|
|
|
|
|
|
|
<FormButton primary @click="save">{{ $ts.save }}</FormButton>
|
|
|
|
</FormBase>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-09-30 00:50:45 +09:00
|
|
|
import FormLink from '@client/components/debobigego/link.vue';
|
|
|
|
import FormBase from '@client/components/debobigego/base.vue';
|
|
|
|
import FormGroup from '@client/components/debobigego/group.vue';
|
|
|
|
import FormInput from '@client/components/debobigego/input.vue';
|
|
|
|
import FormButton from '@client/components/debobigego/button.vue';
|
2021-05-04 15:05:34 +09:00
|
|
|
import * as os from '@client/os';
|
|
|
|
import * as symbols from '@client/symbols';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
FormBase,
|
|
|
|
FormGroup,
|
|
|
|
FormLink,
|
|
|
|
FormInput,
|
|
|
|
FormButton,
|
|
|
|
},
|
|
|
|
|
|
|
|
props: {
|
|
|
|
token: {
|
|
|
|
type: String,
|
|
|
|
required: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
[symbols.PAGE_INFO]: {
|
|
|
|
title: this.$ts.resetPassword,
|
|
|
|
icon: 'fas fa-lock'
|
|
|
|
},
|
|
|
|
password: '',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
if (this.token == null) {
|
|
|
|
os.popup(import('@client/components/forgot-password.vue'), {}, {}, 'closed');
|
|
|
|
this.$router.push('/');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
async save() {
|
|
|
|
await os.apiWithDialog('reset-password', {
|
|
|
|
token: this.token,
|
|
|
|
password: this.password,
|
|
|
|
});
|
|
|
|
this.$router.push('/');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
</style>
|