1
0

Show loading spinner when loading namespaces & lists

This commit is contained in:
kolaente
2020-11-12 20:57:39 +01:00
parent 50b1d378e0
commit 15a2da41ba
5 changed files with 24 additions and 3 deletions

View File

@ -56,7 +56,7 @@
</ul>
</div>
<aside class="menu namespaces-lists">
<aside class="menu namespaces-lists loader-container" :class="{'is-loading': loading}">
<template v-for="n in namespaces">
<div :key="n.id">
<router-link
@ -141,7 +141,7 @@
<script>
import {mapState} from 'vuex'
import {CURRENT_LIST, IS_FULLPAGE, MENU_ACTIVE} from '@/store/mutation-types'
import {CURRENT_LIST, IS_FULLPAGE, LOADING, MENU_ACTIVE} from '@/store/mutation-types'
export default {
name: 'navigation',
@ -153,6 +153,7 @@ export default {
currentList: CURRENT_LIST,
background: 'background',
menuActive: MENU_ACTIVE,
loading: LOADING,
}),
beforeCreate() {
this.$store.dispatch('namespaces/loadNamespaces')