2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-11-27 10:51:33 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2019-04-01 12:24:45 +01:00
|
|
|
<template src="./navigationArea.html"></template>
|
2018-11-14 14:00:01 +00:00
|
|
|
|
|
|
|
<script lang="ts">
|
2019-07-08 14:45:25 +01:00
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
import NAVIGATION_ITEMS from '@/utils/constants/navigationLinks';
|
|
|
|
import { APP_STATE_ACTIONS } from '@/utils/constants/actionNames';
|
|
|
|
import AddUserPopup from '@/components/team/AddUserPopup.vue';
|
2018-11-14 14:00:01 +00:00
|
|
|
|
2019-07-08 14:45:25 +01:00
|
|
|
@Component({
|
2018-12-26 15:05:33 +00:00
|
|
|
components: {
|
|
|
|
AddUserPopup,
|
2019-07-18 14:39:39 +01:00
|
|
|
}
|
2019-07-08 14:45:25 +01:00
|
|
|
})
|
2019-07-18 14:39:39 +01:00
|
|
|
export default class NavigationArea extends Vue {
|
|
|
|
// TODO: create types for navigation items
|
|
|
|
public readonly navigation: any = NAVIGATION_ITEMS;
|
2018-11-14 14:00:01 +00:00
|
|
|
|
2019-07-18 14:39:39 +01:00
|
|
|
public togglePopup(): void {
|
|
|
|
if (!this.$store.getters.selectedProject.id) return;
|
|
|
|
|
|
|
|
this.$store.dispatch(APP_STATE_ACTIONS.TOGGLE_TEAM_MEMBERS);
|
|
|
|
}
|
|
|
|
|
|
|
|
public onLogoClick(): void {
|
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
|
|
|
|
public get isAddTeamMembersPopupShown(): boolean {
|
|
|
|
return this.$store.state.appStateModule.appState.isAddTeamMembersPopupShown;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get isProjectNotSelected(): boolean {
|
|
|
|
return this.$store.state.projectsModule.selectedProject.id === '';
|
|
|
|
}
|
|
|
|
}
|
2018-11-14 14:00:01 +00:00
|
|
|
</script>
|
|
|
|
|
2019-04-01 12:24:45 +01:00
|
|
|
<style src="./navigationArea.scss" lang="scss"></style>
|