File tree Expand file tree Collapse file tree 5 files changed +14
-12
lines changed
Expand file tree Collapse file tree 5 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ const groups = computed(() => {
6262 left = 0
6363 }
6464 else {
65- left -= entries .length
65+ left -= items .length
6666 visible .push ([category , items ])
6767 }
6868 }
@@ -88,6 +88,6 @@ const groups = computed(() => {
8888 :selected =" selected"
8989 @select =" (e) => emit('select', e)"
9090 />
91- <slot v-if =" groups.overflow.length > 0" name =" overflow" :entries =" groups.overflow" />
9291 </template >
92+ <slot v-if =" groups.overflow.length > 0" name =" overflow" :entries =" groups.overflow" />
9393</template >
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ export const BUILTIN_ENTRIES: readonly DevToolsViewBuiltin[] = Object.freeze([
1212] )
1313
1414export const DEFAULT_CATEGORIES_ORDER : Record < string , number > = {
15- default : 0 ,
16- app : 100 ,
17- framework : 200 ,
18- web : 300 ,
19- advanced : 400 ,
20- builtin : 500 ,
15+ '~viteplus' : - 1000 ,
16+ 'default' : 0 ,
17+ 'app' : 100 ,
18+ 'framework' : 200 ,
19+ 'web' : 300 ,
20+ 'advanced' : 400 ,
21+ '~builtin' : 1000 ,
2122} satisfies Record < DevToolsDockEntryCategory , number >
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class DevToolsDockHost implements DevToolsDockHostType {
2222 id : '~terminals' ,
2323 title : 'Terminals' ,
2424 icon : 'ph:terminal-duotone' ,
25- category : 'builtin' ,
25+ category : '~ builtin' ,
2626 get isHidden ( ) {
2727 return context . terminals . sessions . size === 0
2828 } ,
@@ -32,14 +32,14 @@ export class DevToolsDockHost implements DevToolsDockHostType {
3232 id : '~logs' ,
3333 title : 'Logs' ,
3434 icon : 'ph:notification-duotone' ,
35- category : 'builtin' ,
35+ category : '~ builtin' ,
3636 isHidden : true , // TODO: implement logs
3737 } ,
3838 {
3939 type : '~builtin' ,
4040 id : '~settings' ,
4141 title : 'Settings' ,
42- category : 'builtin' ,
42+ category : '~ builtin' ,
4343 icon : 'ph:gear-duotone' ,
4444 } ,
4545 ]
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export interface DevToolsDockHost {
1414}
1515
1616// TODO: refine categories more clearly
17- export type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default' | 'builtin'
17+ export type DevToolsDockEntryCategory = 'app' | 'framework' | 'web' | 'advanced' | 'default' | '~viteplus' | '~ builtin'
1818
1919export type DevToolsDockEntryIcon = string | { light : string , dark : string }
2020
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export function DevToolsViteUI(): PluginWithDevTools {
1919 ctx . docks . register ( {
2020 id : 'vite' ,
2121 title : 'Vite' ,
22+ category : '~viteplus' ,
2223 icon : 'https://vite.dev/logo.svg' ,
2324 type : 'iframe' ,
2425 url : '/.devtools-vite/' ,
You can’t perform that action at this time.
0 commit comments