mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-24 06:05:31 +02:00
Add visible section items
This commit is contained in:
parent
c33e03f4f5
commit
cd72ff06ec
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user