storj/web/satellite/src/components/project/ProjectOverviewArea.vue

67 lines
1.8 KiB
Vue
Raw Normal View History

// 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"/>
<router-view v-if="isProjectSelected"/>
<EmptyState
v-if="!isProjectSelected"
mainTitle="Create your first project"
additional-text='<p>Please click the button <span style="font-family: font_bold">"New Project"</span> in the right corner</p>'
:imageSource="emptyImage" />
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import EmptyState from '@/components/common/EmptyStateArea.vue';
2019-06-03 13:19:48 +01:00
import TabNavigation from '@/components/navigation/TabNavigation.vue';
import { EMPTY_STATE_IMAGES } from '@/utils/constants/emptyStatesImages';
2019-06-03 13:19:48 +01:00
import { PROJECT_ROUTES } from '@/utils/constants/tabNavigation';
@Component(
{
data: function () {
return {
emptyImage: EMPTY_STATE_IMAGES.PROJECT,
2019-06-03 13:19:48 +01:00
navigation: PROJECT_ROUTES,
};
},
computed: {
isProjectSelected: function (): boolean {
return this.$store.getters.selectedProject.id !== '';
},
},
2019-06-03 13:19:48 +01:00
mounted() {
this.$router.push(PROJECT_ROUTES.DETAILS.path);
},
components: {
EmptyState,
2019-06-03 13:19:48 +01:00
TabNavigation,
}
}
)
export default class ProjectDetailsArea extends Vue {
}
</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;
}
}
</style>