fix: directly set arrays, objects and delete directly
Not needed since vue3 uses proxies
This commit is contained in:
parent
2b20f328cb
commit
db49b9b532
33 changed files with 104 additions and 113 deletions
|
@ -187,7 +187,7 @@ export default {
|
||||||
.then(namespaces => {
|
.then(namespaces => {
|
||||||
namespaces.forEach(n => {
|
namespaces.forEach(n => {
|
||||||
if (typeof this.listsVisible[n.id] === 'undefined') {
|
if (typeof this.listsVisible[n.id] === 'undefined') {
|
||||||
this.$set(this.listsVisible, n.id, true)
|
this.listsVisible[n.id] = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -217,7 +217,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleLists(namespaceId) {
|
toggleLists(namespaceId) {
|
||||||
this.$set(this.listsVisible, namespaceId, !this.listsVisible[namespaceId] ?? false)
|
this.listsVisible[namespaceId] = !this.listsVisible[namespaceId] ?? false
|
||||||
},
|
},
|
||||||
updateActiveLists(namespace, activeLists) {
|
updateActiveLists(namespace, activeLists) {
|
||||||
// this is a bit hacky: since we do have to filter out the archived items from the list
|
// this is a bit hacky: since we do have to filter out the archived items from the list
|
||||||
|
@ -242,7 +242,7 @@ export default {
|
||||||
const list = listsActive[e.newIndex]
|
const list = listsActive[e.newIndex]
|
||||||
const listBefore = listsActive[e.newIndex - 1] ?? null
|
const listBefore = listsActive[e.newIndex - 1] ?? null
|
||||||
const listAfter = listsActive[e.newIndex + 1] ?? null
|
const listAfter = listsActive[e.newIndex + 1] ?? null
|
||||||
this.$set(this.listUpdating, list.id, true)
|
this.listUpdating[list.id] = true
|
||||||
|
|
||||||
const position = calculateItemPosition(listBefore !== null ? listBefore.position : null, listAfter !== null ? listAfter.position : null)
|
const position = calculateItemPosition(listBefore !== null ? listBefore.position : null, listAfter !== null ? listAfter.position : null)
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ export default {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.$set(this.listUpdating, list.id, false)
|
this.listUpdating[list.id] = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -284,7 +284,7 @@ export default {
|
||||||
this.closeSearchResults()
|
this.closeSearchResults()
|
||||||
},
|
},
|
||||||
setSelectedObject(object, resetOnly = false) {
|
setSelectedObject(object, resetOnly = false) {
|
||||||
this.$set(this, 'internalValue', object)
|
this.internalValue = object
|
||||||
|
|
||||||
// We assume we're getting an array when multiple is enabled and can therefore leave the query
|
// We assume we're getting an array when multiple is enabled and can therefore leave the query
|
||||||
// value etc as it is
|
// value etc as it is
|
||||||
|
|
|
@ -344,11 +344,11 @@ export default {
|
||||||
this.params.filter_by.forEach((f, i) => {
|
this.params.filter_by.forEach((f, i) => {
|
||||||
if (f === filterName && this.params.filter_comparator[i] === 'greater_equals') {
|
if (f === filterName && this.params.filter_comparator[i] === 'greater_equals') {
|
||||||
foundStart = true
|
foundStart = true
|
||||||
this.$set(this.params.filter_value, i, formatISO(new Date(parts[0])))
|
this.params.filter_value[i] = formatISO(new Date(parts[0]))
|
||||||
}
|
}
|
||||||
if (f === filterName && this.params.filter_comparator[i] === 'less_equals') {
|
if (f === filterName && this.params.filter_comparator[i] === 'less_equals') {
|
||||||
foundEnd = true
|
foundEnd = true
|
||||||
this.$set(this.params.filter_value, i, formatISO(new Date(parts[1])))
|
this.params.filter_value[i] = formatISO(new Date(parts[1]))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -406,7 +406,7 @@ export default {
|
||||||
this.params.filter_by.forEach((f, i) => {
|
this.params.filter_by.forEach((f, i) => {
|
||||||
if (f === filterName) {
|
if (f === filterName) {
|
||||||
found = true
|
found = true
|
||||||
this.$set(this.params.filter_value, i, this.filters[variableName])
|
this.params.filter_value[i] = this.filters[variableName]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (foundDone === false) {
|
if (foundDone === false) {
|
||||||
this.$set(this.filters, 'done', true)
|
this.filters.done = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
prepareRelatedObjectFilter(kind, filterName = null, servicePrefix = null) {
|
prepareRelatedObjectFilter(kind, filterName = null, servicePrefix = null) {
|
||||||
|
@ -482,7 +482,7 @@ export default {
|
||||||
if (typeof this.filters[filterName] !== 'undefined' && this.filters[filterName] !== '') {
|
if (typeof this.filters[filterName] !== 'undefined' && this.filters[filterName] !== '') {
|
||||||
this[`${servicePrefix}Service`].getAll({}, {s: this.filters[filterName]})
|
this[`${servicePrefix}Service`].getAll({}, {s: this.filters[filterName]})
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, kind, r)
|
this[kind] = r
|
||||||
})
|
})
|
||||||
.catch(e => this.$message.error(e))
|
.catch(e => this.$message.error(e))
|
||||||
}
|
}
|
||||||
|
@ -523,7 +523,7 @@ export default {
|
||||||
this.setDateFilter('reminders')
|
this.setDateFilter('reminders')
|
||||||
},
|
},
|
||||||
clear(kind) {
|
clear(kind) {
|
||||||
this.$set(this, `found${kind}`, [])
|
this[`found${kind}`] = []
|
||||||
},
|
},
|
||||||
find(kind, query) {
|
find(kind, query) {
|
||||||
|
|
||||||
|
@ -534,9 +534,9 @@ export default {
|
||||||
this[`${kind}Service`].getAll({}, {s: query})
|
this[`${kind}Service`].getAll({}, {s: query})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
// Filter the results to not include users who are already assigneid
|
// Filter the results to not include users who are already assigneid
|
||||||
this.$set(this, `found${kind}`, differenceWith(response, this[kind], (first, second) => {
|
this[`found${kind}`] = differenceWith(response, this[kind], (first, second) => {
|
||||||
return first.id === second.id
|
return first.id === second.id
|
||||||
}))
|
})
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
@ -564,7 +564,7 @@ export default {
|
||||||
ids.push(u.id)
|
ids.push(u.id)
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$set(this.filters, filterName, ids.join(','))
|
this.filters[filterName] = ids.join(',')
|
||||||
this.setSingleValueFilter(filterName, filterName, '', 'in')
|
this.setSingleValueFilter(filterName, filterName, '', 'in')
|
||||||
},
|
},
|
||||||
findLabels(query) {
|
findLabels(query) {
|
||||||
|
@ -599,7 +599,7 @@ export default {
|
||||||
labelIDs.push(u.id)
|
labelIDs.push(u.id)
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$set(this.filters, 'labels', labelIDs.join(','))
|
this.filters.labels = labelIDs.join(',')
|
||||||
this.setSingleValueFilter('labels', 'labels', '', 'in')
|
this.setSingleValueFilter('labels', 'labels', '', 'in')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
const listService = new ListService()
|
const listService = new ListService()
|
||||||
listService.background(this.list)
|
listService.background(this.list)
|
||||||
.then(b => {
|
.then(b => {
|
||||||
this.$set(this, 'background', b)
|
this.background = b
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
|
|
@ -96,7 +96,7 @@ export default {
|
||||||
loadNotifications() {
|
loadNotifications() {
|
||||||
this.notificationService.getAll()
|
this.notificationService.getAll()
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'allNotifications', r)
|
this.allNotifications = r
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
@ -135,7 +135,7 @@ export default {
|
||||||
n.read = true
|
n.read = true
|
||||||
this.notificationService.update(n)
|
this.notificationService.update(n)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this.allNotifications, index, r)
|
this.allNotifications[index] = r
|
||||||
})
|
})
|
||||||
.catch(e => this.$message.error(e))
|
.catch(e => this.$message.error(e))
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@ export default {
|
||||||
|
|
||||||
return t
|
return t
|
||||||
})
|
})
|
||||||
this.$set(this, 'foundTasks', r)
|
this.foundTasks = r
|
||||||
})
|
})
|
||||||
}, 150)
|
}, 150)
|
||||||
},
|
},
|
||||||
|
@ -329,7 +329,7 @@ export default {
|
||||||
t.title = t.name
|
t.title = t.name
|
||||||
return t
|
return t
|
||||||
})
|
})
|
||||||
this.$set(this, 'foundTeams', r)
|
this.foundTeams = r
|
||||||
})
|
})
|
||||||
}, 150)
|
}, 150)
|
||||||
},
|
},
|
||||||
|
|
|
@ -276,9 +276,9 @@ export default {
|
||||||
this.stuffService
|
this.stuffService
|
||||||
.getAll(this.stuffModel)
|
.getAll(this.stuffModel)
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
this.$set(this, 'sharables', r)
|
this.sharables = r
|
||||||
r.forEach((s) =>
|
r.forEach((s) =>
|
||||||
this.$set(this.selectedRight, s.id, s.right),
|
this.selectedRight[s.id] = s.right,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
@ -362,7 +362,7 @@ export default {
|
||||||
(this.sharables[i].id === this.stuffModel.teamId &&
|
(this.sharables[i].id === this.stuffModel.teamId &&
|
||||||
this.shareType === 'team')
|
this.shareType === 'team')
|
||||||
) {
|
) {
|
||||||
this.$set(this.sharables[i], 'right', r.right)
|
this.sharables[i].right = r.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$message.success({message: this.$t('list.share.userTeam.updatedSuccess', {type: this.shareTypeName})})
|
this.$message.success({message: this.$t('list.share.userTeam.updatedSuccess', {type: this.shareTypeName})})
|
||||||
|
@ -373,21 +373,21 @@ export default {
|
||||||
},
|
},
|
||||||
find(query) {
|
find(query) {
|
||||||
if (query === '') {
|
if (query === '') {
|
||||||
this.$set(this, 'found', [])
|
this.clearAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.searchService
|
this.searchService
|
||||||
.getAll({}, {s: query})
|
.getAll({}, {s: query})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.$set(this, 'found', response)
|
this.found = response
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearAll() {
|
clearAll() {
|
||||||
this.$set(this, 'found', [])
|
this.found = []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ export default {
|
||||||
this.taskService
|
this.taskService
|
||||||
.update(this.taskEditTask)
|
.update(this.taskEditTask)
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
this.$set(this, 'taskEditTask', r)
|
this.taskEditTask = r
|
||||||
this.initTaskFields()
|
this.initTaskFields()
|
||||||
this.$message.success({message: this.$t('task.detail.updateSuccess')})
|
this.$message.success({message: this.$t('task.detail.updateSuccess')})
|
||||||
})
|
})
|
||||||
|
|
|
@ -299,15 +299,15 @@ export default {
|
||||||
this.fullWidth += this.dayWidth
|
this.fullWidth += this.dayWidth
|
||||||
}
|
}
|
||||||
console.debug('prepareGanttDays; years:', years)
|
console.debug('prepareGanttDays; years:', years)
|
||||||
this.$set(this, 'days', years)
|
this.days = years
|
||||||
},
|
},
|
||||||
parseTasks() {
|
parseTasks() {
|
||||||
this.setDates()
|
this.setDates()
|
||||||
this.loadTasks()
|
this.loadTasks()
|
||||||
},
|
},
|
||||||
loadTasks() {
|
loadTasks() {
|
||||||
this.$set(this, 'theTasks', [])
|
this.theTasks = []
|
||||||
this.$set(this, 'tasksWithoutDates', [])
|
this.tasksWithoutDates = []
|
||||||
|
|
||||||
const getAllTasks = (page = 1) => {
|
const getAllTasks = (page = 1) => {
|
||||||
return this.taskCollectionService
|
return this.taskCollectionService
|
||||||
|
@ -392,7 +392,7 @@ export default {
|
||||||
// prevent it from containing outdated Data in the first place.
|
// prevent it from containing outdated Data in the first place.
|
||||||
for (const tt in this.theTasks) {
|
for (const tt in this.theTasks) {
|
||||||
if (this.theTasks[tt].id === this.taskDragged.id) {
|
if (this.theTasks[tt].id === this.taskDragged.id) {
|
||||||
this.$set(this, 'taskDragged', this.theTasks[tt])
|
this.taskDragged = this.theTasks[tt]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -422,11 +422,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
for (const tt in this.theTasks) {
|
for (const tt in this.theTasks) {
|
||||||
if (this.theTasks[tt].id === r.id) {
|
if (this.theTasks[tt].id === r.id) {
|
||||||
this.$set(
|
this.theTasks[tt] = this.addGantAttributes(r)
|
||||||
this.theTasks,
|
|
||||||
tt,
|
|
||||||
this.addGantAttributes(r),
|
|
||||||
)
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
this.taskCommentService
|
this.taskCommentService
|
||||||
.getAll({taskId: this.taskId})
|
.getAll({taskId: this.taskId})
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'comments', r)
|
this.comments = r
|
||||||
this.makeActions()
|
this.makeActions()
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
@ -286,7 +286,7 @@ export default {
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
for (const c in this.comments) {
|
for (const c in this.comments) {
|
||||||
if (this.comments[c].id === this.commentEdit.id) {
|
if (this.comments[c].id === this.commentEdit.id) {
|
||||||
this.$set(this.comments, c, r)
|
this.comments[c] = r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.saved = this.commentEdit.id
|
this.saved = this.commentEdit.id
|
||||||
|
@ -322,12 +322,12 @@ export default {
|
||||||
makeActions() {
|
makeActions() {
|
||||||
if (this.canWrite) {
|
if (this.canWrite) {
|
||||||
this.comments.forEach((c) => {
|
this.comments.forEach((c) => {
|
||||||
this.$set(this.actions, c.id, [
|
this.actions[c.id] = [
|
||||||
{
|
{
|
||||||
action: () => this.toggleDelete(c.id),
|
action: () => this.toggleDelete(c.id),
|
||||||
title: this.$t('misc.delete'),
|
title: this.$t('misc.delete'),
|
||||||
},
|
},
|
||||||
])
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -111,16 +111,16 @@ export default {
|
||||||
this.listUserService.getAll({listId: this.listId}, {s: query})
|
this.listUserService.getAll({listId: this.listId}, {s: query})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
// Filter the results to not include users who are already assigned
|
// Filter the results to not include users who are already assigned
|
||||||
this.$set(this, 'foundUsers', differenceWith(response, this.assignees, (first, second) => {
|
this.foundUsers = differenceWith(response, this.assignees, (first, second) => {
|
||||||
return first.id === second.id
|
return first.id === second.id
|
||||||
}))
|
})
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearAllFoundUsers() {
|
clearAllFoundUsers() {
|
||||||
this.$set(this, 'foundUsers', [])
|
this.foundUsers = []
|
||||||
},
|
},
|
||||||
focus() {
|
focus() {
|
||||||
this.$refs.multiselect.focus()
|
this.$refs.multiselect.focus()
|
||||||
|
|
|
@ -56,14 +56,14 @@ export default {
|
||||||
|
|
||||||
this.listSerivce.getAll({}, {s: query})
|
this.listSerivce.getAll({}, {s: query})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.$set(this, 'foundLists', response)
|
this.foundLists = response
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearAll() {
|
clearAll() {
|
||||||
this.$set(this, 'foundLists', [])
|
this.foundLists = []
|
||||||
},
|
},
|
||||||
select(list) {
|
select(list) {
|
||||||
this.list = list
|
this.list = list
|
||||||
|
|
|
@ -188,7 +188,7 @@ export default {
|
||||||
findTasks(query) {
|
findTasks(query) {
|
||||||
this.taskService.getAll({}, {s: query})
|
this.taskService.getAll({}, {s: query})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.$set(this, 'foundTasks', response)
|
this.foundTasks = response
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
@ -203,7 +203,7 @@ export default {
|
||||||
this.taskRelationService.create(rel)
|
this.taskRelationService.create(rel)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (!this.relatedTasks[this.newTaskRelationKind]) {
|
if (!this.relatedTasks[this.newTaskRelationKind]) {
|
||||||
this.$set(this.relatedTasks, this.newTaskRelationKind, [])
|
this.relatedTasks[this.newTaskRelationKind] = []
|
||||||
}
|
}
|
||||||
this.relatedTasks[this.newTaskRelationKind].push(this.newTaskRelationTask)
|
this.relatedTasks[this.newTaskRelationKind].push(this.newTaskRelationTask)
|
||||||
this.newTaskRelationTask = null
|
this.newTaskRelationTask = null
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
import {findIndexById} from '@/helpers/find'
|
import {findIndexById} from '@/helpers/find'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -10,7 +8,7 @@ export default {
|
||||||
mutations: {
|
mutations: {
|
||||||
set(state, attachments) {
|
set(state, attachments) {
|
||||||
console.debug('Set attachments', attachments)
|
console.debug('Set attachments', attachments)
|
||||||
Vue.set(state, 'attachments', attachments)
|
state.attachments = attachments
|
||||||
},
|
},
|
||||||
add(state, attachment) {
|
add(state, attachment) {
|
||||||
console.debug('Add attachement', attachment)
|
console.debug('Add attachement', attachment)
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
import {CONFIG} from '../mutation-types'
|
import {CONFIG} from '../mutation-types'
|
||||||
import {HTTPFactory} from '@/http-common'
|
import {HTTPFactory} from '@/http-common'
|
||||||
import {objectToCamelCase} from '@/helpers/case'
|
import {objectToCamelCase} from '@/helpers/case'
|
||||||
|
@ -58,7 +56,7 @@ export default {
|
||||||
state.auth.local.enabled = auth.local.enabled
|
state.auth.local.enabled = auth.local.enabled
|
||||||
state.auth.openidConnect.enabled = auth.openidConnect.enabled
|
state.auth.openidConnect.enabled = auth.openidConnect.enabled
|
||||||
state.auth.openidConnect.redirectUrl = auth.openidConnect.redirectUrl
|
state.auth.openidConnect.redirectUrl = auth.openidConnect.redirectUrl
|
||||||
Vue.set(state.auth.openidConnect, 'providers', auth.openidConnect.providers)
|
state.auth.openidConnect.providers = auth.openidConnect.providers
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import Vue from 'vue'
|
|
||||||
import cloneDeep from 'lodash/cloneDeep'
|
import cloneDeep from 'lodash/cloneDeep'
|
||||||
|
|
||||||
import BucketService from '../../services/bucket'
|
import BucketService from '../../services/bucket'
|
||||||
|
@ -34,8 +33,8 @@ export default {
|
||||||
setBuckets(state, buckets) {
|
setBuckets(state, buckets) {
|
||||||
state.buckets = buckets
|
state.buckets = buckets
|
||||||
buckets.forEach(b => {
|
buckets.forEach(b => {
|
||||||
Vue.set(state.taskPagesPerBucket, b.id, 1)
|
state.taskPagesPerBucket[b.id] = 1
|
||||||
Vue.set(state.allTasksLoadedForBucket, b.id, false)
|
state.allTasksLoadedForBucket[b.id] = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addBucket(state, bucket) {
|
addBucket(state, bucket) {
|
||||||
|
@ -51,18 +50,18 @@ export default {
|
||||||
setBucketById(state, bucket) {
|
setBucketById(state, bucket) {
|
||||||
for (const b in state.buckets) {
|
for (const b in state.buckets) {
|
||||||
if (state.buckets[b].id === bucket.id) {
|
if (state.buckets[b].id === bucket.id) {
|
||||||
Vue.set(state.buckets, b, bucket)
|
state.buckets[b] = bucket
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setBucketByIndex(state, {bucketIndex, bucket}) {
|
setBucketByIndex(state, {bucketIndex, bucket}) {
|
||||||
Vue.set(state.buckets, bucketIndex, bucket)
|
state.buckets[bucketIndex] = bucket
|
||||||
},
|
},
|
||||||
setTaskInBucketByIndex(state, {bucketIndex, taskIndex, task}) {
|
setTaskInBucketByIndex(state, {bucketIndex, taskIndex, task}) {
|
||||||
const bucket = state.buckets[bucketIndex]
|
const bucket = state.buckets[bucketIndex]
|
||||||
bucket.tasks[taskIndex] = task
|
bucket.tasks[taskIndex] = task
|
||||||
Vue.set(state.buckets, bucketIndex, bucket)
|
state.buckets[bucketIndex] = bucket
|
||||||
},
|
},
|
||||||
setTaskInBucket(state, task) {
|
setTaskInBucket(state, task) {
|
||||||
// If this gets invoked without any tasks actually loaded, we can save the hassle of finding the task
|
// If this gets invoked without any tasks actually loaded, we can save the hassle of finding the task
|
||||||
|
@ -83,7 +82,8 @@ export default {
|
||||||
addTaskToBucketAndSort(state, task)
|
addTaskToBucketAndSort(state, task)
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.set(state.buckets, b, bucket)
|
state.buckets[b] = bucket
|
||||||
|
|
||||||
found = true
|
found = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ export default {
|
||||||
if (state.buckets[b].tasks[t].id === task.id) {
|
if (state.buckets[b].tasks[t].id === task.id) {
|
||||||
const bucket = state.buckets[b]
|
const bucket = state.buckets[b]
|
||||||
bucket.tasks.splice(t, 1)
|
bucket.tasks.splice(t, 1)
|
||||||
Vue.set(state.buckets, b, bucket)
|
state.buckets[b] = bucket
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,13 +138,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setBucketLoading(state, {bucketId, loading}) {
|
setBucketLoading(state, {bucketId, loading}) {
|
||||||
Vue.set(state.bucketLoading, bucketId, loading)
|
state.bucketLoading[bucketId] = loading
|
||||||
},
|
},
|
||||||
setTasksLoadedForBucketPage(state, {bucketId, page}) {
|
setTasksLoadedForBucketPage(state, {bucketId, page}) {
|
||||||
Vue.set(state.taskPagesPerBucket, bucketId, page)
|
state.taskPagesPerBucket[bucketId] = page
|
||||||
|
|
||||||
},
|
},
|
||||||
setAllTasksLoadedForBucket(state, bucketId) {
|
setAllTasksLoadedForBucket(state, bucketId) {
|
||||||
Vue.set(state.allTasksLoadedForBucket, bucketId, true)
|
state.allTasksLoadedForBucket[bucketId] = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import LabelService from '@/services/label'
|
import LabelService from '@/services/label'
|
||||||
import Vue from 'vue'
|
|
||||||
import {setLoading} from '@/store/helper'
|
import {setLoading} from '@/store/helper'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -12,14 +11,14 @@ export default {
|
||||||
mutations: {
|
mutations: {
|
||||||
setLabels(state, labels) {
|
setLabels(state, labels) {
|
||||||
labels.forEach(l => {
|
labels.forEach(l => {
|
||||||
Vue.set(state.labels, l.id, l)
|
state.labels[l.id] = l
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setLabel(state, label) {
|
setLabel(state, label) {
|
||||||
Vue.set(state.labels, label.id, label)
|
state.labels[label.id] = label
|
||||||
},
|
},
|
||||||
removeLabelById(state, label) {
|
removeLabelById(state, label) {
|
||||||
Vue.delete(state.labels, label.id)
|
delete state.labels[label.id]
|
||||||
},
|
},
|
||||||
setLoaded(state, loaded) {
|
setLoaded(state, loaded) {
|
||||||
state.loaded = loaded
|
state.loaded = loaded
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import Vue from 'vue'
|
|
||||||
import ListService from '@/services/list'
|
import ListService from '@/services/list'
|
||||||
import {setLoading} from '@/store/helper'
|
import {setLoading} from '@/store/helper'
|
||||||
import {removeListFromHistory} from '@/modules/listHistory.ts'
|
import {removeListFromHistory} from '@/modules/listHistory.ts'
|
||||||
|
@ -11,11 +10,11 @@ export default {
|
||||||
state: () => ({}),
|
state: () => ({}),
|
||||||
mutations: {
|
mutations: {
|
||||||
setList(state, list) {
|
setList(state, list) {
|
||||||
Vue.set(state, list.id, list)
|
state[list.id] = list
|
||||||
},
|
},
|
||||||
setLists(state, lists) {
|
setLists(state, lists) {
|
||||||
lists.forEach(l => {
|
lists.forEach(l => {
|
||||||
Vue.set(state, l.id, l)
|
state[l.id] = l
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeListById(state, list) {
|
removeListById(state, list) {
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
import NamespaceService from '../../services/namespace'
|
import NamespaceService from '../../services/namespace'
|
||||||
import {setLoading} from '@/store/helper'
|
import {setLoading} from '@/store/helper'
|
||||||
|
|
||||||
|
@ -19,11 +17,13 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: direct manipulation of the prop
|
||||||
|
// might not be a problem since this is happening in the mutation
|
||||||
if (!namespace.lists || namespace.lists.length === 0) {
|
if (!namespace.lists || namespace.lists.length === 0) {
|
||||||
namespace.lists = state.namespaces[namespaceIndex].lists
|
namespace.lists = state.namespaces[namespaceIndex].lists
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.set(state.namespaces, namespaceIndex, namespace)
|
state.namespaces[namespaceIndex] = namespace
|
||||||
},
|
},
|
||||||
setListInNamespaceById(state, list) {
|
setListInNamespaceById(state, list) {
|
||||||
for (const n in state.namespaces) {
|
for (const n in state.namespaces) {
|
||||||
|
@ -34,7 +34,7 @@ export default {
|
||||||
if (state.namespaces[n].lists[l].id === list.id) {
|
if (state.namespaces[n].lists[l].id === list.id) {
|
||||||
const namespace = state.namespaces[n]
|
const namespace = state.namespaces[n]
|
||||||
namespace.lists[l] = list
|
namespace.lists[l] = list
|
||||||
Vue.set(state.namespaces, n, namespace)
|
state.namespaces[n] = namespace
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ export default {
|
||||||
const list = new ListModel(listData)
|
const list = new ListModel(listData)
|
||||||
this.listService.get(list)
|
this.listService.get(list)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'list', r)
|
this.list = r
|
||||||
this.$store.commit(CURRENT_LIST, r)
|
this.$store.commit(CURRENT_LIST, r)
|
||||||
this.setTitle(this.getListTitle(r))
|
this.setTitle(this.getListTitle(r))
|
||||||
})
|
})
|
||||||
|
|
|
@ -104,8 +104,8 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// This is an extra method to reset a few things when searching to not break loading more photos.
|
// This is an extra method to reset a few things when searching to not break loading more photos.
|
||||||
this.$set(this, 'backgroundSearchResult', [])
|
this.backgroundSearchResult = []
|
||||||
this.$set(this, 'backgroundThumbs', {})
|
this.backgroundThumbs = {}
|
||||||
this.searchBackgrounds()
|
this.searchBackgrounds()
|
||||||
},
|
},
|
||||||
searchBackgrounds(page = 1) {
|
searchBackgrounds(page = 1) {
|
||||||
|
@ -124,7 +124,7 @@ export default {
|
||||||
r.forEach(b => {
|
r.forEach(b => {
|
||||||
this.backgroundService.thumb(b)
|
this.backgroundService.thumb(b)
|
||||||
.then(t => {
|
.then(t => {
|
||||||
this.$set(this.backgroundThumbs, b.id, t)
|
this.backgroundThumbs[b.id] = t
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -106,7 +106,7 @@ export default {
|
||||||
|
|
||||||
this.listService.get(list)
|
this.listService.get(list)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'list', r)
|
this.list = r
|
||||||
this.$store.commit(CURRENT_LIST, r)
|
this.$store.commit(CURRENT_LIST, r)
|
||||||
this.setTitle(this.$t('list.edit.title', {list: this.list.title}))
|
this.setTitle(this.$t('list.edit.title', {list: this.list.title}))
|
||||||
})
|
})
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default {
|
||||||
|
|
||||||
this.listService.get(list)
|
this.listService.get(list)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'list', r)
|
this.list = r
|
||||||
this.$store.commit(CURRENT_LIST, r)
|
this.$store.commit(CURRENT_LIST, r)
|
||||||
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
||||||
this.manageTeamsComponent = 'userTeam'
|
this.manageTeamsComponent = 'userTeam'
|
||||||
|
|
|
@ -398,20 +398,20 @@ export default {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.$set(this.taskUpdating, task.id, false)
|
this.taskUpdating[task.id] = false
|
||||||
this.oneTaskUpdating = false
|
this.oneTaskUpdating = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toggleShowNewTaskInput(bucket) {
|
toggleShowNewTaskInput(bucket) {
|
||||||
this.$set(this.showNewTaskInput, bucket, !this.showNewTaskInput[bucket])
|
this.showNewTaskInput[bucket] = !this.showNewTaskInput[bucket]
|
||||||
},
|
},
|
||||||
addTaskToBucket(bucketId) {
|
addTaskToBucket(bucketId) {
|
||||||
|
|
||||||
if (this.newTaskText === '') {
|
if (this.newTaskText === '') {
|
||||||
this.$set(this.newTaskError, bucketId, true)
|
this.newTaskError[bucketId] = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$set(this.newTaskError, bucketId, false)
|
this.newTaskError[bucketId] = false
|
||||||
|
|
||||||
this.createNewTask(this.newTaskText, bucketId)
|
this.createNewTask(this.newTaskText, bucketId)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
|
@ -557,7 +557,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
collapseBucket(bucket) {
|
collapseBucket(bucket) {
|
||||||
this.$set(this.collapsedBuckets, bucket.id, true)
|
this.collapsedBuckets[bucket.id] = true
|
||||||
saveCollapsedBucketState(this.$route.params.listId, this.collapsedBuckets)
|
saveCollapsedBucketState(this.$route.params.listId, this.collapsedBuckets)
|
||||||
},
|
},
|
||||||
unCollapseBucket(bucket) {
|
unCollapseBucket(bucket) {
|
||||||
|
@ -565,7 +565,7 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$set(this.collapsedBuckets, bucket.id, false)
|
this.collapsedBuckets[bucket.id] = false
|
||||||
saveCollapsedBucketState(this.$route.params.listId, this.collapsedBuckets)
|
saveCollapsedBucketState(this.$route.params.listId, this.collapsedBuckets)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -279,7 +279,7 @@ export default {
|
||||||
updateTasks(updatedTask) {
|
updateTasks(updatedTask) {
|
||||||
for (const t in this.tasks) {
|
for (const t in this.tasks) {
|
||||||
if (this.tasks[t].id === updatedTask.id) {
|
if (this.tasks[t].id === updatedTask.id) {
|
||||||
this.$set(this.tasks, t, updatedTask)
|
this.tasks[t] = updatedTask
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -299,7 +299,7 @@ export default {
|
||||||
|
|
||||||
this.$store.dispatch('tasks/update', newTask)
|
this.$store.dispatch('tasks/update', newTask)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this.tasks, e.newIndex, r)
|
this.tasks[e.newIndex] = r
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
|
|
@ -239,16 +239,16 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
const savedShowColumns = localStorage.getItem('tableViewColumns')
|
const savedShowColumns = localStorage.getItem('tableViewColumns')
|
||||||
if (savedShowColumns !== null) {
|
if (savedShowColumns !== null) {
|
||||||
this.$set(this, 'activeColumns', JSON.parse(savedShowColumns))
|
this.activeColumns = JSON.parse(savedShowColumns)
|
||||||
}
|
}
|
||||||
const savedSortBy = localStorage.getItem('tableViewSortBy')
|
const savedSortBy = localStorage.getItem('tableViewSortBy')
|
||||||
if (savedSortBy !== null) {
|
if (savedSortBy !== null) {
|
||||||
this.$set(this, 'sortBy', JSON.parse(savedSortBy))
|
this.sortBy = JSON.parse(savedSortBy)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$set(this.params, 'filter_by', [])
|
this.params.filter_by = []
|
||||||
this.$set(this.params, 'filter_value', [])
|
this.params.filter_value = []
|
||||||
this.$set(this.params, 'filter_comparator', [])
|
this.params.filter_comparator = []
|
||||||
|
|
||||||
this.initTasks(1)
|
this.initTasks(1)
|
||||||
|
|
||||||
|
@ -286,11 +286,11 @@ export default {
|
||||||
sort(property) {
|
sort(property) {
|
||||||
const order = this.sortBy[property]
|
const order = this.sortBy[property]
|
||||||
if (typeof order === 'undefined' || order === 'none') {
|
if (typeof order === 'undefined' || order === 'none') {
|
||||||
this.$set(this.sortBy, property, 'desc')
|
this.sortBy[property] = 'desc'
|
||||||
} else if (order === 'desc') {
|
} else if (order === 'desc') {
|
||||||
this.$set(this.sortBy, property, 'asc')
|
this.sortBy[property] = 'asc'
|
||||||
} else {
|
} else {
|
||||||
this.$delete(this.sortBy, property)
|
delete this.sortBy[property]
|
||||||
}
|
}
|
||||||
this.initTasks(this.currentPage, this.searchTerm)
|
this.initTasks(this.currentPage, this.searchTerm)
|
||||||
// Save the order to be able to retrieve them later
|
// Save the order to be able to retrieve them later
|
||||||
|
|
|
@ -110,7 +110,7 @@ export default {
|
||||||
const namespace = new NamespaceModel({id: this.$route.params.id})
|
const namespace = new NamespaceModel({id: this.$route.params.id})
|
||||||
this.namespaceService.get(namespace)
|
this.namespaceService.get(namespace)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'namespace', r)
|
this.namespace = r
|
||||||
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
||||||
this.manageTeamsComponent = 'manageSharing'
|
this.manageTeamsComponent = 'manageSharing'
|
||||||
this.manageUsersComponent = 'manageSharing'
|
this.manageUsersComponent = 'manageSharing'
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default {
|
||||||
const namespace = new NamespaceModel({id: this.$route.params.id})
|
const namespace = new NamespaceModel({id: this.$route.params.id})
|
||||||
this.namespaceService.get(namespace)
|
this.namespaceService.get(namespace)
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'namespace', r)
|
this.namespace = r
|
||||||
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
|
||||||
this.manageTeamsComponent = 'manageSharing'
|
this.manageTeamsComponent = 'manageSharing'
|
||||||
this.manageUsersComponent = 'manageSharing'
|
this.manageUsersComponent = 'manageSharing'
|
||||||
|
|
|
@ -206,7 +206,7 @@ export default {
|
||||||
})
|
})
|
||||||
const tasks = r.filter(t => t.dueDate !== null).concat(r.filter(t => t.dueDate === null))
|
const tasks = r.filter(t => t.dueDate !== null).concat(r.filter(t => t.dueDate === null))
|
||||||
|
|
||||||
this.$set(this, 'tasks', tasks)
|
this.tasks = tasks
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
@ -215,7 +215,7 @@ export default {
|
||||||
updateTasks(updatedTask) {
|
updateTasks(updatedTask) {
|
||||||
for (const t in this.tasks) {
|
for (const t in this.tasks) {
|
||||||
if (this.tasks[t].id === updatedTask.id) {
|
if (this.tasks[t].id === updatedTask.id) {
|
||||||
this.$set(this.tasks, t, updatedTask)
|
this.tasks[t] = updatedTask
|
||||||
// Move the task to the end of the done tasks if it is now done
|
// Move the task to the end of the done tasks if it is now done
|
||||||
if (updatedTask.done) {
|
if (updatedTask.done) {
|
||||||
this.tasks.splice(t, 1)
|
this.tasks.splice(t, 1)
|
||||||
|
|
|
@ -561,7 +561,7 @@ export default {
|
||||||
this.taskId = Number(this.$route.params.id)
|
this.taskId = Number(this.$route.params.id)
|
||||||
this.taskService.get({id: this.taskId})
|
this.taskService.get({id: this.taskId})
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'task', r)
|
this.task = r
|
||||||
this.$store.commit('attachments/set', r.attachments)
|
this.$store.commit('attachments/set', r.attachments)
|
||||||
this.taskColor = this.task.hexColor
|
this.taskColor = this.task.hexColor
|
||||||
this.setActiveFields()
|
this.setActiveFields()
|
||||||
|
|
|
@ -232,7 +232,7 @@ export default {
|
||||||
this.teamService
|
this.teamService
|
||||||
.get(this.team)
|
.get(this.team)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.$set(this, 'team', response)
|
this.team = response
|
||||||
this.title = this.$t('team.edit.title', {team: this.team.name})
|
this.title = this.$t('team.edit.title', {team: this.team.name})
|
||||||
this.setTitle(this.title)
|
this.setTitle(this.title)
|
||||||
})
|
})
|
||||||
|
@ -305,7 +305,7 @@ export default {
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
for (const tm in this.team.members) {
|
for (const tm in this.team.members) {
|
||||||
if (this.team.members[tm].id === member.id) {
|
if (this.team.members[tm].id === member.id) {
|
||||||
this.$set(this.team.members[tm], 'admin', r.admin)
|
this.team.members[tm].admin = r.admin
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,21 +321,21 @@ export default {
|
||||||
},
|
},
|
||||||
findUser(query) {
|
findUser(query) {
|
||||||
if (query === '') {
|
if (query === '') {
|
||||||
this.$set(this, 'foundUsers', [])
|
this.clearAll()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.userService
|
this.userService
|
||||||
.getAll({}, {s: query})
|
.getAll({}, {s: query})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.$set(this, 'foundUsers', response)
|
this.foundUsers = response
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearAll() {
|
clearAll() {
|
||||||
this.$set(this, 'foundUsers', [])
|
this.foundUsers = []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
loadTeams() {
|
loadTeams() {
|
||||||
this.teamService.getAll()
|
this.teamService.getAll()
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.$set(this, 'teams', response)
|
this.teams = response
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.$message.error(e)
|
this.$message.error(e)
|
||||||
|
|
|
@ -409,7 +409,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.totpService.get()
|
this.totpService.get()
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$set(this, 'totp', r)
|
this.totp = r
|
||||||
this.totpSetQrCode()
|
this.totpSetQrCode()
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
@ -433,7 +433,7 @@ export default {
|
||||||
this.totpService.enroll()
|
this.totpService.enroll()
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.totpEnrolled = true
|
this.totpEnrolled = true
|
||||||
this.$set(this, 'totp', r)
|
this.totp = r
|
||||||
this.totpSetQrCode()
|
this.totpSetQrCode()
|
||||||
})
|
})
|
||||||
.catch(e => this.$message.error(e))
|
.catch(e => this.$message.error(e))
|
||||||
|
@ -441,7 +441,7 @@ export default {
|
||||||
totpConfirm() {
|
totpConfirm() {
|
||||||
this.totpService.enable({passcode: this.totpConfirmPasscode})
|
this.totpService.enable({passcode: this.totpConfirmPasscode})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$set(this.totp, 'enabled', true)
|
this.totp.enabled = true
|
||||||
this.$message.success({message: this.$t('user.settings.totp.confirmSuccess')})
|
this.$message.success({message: this.$t('user.settings.totp.confirmSuccess')})
|
||||||
})
|
})
|
||||||
.catch(e => this.$message.error(e))
|
.catch(e => this.$message.error(e))
|
||||||
|
@ -450,7 +450,7 @@ export default {
|
||||||
this.totpService.disable({password: this.totpDisablePassword})
|
this.totpService.disable({password: this.totpDisablePassword})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.totpEnrolled = false
|
this.totpEnrolled = false
|
||||||
this.$set(this, 'totp', new TotpModel())
|
this.totp = new TotpModel()
|
||||||
this.$message.success({message: this.$t('user.settings.totp.disableSuccess')})
|
this.$message.success({message: this.$t('user.settings.totp.disableSuccess')})
|
||||||
})
|
})
|
||||||
.catch(e => this.$message.error(e))
|
.catch(e => this.$message.error(e))
|
||||||
|
|
Loading…
Reference in a new issue