Add visible section items
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
<transition name="slide">
|
<transition name="slide">
|
||||||
<SideBarSection
|
<SideBarSection
|
||||||
v-if="isOpen[index]"
|
v-if="isOpen[index]"
|
||||||
:items="section.items"
|
:items="filterTiles(section.items)"
|
||||||
@launch-app="launchApp"
|
@launch-app="launchApp"
|
||||||
/>
|
/>
|
||||||
</transition>
|
</transition>
|
||||||
@@ -36,6 +36,7 @@ import SideBarItem from '@/components/Workspace/SideBarItem.vue';
|
|||||||
import SideBarSection from '@/components/Workspace/SideBarSection.vue';
|
import SideBarSection from '@/components/Workspace/SideBarSection.vue';
|
||||||
import IconHome from '@/assets/interface-icons/application-home.svg';
|
import IconHome from '@/assets/interface-icons/application-home.svg';
|
||||||
import IconMinimalView from '@/assets/interface-icons/application-minimal.svg';
|
import IconMinimalView from '@/assets/interface-icons/application-minimal.svg';
|
||||||
|
import { checkItemVisibility } from '@/utils/CheckItemVisibility';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SideBar',
|
name: 'SideBar',
|
||||||
@@ -77,6 +78,12 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
filterTiles(allTiles) {
|
||||||
|
if (!allTiles) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return allTiles.filter((tile) => checkItemVisibility(tile));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.sections.length === 1) { // If only 1 section, go ahead and open it
|
if (this.sections.length === 1) { // If only 1 section, go ahead and open it
|
||||||
|
|||||||
Reference in New Issue
Block a user