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