1
0

Only show loading spinner over menu when loading namespaces

This commit is contained in:
kolaente
2020-12-23 21:26:43 +01:00
parent ad33458a80
commit f9d295fc67
3 changed files with 17 additions and 6 deletions

View File

@ -7,6 +7,7 @@ export default {
namespaced: true,
state: () => ({
namespaces: [],
loading: false,
}),
mutations: {
namespaces(state, namespaces) {
@ -88,7 +89,9 @@ export default {
},
actions: {
loadNamespaces(ctx) {
const cancel = setLoading(ctx)
const cancel = setLoading(ctx, status => {
ctx.commit('loading', status, {root: true})
})
const namespaceService = new NamespaceService()
// We always load all namespaces and filter them on the frontend