2019-05-15 16:01:41 +01:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div class="project-overview">
|
2019-06-03 13:19:48 +01:00
|
|
|
<TabNavigation
|
|
|
|
v-if="isProjectSelected"
|
|
|
|
class="project-overview__navigation"
|
|
|
|
:navigation="navigation"/>
|
2019-05-15 16:01:41 +01:00
|
|
|
<router-view v-if="isProjectSelected"/>
|
|
|
|
<EmptyState
|
|
|
|
v-if="!isProjectSelected"
|
|
|
|
mainTitle="Create your first project"
|
2019-07-30 11:13:24 +01:00
|
|
|
additional-text='<p>Please click the button <b>"New Project"</b> in the right corner</p>'
|
2019-05-15 16:01:41 +01:00
|
|
|
:imageSource="emptyImage" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2019-07-08 14:45:25 +01:00
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
import EmptyState from '@/components/common/EmptyStateArea.vue';
|
|
|
|
import TabNavigation from '@/components/navigation/TabNavigation.vue';
|
|
|
|
import { EMPTY_STATE_IMAGES } from '@/utils/constants/emptyStatesImages';
|
|
|
|
import { PROJECT_ROUTES } from '@/utils/constants/tabNavigation';
|
2019-05-15 16:01:41 +01:00
|
|
|
|
2019-07-08 14:45:25 +01:00
|
|
|
@Component({
|
2019-05-15 16:01:41 +01:00
|
|
|
components: {
|
|
|
|
EmptyState,
|
2019-06-03 13:19:48 +01:00
|
|
|
TabNavigation,
|
2019-05-15 16:01:41 +01:00
|
|
|
}
|
2019-07-08 14:45:25 +01:00
|
|
|
})
|
2019-07-18 14:39:39 +01:00
|
|
|
export default class ProjectDetailsArea extends Vue {
|
|
|
|
// TODO: make type for project routes
|
|
|
|
public navigation: any = PROJECT_ROUTES;
|
|
|
|
|
|
|
|
public mounted(): void {
|
|
|
|
this.$router.push(PROJECT_ROUTES.DETAILS.path);
|
|
|
|
}
|
2019-05-15 16:01:41 +01:00
|
|
|
|
2019-07-18 14:39:39 +01:00
|
|
|
public get isProjectSelected(): boolean {
|
|
|
|
return this.$store.getters.selectedProject.id !== '';
|
|
|
|
}
|
|
|
|
|
|
|
|
public get emptyImage(): string {
|
|
|
|
return EMPTY_STATE_IMAGES.PROJECT;
|
|
|
|
}
|
|
|
|
}
|
2019-05-15 16:01:41 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.project-overview {
|
|
|
|
padding: 44px 55px 55px 55px;
|
|
|
|
position: relative;
|
|
|
|
height: 85vh;
|
|
|
|
|
|
|
|
&__navigation {
|
|
|
|
position: absolute;
|
|
|
|
right: 55px;
|
|
|
|
top: 44px;
|
2019-06-03 13:19:48 +01:00
|
|
|
z-index: 99;
|
2019-05-15 16:01:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|