Skip to content

Commit 8f4ff4a

Browse files
committed
fix: improve filepath item ui
1 parent fe98c80 commit 8f4ff4a

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

packages/devtools/client/components/FilepathItem.vue

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const parsed = computed(() => (props.filepath && config.value)
4141
{{ parsed.path }}
4242
</template>
4343
</span>
44+
<slot />
4445
<div v-if="filepath" flex="~ gap1" pr2 op0 group-hover:op100>
4546
<button
4647
text-sm op40 hover="op100 text-primary"

packages/devtools/client/components/PluginItem.vue

+25-23
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,31 @@ const shortPath = computed(() => parseReadablePath(props.plugin.src, config.valu
1818
<div w8 text-right text-sm op25>
1919
{{ index }}
2020
</div>
21-
<FilepathItem :filepath="props.plugin.src" :subpath="true" />
22-
<div>
23-
<NBadge
24-
v-if="shortPath.startsWith('#')"
25-
n="rose"
26-
v-text="'virtual'"
27-
/>
28-
<NBadge
29-
v-else-if="!shortPath.startsWith('.')"
30-
n="gray"
31-
v-text="'module'"
32-
/>
33-
<NBadge
34-
v-if="plugin.mode === 'server'"
35-
n="teal"
36-
v-text="'server'"
37-
/>
38-
<NBadge
39-
v-if="plugin.mode === 'client'"
40-
n="orange"
41-
v-text="'client'"
42-
/>
43-
</div>
21+
<FilepathItem :filepath="props.plugin.src" :subpath="true">
22+
<div>
23+
<NBadge
24+
v-if="shortPath.startsWith('#')"
25+
n="rose"
26+
v-text="'virtual'"
27+
/>
28+
<NBadge
29+
v-else-if="!shortPath.startsWith('.')"
30+
n="gray"
31+
v-text="'module'"
32+
/>
33+
<NBadge
34+
v-if="plugin.mode === 'server'"
35+
n="teal"
36+
v-text="'server'"
37+
/>
38+
<NBadge
39+
v-if="plugin.mode === 'client'"
40+
n="orange"
41+
v-text="'client'"
42+
/>
43+
</div>
44+
</FilepathItem>
45+
4446
<div v-if="plugin.metric?.duration != null" flex-auto text-right>
4547
<DurationDisplay :duration="plugin.metric?.duration" :factor="10" />
4648
</div>

0 commit comments

Comments
 (0)