Merge branch 'main' into fix/vue3
# Conflicts: # src/views/list/settings/edit.vue
This commit is contained in:
@ -71,7 +71,6 @@ import AsyncEditor from '@/components/input/AsyncEditor'
|
||||
import ListModel from '@/models/list'
|
||||
import ListService from '@/services/list'
|
||||
import ColorPicker from '@/components/input/colorPicker.vue'
|
||||
import ListDuplicateService from '@/services/listDuplicateService'
|
||||
import {CURRENT_LIST} from '@/store/mutation-types'
|
||||
import CreateEdit from '@/components/misc/create-edit.vue'
|
||||
|
||||
@ -81,7 +80,6 @@ export default {
|
||||
return {
|
||||
list: ListModel,
|
||||
listService: new ListService(),
|
||||
listDuplicateService: new ListDuplicateService(),
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -101,9 +99,7 @@ export default {
|
||||
|
||||
this.listService.get(list)
|
||||
.then(r => {
|
||||
this.list = r
|
||||
this.$store.commit(CURRENT_LIST, r)
|
||||
this.setTitle(this.$t('list.edit.title', {list: this.list.title}))
|
||||
this.list = { ...r }
|
||||
})
|
||||
.catch(e => {
|
||||
this.$message.error(e)
|
||||
@ -112,6 +108,8 @@ export default {
|
||||
save() {
|
||||
this.$store.dispatch('lists/updateList', this.list)
|
||||
.then(() => {
|
||||
this.$store.commit(CURRENT_LIST, this.list)
|
||||
this.setTitle(this.$t('list.edit.title', {list: this.list.title}))
|
||||
this.$message.success({message: this.$t('list.edit.success')})
|
||||
this.$router.back()
|
||||
})
|
||||
|
Reference in New Issue
Block a user