2019-05-15 16:01:41 +01:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
<template>
|
2020-03-18 17:07:29 +00:00
|
|
|
<div class="dashboard-area">
|
2020-05-06 13:47:39 +01:00
|
|
|
<div class="dashboard-area__title-area">
|
|
|
|
<h1 class="dashboard-area__title-area__title">Project Dashboard</h1>
|
|
|
|
<a
|
|
|
|
class="dashboard-area__title-area__link"
|
|
|
|
href="https://support.tardigrade.io/hc/en-us/requests/new?ticket_form_id=360000683212"
|
|
|
|
target="_blank"
|
2020-06-23 16:58:34 +01:00
|
|
|
rel="noopener noreferrer"
|
2020-05-06 13:47:39 +01:00
|
|
|
>
|
|
|
|
Request Limit Increase ->
|
|
|
|
</a>
|
2020-03-18 17:07:29 +00:00
|
|
|
</div>
|
2020-05-06 13:47:39 +01:00
|
|
|
<ProjectDetails/>
|
|
|
|
<ProjectUsage/>
|
2020-03-18 17:07:29 +00:00
|
|
|
<BucketArea/>
|
2019-05-15 16:01:41 +01:00
|
|
|
</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
|
|
|
|
2020-03-18 17:07:29 +00:00
|
|
|
import BucketArea from '@/components/project/buckets/BucketArea.vue';
|
|
|
|
import ProjectDetails from '@/components/project/ProjectDetails.vue';
|
|
|
|
import ProjectUsage from '@/components/project/usage/ProjectUsage.vue';
|
2019-09-09 11:33:39 +01:00
|
|
|
|
2020-04-22 17:21:12 +01:00
|
|
|
import { RouteConfig } from '@/router';
|
2020-07-15 17:49:37 +01:00
|
|
|
import { APP_STATE_ACTIONS } from '@/utils/constants/actionNames';
|
2020-03-18 17:07:29 +00:00
|
|
|
import { SegmentEvent } from '@/utils/constants/analyticsEventNames';
|
2020-07-15 17:49:37 +01:00
|
|
|
import { MetaUtils } from '@/utils/meta';
|
2019-09-09 11:33:39 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
components: {
|
2020-03-18 17:07:29 +00:00
|
|
|
BucketArea,
|
|
|
|
ProjectDetails,
|
|
|
|
ProjectUsage,
|
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 {
|
2020-02-28 16:33:11 +00:00
|
|
|
/**
|
2020-03-18 17:07:29 +00:00
|
|
|
* Lifecycle hook after initial render.
|
|
|
|
* Segment tracking is processed.
|
2020-02-28 16:33:11 +00:00
|
|
|
*/
|
2020-03-18 17:07:29 +00:00
|
|
|
public mounted(): void {
|
2020-04-22 17:21:12 +01:00
|
|
|
if (!this.$store.getters.selectedProject.id) {
|
|
|
|
this.$router.push(RouteConfig.OnboardingTour.path);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-07-15 17:49:37 +01:00
|
|
|
const defaultProjectLimit: number = parseInt(MetaUtils.getMetaContent('default-project-limit'));
|
2020-09-03 15:58:29 +01:00
|
|
|
if (defaultProjectLimit && this.$store.getters.userProjectsCount < defaultProjectLimit) {
|
2020-07-15 17:49:37 +01:00
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.SHOW_CREATE_PROJECT_BUTTON);
|
|
|
|
}
|
|
|
|
|
2020-03-18 17:07:29 +00:00
|
|
|
this.$segment.track(SegmentEvent.PROJECT_VIEWED, {
|
|
|
|
project_id: this.$store.getters.selectedProject.id,
|
|
|
|
});
|
2019-09-09 11:33:39 +01:00
|
|
|
}
|
|
|
|
}
|
2019-05-15 16:01:41 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2020-03-18 17:07:29 +00:00
|
|
|
.dashboard-area {
|
2020-09-01 11:48:02 +01:00
|
|
|
padding: 40px 30px 70px 30px;
|
2020-05-06 13:47:39 +01:00
|
|
|
font-family: 'font_regular', sans-serif;
|
2020-03-18 17:07:29 +00:00
|
|
|
|
2020-05-06 13:47:39 +01:00
|
|
|
&__title-area {
|
2020-03-18 17:07:29 +00:00
|
|
|
display: flex;
|
2020-05-06 13:47:39 +01:00
|
|
|
align-items: center;
|
2020-03-18 17:07:29 +00:00
|
|
|
justify-content: space-between;
|
2020-05-06 13:47:39 +01:00
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
|
|
&__title {
|
|
|
|
font-family: 'font_bold', sans-serif;
|
|
|
|
font-size: 22px;
|
|
|
|
line-height: 27px;
|
|
|
|
color: #384b65;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__link {
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 14px;
|
|
|
|
color: #2683ff;
|
|
|
|
}
|
2019-09-20 11:21:22 +01:00
|
|
|
}
|
|
|
|
}
|
2019-05-15 16:01:41 +01:00
|
|
|
</style>
|