2018-09-06 19:46:38 +02:00
|
|
|
<template>
|
2018-09-09 16:22:02 +02:00
|
|
|
<div class="content has-text-centered">
|
2020-11-21 22:25:00 +01:00
|
|
|
<h2>Hi {{ userInfo.name !== '' ? userInfo.name : userInfo.username }}!</h2>
|
2020-06-15 18:47:17 +02:00
|
|
|
<template v-if="!hasTasks">
|
|
|
|
<p>Click on a list or namespace on the left to get started.</p>
|
|
|
|
<router-link
|
2020-09-05 22:35:52 +02:00
|
|
|
:to="{name: 'migrate.start'}"
|
|
|
|
class="button is-primary is-right noshadow is-outlined"
|
|
|
|
v-if="migratorsEnabled"
|
2020-06-15 18:47:17 +02:00
|
|
|
>
|
|
|
|
Import your data into Vikunja
|
|
|
|
</router-link>
|
|
|
|
</template>
|
2020-05-12 15:08:17 +02:00
|
|
|
<ShowTasks :show-all="true"/>
|
2018-09-06 19:46:38 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-05 22:35:52 +02:00
|
|
|
import {mapState} from 'vuex'
|
|
|
|
import ShowTasks from './tasks/ShowTasks'
|
2018-09-06 19:46:38 +02:00
|
|
|
|
2020-09-05 22:35:52 +02:00
|
|
|
export default {
|
|
|
|
name: 'Home',
|
|
|
|
components: {
|
|
|
|
ShowTasks,
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
loading: false,
|
|
|
|
currentDate: new Date(),
|
|
|
|
tasks: [],
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: mapState({
|
|
|
|
migratorsEnabled: state => state.config.availableMigrators !== null && state.config.availableMigrators.length > 0,
|
|
|
|
authenticated: state => state.auth.authenticated,
|
|
|
|
userInfo: state => state.auth.info,
|
|
|
|
hasTasks: state => state.hasTasks,
|
|
|
|
}),
|
|
|
|
}
|
2018-09-06 19:46:38 +02:00
|
|
|
</script>
|