@@ -3,45 +3,68 @@ import { getSortedTabs } from '~/store'
3
3
4
4
const groupedTabs = useGroupedTabs ()
5
5
6
+ const { sidebarExpanded } = useDevToolsSettings ()
7
+
6
8
const renderedGroupedTabs = computed (() => {
7
9
return groupedTabs .value .filter (([, { tabs , show }]) => tabs .length && show )
8
10
})
9
11
</script >
10
12
11
13
<template >
12
- <div border =" r base" flex =" ~ col gap-0.5" z-100 h-full items-center bg-base class =" no-scrollbar" >
13
- <div flex = " ~ col " sticky top-0 z-1 mb1 items-center pt3 bg-base >
14
+ <div border =" r base" flex =" ~ col gap-0.5" z-100 h-full w-full items-center bg-base class =" no-scrollbar" >
15
+ <div sticky top-0 z-1 w-full p1 bg-base border = " b base " >
14
16
<VDropdown placement =" left-start" :distance =" 20" >
15
17
<button
16
- i-logos-vue h-6 w-6 text-lg
18
+ flex =" ~ items-center justify-center gap-2"
19
+ hover =" bg-active"
20
+ relative h-10 select-none p2 text-secondary
21
+ :class =" [
22
+ sidebarExpanded ? 'w-full rounded pl2.5' : '',
23
+ ]"
17
24
title =" Vue DevTools"
18
- />
25
+ >
26
+ <div class =" i-logos-vue h-6 w-6" />
27
+ <template v-if =" sidebarExpanded " >
28
+ <span text =" lg white" font-600 >
29
+ Vue DevTools
30
+ </span >
31
+ <div flex-auto />
32
+ <div i-carbon-overflow-menu-vertical />
33
+ </template >
34
+ </button >
19
35
<template #popper >
20
36
<DockingPanel />
21
37
</template >
22
38
</VDropdown >
23
39
24
- <div mt-2 h-1px w-8 border =" b base" />
40
+ <div mt-2 h-1px w-full border =" b base" />
25
41
</div >
26
42
27
- <div flex =" ~ auto col gap-0.5 items-center" of-auto class =" no-scrollbar" py1 >
43
+ <div
44
+ flex =" ~ auto col gap-0.5 items-center" w-full p1 class =" no-scrollbar"
45
+ :class =" sidebarExpanded ? '' : 'of-x-hidden of-y-auto'"
46
+ >
28
47
<template v-for =" [name , { tabs }], idx of renderedGroupedTabs " :key =" name " >
29
48
<SideNavItem
30
49
v-for =" tab of getSortedTabs(tabs)"
31
50
:key =" tab.path"
32
51
:tab =" tab"
52
+ :minimized =" !sidebarExpanded"
33
53
/>
34
- <div v-if =" idx !== renderedGroupedTabs.length - 1" my1 h-1px w-8 border =" b base" />
54
+ <div v-if =" idx !== renderedGroupedTabs.length - 1" my1 h-1px w-full border =" b base" />
35
55
</template >
36
56
<div flex-auto />
37
57
</div >
38
58
39
- <div flex =" ~ none col items-center" >
40
- <div h-1px w-8 border =" b base" />
59
+ <div flex =" ~ none col items-center" :class = " { 'w-full': sidebarExpanded } " >
60
+ <div h-1px w-full border =" b base" />
41
61
<RouterLink
42
62
replace
43
63
to =" /settings"
44
- flex =" ~ items-center justify-center"
64
+ :flex =" `~ items-center ${!sidebarExpanded ? 'justify-center' : 'justify-start'}`"
65
+ :w =" !sidebarExpanded ? '10' : 'full'"
66
+ :rounded =" !sidebarExpanded ? 'xl' : ''"
67
+ :p =" !sidebarExpanded ? '1' : 'x3'"
45
68
hover =" bg-active"
46
69
relative my1 block h-10 w-10 select-none rounded-xl p1 text-secondary
47
70
exact-active-class =" !text-primary bg-active"
@@ -50,6 +73,9 @@ const renderedGroupedTabs = computed(() => {
50
73
text-xl
51
74
icon =" i-carbon-settings" title =" Settings" :show-title =" false"
52
75
/>
76
+ <span v-if =" sidebarExpanded" ml-2 overflow-hidden text-ellipsis ws-nowrap >
77
+ Settings
78
+ </span >
53
79
</RouterLink >
54
80
</div >
55
81
</div >
0 commit comments