Compare commits

...

3 Commits

Author SHA1 Message Date
kolaente 9c1464381c
fix: lint 2021-12-26 19:08:18 +01:00
kolaente fc62016130
fix: replacing list view 2021-12-26 18:49:56 +01:00
kolaente faf8f2b1a5
fix: load the list tasks only after the list itself was loaded 2021-12-26 18:44:50 +01:00
2 changed files with 19 additions and 6 deletions

View File

@ -166,6 +166,11 @@ store.dispatch('labels/loadAllLabels')
padding: $navbar-height + 1.5rem 1.5rem 1rem 1.5rem;
z-index: 2;
// Used to make sure the spinner is always in the middle while loading
> .loader-container {
min-height: calc(100vh - #{$navbar-height + 1.5rem + 1rem});
}
@media screen and (max-width: $tablet) {
margin-left: 0;
padding-top: 1.5rem;

View File

@ -41,17 +41,17 @@
</message>
</transition>
<router-view/>
<router-view v-if="listLoaded"/>
</div>
</template>
<script>
import Message from '@/components/misc/message'
import ListModel from '../../models/list'
import ListService from '../../services/list'
import {CURRENT_LIST} from '../../store/mutation-types'
import {getListView} from '../../helpers/saveListView'
import {saveListToHistory} from '../../modules/listHistory'
import ListModel from '@/models/list'
import ListService from '@/services/list'
import {CURRENT_LIST, BACKGROUND} from '@/store/mutation-types'
import {getListView} from '@/helpers/saveListView'
import {saveListToHistory} from '@/modules/listHistory'
export default {
components: {Message},
@ -144,6 +144,14 @@ export default {
}
console.debug(`Loading list, $route.name = ${this.$route.name}, $route.params =`, this.$route.params, `, listLoaded = ${this.listLoaded}, currentList = `, this.currentList)
// Put set the current list to the one we're about to load so that the title is already shown at the top
this.listLoaded = 0
const listFromStore = this.$store.getters['lists/getListById'](listData.id)
if (listFromStore !== null) {
this.$store.commit(BACKGROUND, null)
this.$store.commit(CURRENT_LIST, listFromStore)
}
// We create an extra list object instead of creating it in this.list because that would trigger a ui update which would result in bad ux.
const list = new ListModel(listData)