[Client] Make possible to change password in mobile
モバイル版からパスワードの変更を行えるように
This commit is contained in:
		@@ -1,47 +0,0 @@
 | 
			
		||||
<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>
 | 
			
		||||
@@ -214,7 +214,7 @@
 | 
			
		||||
		<ui-card class="password" v-show="page == 'security'">
 | 
			
		||||
			<div slot="title">%fa:unlock-alt% %i18n:@password%</div>
 | 
			
		||||
			<section>
 | 
			
		||||
				<x-password/>
 | 
			
		||||
				<mk-password-settings/>
 | 
			
		||||
			</section>
 | 
			
		||||
		</ui-card>
 | 
			
		||||
 | 
			
		||||
@@ -286,7 +286,6 @@
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import Vue from 'vue';
 | 
			
		||||
import XPassword from './settings.password.vue';
 | 
			
		||||
import X2fa from './settings.2fa.vue';
 | 
			
		||||
import XApps from './settings.apps.vue';
 | 
			
		||||
import XSignins from './settings.signins.vue';
 | 
			
		||||
@@ -296,7 +295,6 @@ import checkForUpdate from '../../../common/scripts/check-for-update';
 | 
			
		||||
 | 
			
		||||
export default Vue.extend({
 | 
			
		||||
	components: {
 | 
			
		||||
		XPassword,
 | 
			
		||||
		X2fa,
 | 
			
		||||
		XApps,
 | 
			
		||||
		XSignins,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user