2021-07-25 13:34:44 +02:00
|
|
|
<template>
|
2021-09-05 17:43:14 +02:00
|
|
|
<div id="dashboard" v-if="authUser.username">
|
2021-08-18 17:10:16 +02:00
|
|
|
<div class="container">
|
2021-09-08 18:54:22 +02:00
|
|
|
<UserStatsCards :user="authUser" />
|
2021-08-18 17:10:16 +02:00
|
|
|
</div>
|
2021-09-05 09:41:39 +02:00
|
|
|
<div class="container dashboard-container">
|
|
|
|
<div class="left-container dashboard-sub-container">
|
2021-09-20 12:18:40 +02:00
|
|
|
<UserCalendar :user="authUser" />
|
2021-09-20 18:23:05 +02:00
|
|
|
<UserMonthStats :user="authUser" />
|
2021-09-20 12:18:40 +02:00
|
|
|
<!-- <UserRecords />-->
|
2021-08-21 18:47:35 +02:00
|
|
|
</div>
|
2021-09-05 09:41:39 +02:00
|
|
|
<div class="right-container dashboard-sub-container">
|
2021-09-20 12:18:40 +02:00
|
|
|
<Timeline :user="authUser" />
|
2021-08-21 18:47:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-25 13:34:44 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
2021-08-18 17:10:16 +02:00
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { computed, ComputedRef, defineComponent } from 'vue'
|
|
|
|
|
2021-09-20 12:18:40 +02:00
|
|
|
import Timeline from '@/components/Dashboard/Timeline/index.vue'
|
2021-09-05 17:43:14 +02:00
|
|
|
import UserCalendar from '@/components/Dashboard/UserCalendar/index.vue'
|
2021-09-20 18:23:05 +02:00
|
|
|
import UserMonthStats from '@/components/Dashboard/UserMonthStats.vue'
|
2021-09-20 12:18:40 +02:00
|
|
|
// import UserRecords from '@/components/Dashboard/UserRecords.vue'
|
2021-09-08 18:54:22 +02:00
|
|
|
import UserStatsCards from '@/components/Dashboard/UserStartsCards/index.vue'
|
2021-08-18 17:10:16 +02:00
|
|
|
import { USER_STORE } from '@/store/constants'
|
2021-08-21 18:36:44 +02:00
|
|
|
import { IAuthUserProfile } from '@/types/user'
|
2021-08-18 17:10:16 +02:00
|
|
|
import { useStore } from '@/use/useStore'
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
name: 'Dashboard',
|
|
|
|
components: {
|
2021-08-21 18:47:35 +02:00
|
|
|
Timeline,
|
|
|
|
UserCalendar,
|
2021-09-20 18:23:05 +02:00
|
|
|
UserMonthStats,
|
2021-09-20 12:18:40 +02:00
|
|
|
// UserRecords,
|
2021-09-08 18:54:22 +02:00
|
|
|
UserStatsCards,
|
2021-08-18 17:10:16 +02:00
|
|
|
},
|
|
|
|
setup() {
|
|
|
|
const store = useStore()
|
|
|
|
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
|
|
|
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
|
|
|
)
|
|
|
|
return { authUser }
|
|
|
|
},
|
|
|
|
})
|
|
|
|
</script>
|
2021-08-21 18:47:35 +02:00
|
|
|
|
2021-09-20 12:18:40 +02:00
|
|
|
<style lang="scss" scoped>
|
2021-08-21 18:47:35 +02:00
|
|
|
@import '~@/scss/base';
|
|
|
|
.dashboard-container {
|
|
|
|
display: flex;
|
2021-09-05 09:41:39 +02:00
|
|
|
flex-direction: row;
|
2021-09-20 12:18:40 +02:00
|
|
|
padding-bottom: 30px;
|
2021-09-05 09:41:39 +02:00
|
|
|
.dashboard-sub-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
.left-container {
|
2021-09-20 12:18:40 +02:00
|
|
|
width: 65%;
|
2021-09-05 09:41:39 +02:00
|
|
|
}
|
|
|
|
.right-container {
|
2021-09-20 12:18:40 +02:00
|
|
|
width: 35%;
|
2021-09-05 09:41:39 +02:00
|
|
|
}
|
2021-08-21 18:47:35 +02:00
|
|
|
}
|
2021-09-05 09:41:39 +02:00
|
|
|
@media screen and (max-width: $small-limit) {
|
|
|
|
.dashboard-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
.left-container {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.right-container {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
2021-08-21 18:47:35 +02:00
|
|
|
}
|
|
|
|
</style>
|