22.02 Add a Loading View for the Todo Page
This commit is contained in:
parent
f6de60571b
commit
13559be43a
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<div class="q-pa-md absolute full-width full-height column">
|
<div class="q-pa-md absolute full-width full-height column">
|
||||||
|
|
||||||
|
<template v-if="tasksDownloaded">
|
||||||
<div class="row q-mb-lg">
|
<div class="row q-mb-lg">
|
||||||
<search />
|
<search />
|
||||||
<sort />
|
<sort />
|
||||||
@ -36,6 +37,11 @@
|
|||||||
icon="add"
|
icon="add"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<p>Loading...</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -73,7 +79,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters('tasks', ['tasksTodo', 'tasksCompleted']),
|
...mapGetters('tasks', ['tasksTodo', 'tasksCompleted']),
|
||||||
...mapGetters('settings', ['settings']),
|
...mapGetters('settings', ['settings']),
|
||||||
...mapState('tasks', ['search'])
|
...mapState('tasks', ['search', 'tasksDownloaded'])
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.$root.$on('showAddTask', () => {
|
this.$root.$on('showAddTask', () => {
|
||||||
|
@ -26,7 +26,8 @@ const state = {
|
|||||||
*/
|
*/
|
||||||
},
|
},
|
||||||
search: '',
|
search: '',
|
||||||
sort: 'name'
|
sort: 'name',
|
||||||
|
tasksDownloaded: false
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -44,7 +45,11 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
setSort (state, value) {
|
setSort (state, value) {
|
||||||
state.sort = value
|
state.sort = value
|
||||||
}
|
},
|
||||||
|
setTasksDownloaded (state, value) {
|
||||||
|
state.tasksDownloaded = value
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user