66 <div v-for =" route in navigation.general" :key =" route.label" >
77 <router-link
88 v-if =" route.label"
9- :class =" {'router-link-active': atNestedRoute(route)}"
9+ :class =" {'router-link-active': atNestedRoute(route), 'disabled': route.disabled }"
1010 :to =" '/team/' + team.slug + route.to" :data-nav =" route.tag"
1111 @click =" $emit('option-selected')"
1212 >
13- <nav-item :label =" route.label" :icon =" route.icon" :featureUnavailable =" route.featureUnavailable" />
13+ <nav-item
14+ :label =" route.label" :icon =" route.icon"
15+ :featureUnavailable =" route.featureUnavailable"
16+ />
1417 </router-link >
1518 <div v-else class =" ff-side-navigation-divider" />
1619 </div >
2326 <router-link
2427 v-for =" route in navigation.admin" :key =" route.label"
2528 :to =" '/team/' + team.slug + route.to"
29+ :class =" {'disabled': route.disabled}"
2630 :data-nav =" route.tag"
2731 >
2832 <nav-item :icon =" route.icon" :label =" route.label" :featureUnavailable =" route.featureUnavailable" />
3741
3842<script >
3943import { ChipIcon , CogIcon , CurrencyDollarIcon , DatabaseIcon , FolderIcon , TemplateIcon , UsersIcon } from ' @heroicons/vue/solid'
40- import { mapState } from ' vuex'
44+ import { mapGetters , mapState } from ' vuex'
4145
4246import permissionsMixin from ' ../mixins/Permissions.js'
4347
@@ -65,6 +69,7 @@ export default {
6569 },
6670 computed: {
6771 ... mapState (' account' , [' user' , ' team' , ' teamMembership' , ' features' , ' notifications' ]),
72+ ... mapGetters (' account' , [' noBilling' ]),
6873 nested : function () {
6974 return (this .$slots [' nested-menu' ] && this .loaded ) || this .closeNested
7075 },
@@ -74,40 +79,46 @@ export default {
7479 label: ' Applications' ,
7580 to: ' /applications' ,
7681 tag: ' team-applications' ,
77- icon: TemplateIcon
82+ icon: TemplateIcon,
83+ disabled: this .noBilling
7884 },
7985 {},
8086 {
8187 label: ' Instances' ,
8288 to: ' /instances' ,
8389 tag: ' team-instances' ,
84- icon: ProjectsIcon
90+ icon: ProjectsIcon,
91+ disabled: this .noBilling
8592 },
8693 {
8794 label: ' Devices' ,
8895 to: ' /devices' ,
8996 tag: ' team-devices' ,
90- icon: ChipIcon
97+ icon: ChipIcon,
98+ disabled: this .noBilling
9199 },
92100 {},
93101 {
94102 label: ' Library' ,
95103 to: ' /library' ,
96104 tag: ' shared-library' ,
97105 icon: FolderIcon,
106+ disabled: this .noBilling ,
98107 featureUnavailable: ! this .features ? .[' shared-library' ] || this .team ? .type .properties .features ? .[' shared-library' ] === false
99108 },
100109 {
101110 label: ' Members' ,
102111 to: ' /members' ,
103112 tag: ' team-members' ,
104- icon: UsersIcon
113+ icon: UsersIcon,
114+ disabled: this .noBilling
105115 }],
106116 admin: [{
107117 label: ' Audit Log' ,
108118 to: ' /audit-log' ,
109119 tag: ' team-audit' ,
110- icon: DatabaseIcon
120+ icon: DatabaseIcon,
121+ disabled: this .noBilling
111122 },
112123 {
113124 label: ' Team Settings' ,
0 commit comments