mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-22 06:35:10 +01:00
6ae642245e
* wip * wip * Update well-known.ts * wip * clean up * Update request-reset-password.ts * Update forgot-password.vue * Update reset-password.ts * Update request-reset-password.ts
69 lines
1.4 KiB
Vue
69 lines
1.4 KiB
Vue
<template>
|
|
<FormBase v-if="token">
|
|
<FormInput v-model:value="password" type="password">
|
|
<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';
|
|
import FormLink from '@client/components/form/link.vue';
|
|
import FormBase from '@client/components/form/base.vue';
|
|
import FormGroup from '@client/components/form/group.vue';
|
|
import FormInput from '@client/components/form/input.vue';
|
|
import FormButton from '@client/components/form/button.vue';
|
|
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>
|