33 <div style =" width : 100% ; max-width : 100% " >
44 <q-list class =" q-ma-none" >
55 <!-- supporting drag & drop when not on mobile -->
6- <template v-for =" column in getColumns ()" >
7- <vue-draggable-next
8- v-if =" tabs.length > 0"
9- class =" q-ma-none"
10- :list =" tabs"
11- :group =" { name: 'tabs', pull: 'clone' }"
12- @change =" (event: any) => handleDragAndDrop(event, column)" >
13- <SidePanelTabListHelper
14- v-for =" (tab, index) in tabs"
15- :key =" index"
16- v-once
17- :tab =" tab.tab as Tab"
18- :index =" tab.index"
19- :type =" props.type"
20- :sorting =" props.sorting"
21- :preventDragAndDrop =" false"
22- :tabset =" props.tabset!"
23- :show-tabsets =" props.showTabsets"
24- :hide-menu =" props.hideMenu"
25- :filter =" props.filter || ''" />
26- </vue-draggable-next >
27- <div v-else-if =" props.filter" class =" q-ma-md text-caption" >
28- Filter <em >'{{ props.filter }}'</em > did not match anything inside this collection. Click 'Enter' to search in
29- all your collections.
30- </div >
31- <div v-else-if =" props.tabset?.folders.length === 0" class =" q-ma-md text-caption text-center" >
32- Empty Tabset<br />
33- check the <span class =" cursor-pointer" @click =" useUiStore().startButtonAnimation('addtab')" >action menu</span
34- ><br />
35- </div >
36- </template >
6+ <vue-draggable-next
7+ v-if =" tabs.length > 0"
8+ class =" q-ma-none"
9+ :list =" tabs"
10+ :group =" { name: 'tabs', pull: 'clone' }"
11+ @change =" (event: any) => handleDragAndDrop(event)" >
12+ <SidePanelTabListHelper
13+ v-for =" (tab, index) in tabs"
14+ :key =" index"
15+ v-once
16+ :tab =" tab.tab as Tab"
17+ :index =" tab.index"
18+ :type =" props.type"
19+ :sorting =" props.sorting"
20+ :preventDragAndDrop =" false"
21+ :tabset =" props.tabset!"
22+ :show-tabsets =" props.showTabsets"
23+ :hide-menu =" props.hideMenu"
24+ :filter =" props.filter || ''" />
25+ </vue-draggable-next >
26+ <div v-else-if =" props.filter" class =" q-ma-md text-caption" >
27+ Filter <em >'{{ props.filter }}'</em > did not match anything inside this collection. Click 'Enter' to search in
28+ all your collections.
29+ </div >
30+ <div v-else-if =" props.tabset?.folders.length === 0" class =" q-ma-md text-caption text-center" >
31+ Empty Tabset<br />
32+ check the <span class =" cursor-pointer" @click =" useUiStore().startButtonAnimation('addtab')" >action menu</span
33+ ><br />
34+ </div >
3735 </q-list >
3836
3937 <audio id =" myAudio" >
4240 </div >
4341</template >
4442
45- <script setup lang="ts">
46- import { SPECIAL_ID_FOR_NO_GROUP_ASSIGNED } from ' src/boot/constants'
43+ <script lang="ts" setup>
4744import SidePanelTabListHelper from ' src/tabsets/layouts/SidePanelTabListHelper.vue'
4845import { IndexedTab } from ' src/tabsets/models/IndexedTab'
4946import { Tab , TabSorting } from ' src/tabsets/models/Tab'
5047import { Tabset , TabsetType } from ' src/tabsets/models/Tabset'
51- import { TabsetColumn } from ' src/tabsets/models/TabsetColumn'
5248import TabsetService from ' src/tabsets/services/TabsetService'
5349import { useTabsetService } from ' src/tabsets/services/TabsetService2'
5450import { useUiStore } from ' src/ui/stores/uiStore'
8682 },
8783)
8884
89- const handleDragAndDrop = async (event : any , column : TabsetColumn ) => {
85+ const handleDragAndDrop = async (event : any ) => {
9086 console .log (' SidePanelPageTabList d&d event:' , event )
9187 const { moved, added } = event
9288 if (moved ) {
@@ -95,25 +91,19 @@ const handleDragAndDrop = async (event: any, column: TabsetColumn) => {
9591 const movedElement: Tab = tabsInColumn [moved .oldIndex ]! .tab
9692 const realNewIndex = tabsInColumn [moved .newIndex ]! .index
9793 // console.log(` '${movedElement.id}' ${moved.oldIndex} -> ${realNewIndex}`)
98- await TabsetService .moveTo (movedElement .id , realNewIndex , column )
94+ await TabsetService .moveTo (movedElement .id , realNewIndex )
9995 }
10096 if (added ) {
101- console .log (
102- ` added event: '${added .element .tab .id }' ${added .oldIndex } -> ${added .newIndex }, ${column .title || column .id } ` ,
103- )
97+ console .log (` added event: '${added .element .tab .id }' ${added .oldIndex } -> ${added .newIndex } ` )
10498 const tabsInColumn = tabsForColumn ()
10599 const movedElement: Tab = added .element .tab
106100 const realNewIndex = added .newIndex < tabsInColumn .length ? tabsInColumn [added .newIndex ]! .index : 0
107101 console .log (` '${added .element .tab .id }' ${added .oldIndex } -> ${realNewIndex } ` )
108- movedElement .columnId = column .id
102+ // movedElement.columnId = column.id
109103 useTabsetService ().saveCurrentTabset ()
110104 }
111105}
112106
113- const getColumns = () => {
114- return [new TabsetColumn (SPECIAL_ID_FOR_NO_GROUP_ASSIGNED , ' ' )]
115- }
116-
117107const tabsForColumn = (): IndexedTab [] => {
118108 function filterMatches(property : string | undefined ) {
119109 return property && property .toLowerCase ().indexOf (props .filter ! .toLowerCase ()! ) >= 0
@@ -137,11 +127,11 @@ tabs.value = tabsForColumn()
137127
138128<style >
139129.q-expansion-item--popup > .q-expansion-item__container {
140- border : 0 px solid rgba (0 , 0 , 0 , 0.12 ) !important ;
130+ border : 0 solid rgba (0 , 0 , 0 , 0.12 ) !important ;
141131}
142132
143133.q-list--separator > .q-item-type + .q-item-type ,
144134.q-list--separator > .q-virtual-scroll__content > .q-item-type + .q-item-type {
145- border-top : 0 px solid rgba (100 , 0 , 0 , 0.12 ) !important ;
135+ border-top : 0 solid rgba (100 , 0 , 0 , 0.12 ) !important ;
146136}
147137 </style >
0 commit comments