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"
|
2019-10-02 10:42:12 +01:00
|
|
|
:navigation="navigation"
|
|
|
|
/>
|
2019-05-15 16:01:41 +01:00
|
|
|
<router-view v-if="isProjectSelected"/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2019-09-09 11:33:39 +01:00
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
2019-07-18 14:39:39 +01:00
|
|
|
|
2019-09-09 11:33:39 +01:00
|
|
|
import TabNavigation from '@/components/navigation/TabNavigation.vue';
|
|
|
|
|
|
|
|
import { NavigationLink } from '@/types/navigation';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
components: {
|
|
|
|
TabNavigation,
|
2019-09-13 15:58:18 +01:00
|
|
|
},
|
2019-09-09 11:33:39 +01:00
|
|
|
})
|
2020-03-16 12:08:38 +00:00
|
|
|
export default class ProjectDashboard extends Vue {
|
2019-09-09 11:33:39 +01:00
|
|
|
// TODO: make type for project routes
|
|
|
|
public navigation: NavigationLink[] = [
|
2020-03-16 12:08:38 +00:00
|
|
|
new NavigationLink('/project-dashboard/details', 'Details'),
|
|
|
|
new NavigationLink('/project-dashboard/usage-report', 'Report'),
|
2019-09-09 11:33:39 +01:00
|
|
|
];
|
|
|
|
|
2020-02-28 16:33:11 +00:00
|
|
|
/**
|
|
|
|
* Indicates if project is selected.
|
|
|
|
*/
|
2019-09-09 11:33:39 +01:00
|
|
|
public get isProjectSelected(): boolean {
|
|
|
|
return this.$store.getters.selectedProject.id !== '';
|
|
|
|
}
|
|
|
|
}
|
2019-05-15 16:01:41 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.project-overview {
|
2019-11-29 21:31:52 +00:00
|
|
|
padding: 40px 65px 55px 65px;
|
2019-05-15 16:01:41 +01:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&__navigation {
|
|
|
|
position: absolute;
|
2019-12-27 16:41:43 +00:00
|
|
|
right: 65px;
|
2019-05-15 16:01:41 +01:00
|
|
|
top: 44px;
|
2019-06-03 13:19:48 +01:00
|
|
|
z-index: 99;
|
2019-05-15 16:01:41 +01:00
|
|
|
}
|
|
|
|
}
|
2019-09-20 11:21:22 +01:00
|
|
|
|
|
|
|
@media screen and (max-width: 1024px) {
|
2019-10-28 15:59:19 +00:00
|
|
|
|
2019-09-20 11:21:22 +01:00
|
|
|
.project-overview {
|
|
|
|
padding: 44px 40px 55px 40px;
|
|
|
|
|
|
|
|
&__navigation {
|
|
|
|
right: 40px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-05-15 16:01:41 +01:00
|
|
|
</style>
|