2018-11-27 10:51:33 +00:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2018-11-14 14:00:01 +00:00
|
|
|
<template>
|
2018-11-19 15:32:50 +00:00
|
|
|
<div class="navigation-area">
|
2018-11-23 15:48:11 +00:00
|
|
|
<router-link class="navigation-area__item-container" v-for="navItem in navigation" v-bind:key="navItem.label" :to="navItem.path">
|
|
|
|
<div class="navigation-area__item-container__link-container" >
|
2018-11-19 15:32:50 +00:00
|
|
|
<div v-html="navItem.svg"></div>
|
2018-11-14 14:00:01 +00:00
|
|
|
<h1>{{navItem.label}}</h1>
|
2019-01-09 15:40:21 +00:00
|
|
|
<div class="navigation-area__item-container__link-container__add-button" id="addTeamMemberPopupButtonSVG" v-if="navItem.label == 'Team'">
|
2018-12-26 15:05:33 +00:00
|
|
|
<div v-on:click="togglePopup">
|
2018-11-23 15:48:11 +00:00
|
|
|
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<rect width="40" height="40" rx="20" fill="#2683FF"/>
|
|
|
|
<path d="M25 18.977V21.046H20.9722V25H19.0046V21.046H15V18.977H19.0046V15H20.9722V18.977H25Z" fill="white"/>
|
|
|
|
</svg>
|
2018-12-26 15:05:33 +00:00
|
|
|
</div>
|
2018-11-14 14:00:01 +00:00
|
|
|
</div>
|
2018-11-23 15:48:11 +00:00
|
|
|
</div>
|
|
|
|
</router-link>
|
2018-12-26 15:05:33 +00:00
|
|
|
<AddUserPopup v-if="isAddTeamMembersPopupShown"/>
|
2018-11-14 14:00:01 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
2018-12-26 15:05:33 +00:00
|
|
|
import { mapState } from 'vuex';
|
2018-12-18 14:43:23 +00:00
|
|
|
import NAVIGATION_ITEMS from '@/utils/constants/navigationLinks';
|
2019-01-09 15:40:21 +00:00
|
|
|
import { APP_STATE_ACTIONS } from '@/utils/constants/actionNames';
|
|
|
|
import AddUserPopup from '@/components/team/AddUserPopup.vue';
|
2018-11-14 14:00:01 +00:00
|
|
|
|
|
|
|
@Component(
|
2018-12-18 14:43:23 +00:00
|
|
|
{
|
|
|
|
data: function () {
|
2018-11-14 14:00:01 +00:00
|
|
|
return {
|
2018-12-26 15:05:33 +00:00
|
|
|
navigation: NAVIGATION_ITEMS,
|
|
|
|
isPopupShown: false,
|
2018-12-18 14:43:23 +00:00
|
|
|
};
|
2018-12-26 15:05:33 +00:00
|
|
|
},
|
|
|
|
components: {
|
|
|
|
AddUserPopup,
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
togglePopup: function(): void {
|
|
|
|
if (!this.$store.getters.selectedProject.id) return;
|
|
|
|
|
2019-01-09 15:40:21 +00:00
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.TOGGLE_TEAM_MEMBERS);
|
2018-12-26 15:05:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: mapState({
|
2019-01-09 15:40:21 +00:00
|
|
|
isAddTeamMembersPopupShown: (state: any) => state.appStateModule.appState.isAddTeamMembersPopupShown,
|
2018-12-26 15:05:33 +00:00
|
|
|
}),
|
2018-11-14 14:00:01 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2018-12-18 14:43:23 +00:00
|
|
|
export default class NavigationArea extends Vue {
|
|
|
|
}
|
2018-11-14 14:00:01 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2018-11-19 15:32:50 +00:00
|
|
|
.navigation-area {
|
2018-12-05 16:39:03 +00:00
|
|
|
position: relative;
|
|
|
|
min-width: 280px;
|
|
|
|
max-width: 280px;
|
|
|
|
height: 100vh;
|
2018-11-28 16:20:23 +00:00
|
|
|
left: 0;
|
2018-11-14 14:00:01 +00:00
|
|
|
background-color: #fff;
|
|
|
|
padding-top: 3.5vh;
|
2018-11-19 15:32:50 +00:00
|
|
|
|
|
|
|
&__item-container {
|
2018-11-28 16:20:23 +00:00
|
|
|
height: 70px;
|
|
|
|
padding-left: 60px;
|
|
|
|
border-left: 3px solid transparent;
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-start;
|
|
|
|
align-items: center;
|
2018-11-23 15:48:11 +00:00
|
|
|
&.router-link-exact-active,
|
2018-11-19 15:32:50 +00:00
|
|
|
&:hover {
|
2018-11-28 16:20:23 +00:00
|
|
|
border-left: 3px solid #2683FF;
|
2018-11-23 15:48:11 +00:00
|
|
|
.svg path:not(.white) {
|
2018-11-19 15:32:50 +00:00
|
|
|
fill: #2683FF !important;
|
2018-11-28 16:20:23 +00:00
|
|
|
}
|
2018-11-19 15:32:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__link-container {
|
2018-11-28 16:20:23 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: flex-start;
|
|
|
|
align-items: center;
|
2018-11-19 15:32:50 +00:00
|
|
|
h1 {
|
|
|
|
font-family: 'montserrat_medium';
|
|
|
|
font-size: 16px;
|
|
|
|
line-height: 23px;
|
|
|
|
color: #354049;
|
2018-11-28 16:20:23 +00:00
|
|
|
margin-left: 15px;;
|
2018-11-19 15:32:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&__add-button {
|
2018-11-28 16:20:23 +00:00
|
|
|
margin-left: 40px;
|
|
|
|
background-color: transparent;
|
2018-11-19 15:32:50 +00:00
|
|
|
|
|
|
|
&:hover {
|
2018-11-23 15:48:11 +00:00
|
|
|
svg {
|
2018-11-19 15:32:50 +00:00
|
|
|
border-radius: 50px;
|
|
|
|
box-shadow: 0px 4px 20px rgba(35, 121, 236, 0.4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-11-14 14:00:01 +00:00
|
|
|
}
|
2018-11-28 16:20:23 +00:00
|
|
|
|
2018-11-14 14:00:01 +00:00
|
|
|
a {
|
|
|
|
text-decoration: none;
|
2018-11-23 15:48:11 +00:00
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
2018-12-05 16:39:03 +00:00
|
|
|
@media screen and (max-width: 1024px) {
|
2018-11-23 15:48:11 +00:00
|
|
|
.navigation-area {
|
2018-12-05 16:39:03 +00:00
|
|
|
width: 80px;
|
|
|
|
max-width: 80px;
|
|
|
|
min-width: 80px;
|
2018-11-23 15:48:11 +00:00
|
|
|
|
2018-11-28 16:20:23 +00:00
|
|
|
&__item-container {
|
2018-12-05 16:39:03 +00:00
|
|
|
padding-left: 26px;
|
2018-11-28 16:20:23 +00:00
|
|
|
|
|
|
|
&__link-container {
|
|
|
|
h1 {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&__add-button {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-11-14 14:00:01 +00:00
|
|
|
</style>
|