Make sure no cta's are visible while the page is loading
This commit is contained in:
parent
981a230b14
commit
890d9b3f11
2 changed files with 7 additions and 2 deletions
|
@ -83,7 +83,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="has-text-centered has-text-grey" v-if="tasks.length === 0">
|
<p class="has-text-centered has-text-grey" v-if="ctaVisiable && tasks.length === 0 && !taskCollectionService.loading">
|
||||||
This list is currently empty.
|
This list is currently empty.
|
||||||
<a @click="$refs.newTaskInput.focus()">Create a new task.</a>
|
<a @click="$refs.newTaskInput.focus()">Create a new task.</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -184,6 +184,8 @@ export default {
|
||||||
showError: false,
|
showError: false,
|
||||||
labelTaskService: LabelTaskService,
|
labelTaskService: LabelTaskService,
|
||||||
labelService: LabelService,
|
labelService: LabelService,
|
||||||
|
|
||||||
|
ctaVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
|
@ -207,6 +209,9 @@ export default {
|
||||||
canWrite: state => state.currentList.maxRight > Rights.READ,
|
canWrite: state => state.currentList.maxRight > Rights.READ,
|
||||||
list: state => state.currentList,
|
list: state => state.currentList,
|
||||||
}),
|
}),
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => this.ctaVisible = true)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// This function initializes the tasks page and loads the first page of tasks
|
// This function initializes the tasks page and loads the first page of tasks
|
||||||
initTasks(page, search = '') {
|
initTasks(page, search = '') {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p v-else class="has-text-centered has-text-grey">
|
<p v-else-if="!teamService.loading" class="has-text-centered has-text-grey">
|
||||||
You are currently not part of any teams.
|
You are currently not part of any teams.
|
||||||
<router-link :to="{name: 'teams.create'}">
|
<router-link :to="{name: 'teams.create'}">
|
||||||
Create a new team.
|
Create a new team.
|
||||||
|
|
Loading…
Reference in a new issue