Show loading spinner when loading namespaces & lists
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
import NamespaceService from '../../services/namespace'
|
||||
import {setLoading} from '@/store/helper'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
@ -87,6 +88,8 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
loadNamespaces(ctx) {
|
||||
const cancel = setLoading(ctx)
|
||||
|
||||
const namespaceService = new NamespaceService()
|
||||
// We always load all namespaces and filter them on the frontend
|
||||
return namespaceService.getAll({}, {is_archived: true})
|
||||
@ -108,6 +111,9 @@ export default {
|
||||
.catch(e => {
|
||||
return Promise.reject(e)
|
||||
})
|
||||
.finally(() => {
|
||||
cancel()
|
||||
})
|
||||
},
|
||||
loadNamespacesIfFavoritesDontExist(ctx) {
|
||||
// The first namespace should be the one holding all favorites
|
||||
|
Reference in New Issue
Block a user