Skip to content

Commit 5b566fb

Browse files
committed
feat: put vue devtools ui in a separate category
1 parent 94b3822 commit 5b566fb

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

packages/devtools-kit/src/_types/common.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export type TabCategory =
22
| 'pinned'
33
| 'app'
4+
| 'vue-devtools'
45
| 'analyze'
56
| 'server'
67
| 'modules'

packages/devtools/client/composables/state-tabs.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ export function useAllTabs() {
5252

5353
function getCategorizedRecord(): Record<TabCategory, (ModuleCustomTab | ModuleBuiltinTab)[]> {
5454
return {
55-
pinned: [],
56-
app: [],
57-
analyze: [],
58-
server: [],
59-
modules: [],
60-
documentation: [],
61-
advanced: [],
55+
'pinned': [],
56+
'app': [],
57+
'vue-devtools': [],
58+
'analyze': [],
59+
'server': [],
60+
'modules': [],
61+
'documentation': [],
62+
'advanced': [],
6263
}
6364
}
6465

packages/devtools/client/pages/modules/pinia.vue

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ definePageMeta({
1010
icon: 'i-logos-pinia',
1111
title: 'Pinia',
1212
layout: 'full',
13+
category: 'vue-devtools',
1314
show() {
1415
const configs = useServerConfig()
1516
return () => configs.value?.modules?.some(item => (item as string | Array<unknown>)?.includes('@pinia/nuxt'))

packages/devtools/client/pages/modules/components-tree.vue packages/devtools/client/pages/modules/render-tree.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ const openInEditor = useOpenInEditor()
1111
1212
definePageMeta({
1313
icon: 'i-carbon-category',
14-
title: 'Components Tree',
14+
title: 'Render Tree',
1515
layout: 'full',
1616
show: () => {
1717
const client = useClient()
1818
return () => !!client.value
1919
},
20-
order: 3,
20+
order: 1,
21+
category: 'vue-devtools',
2122
})
2223
2324
function togglePanel(status: boolean) {

packages/devtools/client/pages/settings.vue

+3-4
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ watchEffect(() => {
113113
icon="i-carbon-settings-adjust"
114114
text="DevTools Settings"
115115
/>
116-
<div grid="~ md:cols-2 gap-x-10 gap-y-3" max-w-300>
116+
<div grid="~ lg:cols-2 gap-x-10 gap-y-3" max-w-300>
117117
<div flex="~ col gap-2">
118118
<h3 text-lg>
119119
Tabs
@@ -141,10 +141,9 @@ watchEffect(() => {
141141
:model-value="!hiddenTabs.includes(tab.name)"
142142
@update:model-value="(v: boolean) => toggleTab(tab.name, v)"
143143
>
144-
<div flex="~ gap-2" flex-auto items-center justify-start pr-4 :class="hiddenTabs.includes(tab.name) ? 'op25' : ''">
144+
<div flex="~ gap-2" flex-auto items-center justify-start of-hidden pr-4 :class="hiddenTabs.includes(tab.name) ? 'op25' : ''">
145145
<TabIcon text-xl :icon="tab.icon" :title="tab.title" />
146-
<span>{{ tab.title }}</span>
147-
<div flex-auto />
146+
<span flex-auto overflow-hidden text-ellipsis ws-nowrap>{{ tab.title }}</span>
148147
<template v-if="pinnedTabs.includes(tab.name)">
149148
<NButton
150149
icon="i-carbon-caret-up"

0 commit comments

Comments
 (0)