mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
display a message when a new about is saved
This commit is contained in:
parent
65d7b0dccb
commit
128f774098
1 changed files with 14 additions and 2 deletions
|
@ -4,12 +4,14 @@
|
||||||
Editor(v-if='$auth.user && $auth.user.is_admin'
|
Editor(v-if='$auth.user && $auth.user.is_admin'
|
||||||
v-model='about')
|
v-model='about')
|
||||||
el-button.float-right(type='success' plain icon='el-icon-check'
|
el-button.float-right(type='success' plain icon='el-icon-check'
|
||||||
@click='setSetting({key: "about", value: about})') {{$t('common.save')}}
|
@click='save') {{$t('common.save')}}
|
||||||
div(v-else v-html='about')
|
div(v-else v-html='about')
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Editor from '@/components/Editor'
|
import Editor from '@/components/Editor'
|
||||||
import { mapState, mapActions } from 'vuex'
|
import { mapState, mapActions } from 'vuex'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Editor },
|
components: { Editor },
|
||||||
data ({ $store }) {
|
data ({ $store }) {
|
||||||
|
@ -18,7 +20,17 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: mapState(['settings']),
|
computed: mapState(['settings']),
|
||||||
methods: mapActions(['setSetting']),
|
methods: {
|
||||||
|
...mapActions(['setSetting']),
|
||||||
|
save () {
|
||||||
|
Message({
|
||||||
|
showClose: true,
|
||||||
|
type: 'success',
|
||||||
|
message: this.$t('common.done')
|
||||||
|
})
|
||||||
|
this.setSetting({ key: 'about', value: this.about })
|
||||||
|
}
|
||||||
|
},
|
||||||
head () {
|
head () {
|
||||||
return {
|
return {
|
||||||
title: `${this.settings.title} - ${this.$t('common.info')}`
|
title: `${this.settings.title} - ${this.$t('common.info')}`
|
||||||
|
|
Loading…
Reference in a new issue