gancio/pages/about.vue

29 lines
789 B
Vue
Raw Normal View History

2019-04-05 00:10:19 +02:00
<template lang="pug">
2019-10-22 23:49:21 +02:00
el-main
2020-01-15 23:31:28 +01:00
.edit(v-if='$auth.user && $auth.user.is_admin')
Editor(v-if='$auth.user && $auth.user.is_admin'
v-model='about')
el-button.float-right(type='success' plain icon='el-icon-check'
@click='setSetting({key: "about", value: about})') {{$t('common.save')}}
div(v-else v-html='about')
2019-05-30 12:04:14 +02:00
</template>
2019-08-07 01:26:14 +02:00
<script>
2020-01-15 23:31:28 +01:00
import Editor from '@/components/Editor'
import { mapState, mapActions } from 'vuex'
2019-08-07 01:26:14 +02:00
export default {
2020-01-15 23:31:28 +01:00
components: { Editor },
data ({ $store }) {
return {
about: $store.state.settings.about || this.$t('about')
}
},
2019-08-07 01:26:14 +02:00
computed: mapState(['settings']),
2020-01-15 23:31:28 +01:00
methods: mapActions(['setSetting']),
2019-08-07 01:26:14 +02:00
head () {
return {
title: `${this.settings.title} - ${this.$t('common.info')}`
}
}
}
</script>