22 <!-- SidePanelPageTabList -->
33 <div style =" width : 100% ; max-width : 100% " >
44 <q-list class =" q-ma-none" >
5- <!-- supporting drag & drop when not on mobile -->
5+ <template v-if =" useUiStore ().folderStyle === ' goInto' " >
6+ <SidePanelTabListHelper
7+ v-for =" (tab, index) in pinnedTabs"
8+ :key =" index"
9+ v-once
10+ :tab =" tab.tab as Tab"
11+ :index =" tab.index"
12+ :tabset =" props.tabset!"
13+ :filter =" props.filter || ''" />
14+
15+ <q-separator v-if =" pinnedTabs.length > 0" class =" q-mt-xs" />
16+ </template >
17+
618 <vue-draggable-next
719 v-if =" tabs.length > 0"
820 class =" q-ma-none"
1527 v-once
1628 :tab =" tab.tab as Tab"
1729 :index =" tab.index"
18- :type =" props.type"
19- :sorting =" props.sorting"
20- :preventDragAndDrop =" false"
2130 :tabset =" props.tabset!"
22- :show-tabsets =" props.showTabsets"
2331 :hide-menu =" props.hideMenu"
2432 :filter =" props.filter || ''" />
2533 </vue-draggable-next >
@@ -54,6 +62,7 @@ import { Tab, TabSorting } from 'src/tabsets/models/Tab'
5462import { Tabset , TabsetType } from ' src/tabsets/models/Tabset'
5563import TabsetService from ' src/tabsets/services/TabsetService'
5664import { useTabsetService } from ' src/tabsets/services/TabsetService2'
65+ import { useTabsetsStore } from ' src/tabsets/stores/tabsetsStore'
5766import { useUiStore } from ' src/ui/stores/uiStore'
5867import { PropType , ref , watch } from ' vue'
5968import { VueDraggableNext } from ' vue-draggable-next'
@@ -72,6 +81,7 @@ const props = defineProps({
7281const emits = defineEmits ([' tabs-found' ])
7382
7483const tabs = ref <IndexedTab []>([])
84+ const pinnedTabs = ref <IndexedTab []>([])
7585
7686watch (
7787 () => props .filter ,
@@ -148,7 +158,37 @@ const tabsForColumn = (): IndexedTab[] => {
148158 .map ((t : Tab , index : number ) => new IndexedTab (index , t ))
149159}
150160
161+ const calcPinnedTabs = (): IndexedTab [] => {
162+ const result: IndexedTab [] = []
163+ if (! props .tabset ) {
164+ return result
165+ }
166+ const activeFolder = useTabsetsStore ().getActiveFolder (props .tabset )
167+ if (! activeFolder ) {
168+ return result
169+ }
170+ const folderChain = useTabsetsStore ().getFolderChain (activeFolder .id )
171+ console .log (' folderChain' , folderChain )
172+ if (folderChain .length > 0 ) {
173+ const rootTabset = useTabsetsStore ().getTabset (folderChain [folderChain .length - 1 ]! )
174+ for (var i = 1 ; i < folderChain .length ; i ++ ) {
175+ console .log (' checking' , folderChain [i ])
176+ const parentFolder = useTabsetsStore ().getActiveFolder (rootTabset ! , folderChain [i ])
177+ console .log (' parentFolder' , parentFolder )
178+ const pinnedInListTabs = parentFolder ?.tabs
179+ .filter ((t : Tab ) => t .pinnedInList )
180+ .map ((t : Tab , index : number ) => new IndexedTab (index , t ))
181+ if (pinnedInListTabs ) {
182+ result .push (... pinnedInListTabs )
183+ }
184+ }
185+ }
186+ return result
187+ }
188+
151189tabs .value = tabsForColumn ()
190+ pinnedTabs .value = calcPinnedTabs ()
191+
152192// console.log('---')
153193emits (' tabs-found' , tabs .value .length )
154194 </script >
0 commit comments