Browse Source

Update sidebar

Daniel Supernault 11 tháng trước cách đây
mục cha
commit
5778421c84
1 tập tin đã thay đổi với 4 bổ sung9 xóa
  1. 4 9
      resources/assets/components/partials/sidebar.vue

+ 4 - 9
resources/assets/components/partials/sidebar.vue

@@ -132,7 +132,7 @@
 					</router-link>
 				</li>
 
-				<li class="nav-item">
+				<li v-if="hasGroups" class="nav-item">
 					<router-link class="nav-link" to="/groups/feed">
 						<span class="icon text-lighter"><i class="far fa-layer-group"></i></span>
 						{{ $t('navmenu.groups') }}
@@ -426,25 +426,20 @@
 				hasNetworkTimeline: false,
 				hasLiveStreams: false,
                 hasStories: false,
+                hasGroups: false,
 			}
 		},
 
 		mounted() {
 			if(window.App.config.features.hasOwnProperty('timelines')) {
 				this.hasLocalTimeline = App.config.features.timelines.local;
-				this.hasNetworkTimeline = App.config.features.timelines.network;
+                this.hasNetworkTimeline = App.config.features.timelines.network;
+				this.hasGroups = App.config.features.groups;
 				//this.hasLiveStreams = App.config.ab.hls == true;
 			}
             if(window.App.config.features.hasOwnProperty('stories')) {
                 this.hasStories = App.config.features.stories;
             }
-			// if(!this.user.username) {
-			// 	this.user = window._sharedData.user;
-			// }
-			// setTimeout(() => {
-			// 	this.user = window._sharedData.curUser;
-			// 	this.loaded = true;
-			// }, 300);
 		},
 
 		methods: {