mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-22 10:38:16 +09:00
fef4f7fce8
* wip
* wip
* Clean up
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* 🎨
* wip
* wip
48 lines
1.0 KiB
Vue
48 lines
1.0 KiB
Vue
<template>
|
|
<div>
|
|
<ui-button @click="reset">%i18n:@reset%</ui-button>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue';
|
|
|
|
export default Vue.extend({
|
|
methods: {
|
|
reset() {
|
|
(this as any).apis.input({
|
|
title: '%i18n:@enter-current-password%',
|
|
type: 'password'
|
|
}).then(currentPassword => {
|
|
(this as any).apis.input({
|
|
title: '%i18n:@enter-new-password%',
|
|
type: 'password'
|
|
}).then(newPassword => {
|
|
(this as any).apis.input({
|
|
title: '%i18n:@enter-new-password-again%',
|
|
type: 'password'
|
|
}).then(newPassword2 => {
|
|
if (newPassword !== newPassword2) {
|
|
(this as any).apis.dialog({
|
|
title: null,
|
|
text: '%i18n:@not-match%',
|
|
actions: [{
|
|
text: 'OK'
|
|
}]
|
|
});
|
|
return;
|
|
}
|
|
(this as any).api('i/change_password', {
|
|
currentPasword: currentPassword,
|
|
newPassword: newPassword
|
|
}).then(() => {
|
|
(this as any).apis.notify('%i18n:@changed%');
|
|
});
|
|
});
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
</script>
|