gancio-upstream/pages/settings.vue

43 lines
1 KiB
Vue
Raw Normal View History

2019-04-26 23:14:43 +02:00
<template lang="pug">
2019-05-30 12:04:14 +02:00
el-dialog(:title="$t('common.settings')" :before-close='close' visible)
//- el-form
//- el-form-item {{$t('settings.change_password')}}
el-divider {{$t('settings.change_password')}}
el-input(v-model='password' type='password')
el-button(slot='append' @click='change' type='success') {{$t('common.send')}}
2019-04-26 23:14:43 +02:00
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
data () {
return {
password: '',
}
},
2019-05-30 12:04:14 +02:00
// computed: mapState(['user']),
// async asyncData ({ $axios, params }) {
// const user = await $axios.$get('/auth/user')
// user.mastodon_auth = ''
// return { user }
// },
2019-04-26 23:14:43 +02:00
methods: {
2019-05-30 12:04:14 +02:00
async change () {
if (!this.password) return
const user = this.user
user.password = this.password
try {
// this.$axios.
// await api.updateUser(user)
} catch (e) {
console.log(e)
}
},
close (done) {
this.$router.back()
done()
2019-04-26 23:14:43 +02:00
}
}
}
</script>