Skip to content

Commit 8b5607e

Browse files
authored
chore: adjust UI (#88)
1 parent 5ac7b62 commit 8b5607e

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

packages/devtools-vite/src/app/components/chart/ModuleFlamegraph.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ function buildFlamegraph() {
8989
duration: node.size,
9090
}
9191
},
92+
onLeave() {
93+
hoverNode.value = null
94+
},
9295
})
9396
el.value!.appendChild(flamegraph.value!.el)
9497
}

packages/devtools-vite/src/app/components/chart/PluginFlamegraph.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ function buildFlamegraph() {
127127
meta: node.meta,
128128
}
129129
},
130+
onLeave() {
131+
hoverNode.value = null
132+
},
130133
})
131134
el.value!.appendChild(flamegraph.value!.el)
132135
}

packages/devtools-vite/src/app/pages/session/[session].vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import type { ModuleListItem, SessionContext } from '~~/shared/types'
33
import { useRoute, useRouter } from '#app/composables/router'
44
import { useRpc } from '#imports'
5-
import { vOnClickOutside } from '@vueuse/components'
65
import { onKeyDown } from '@vueuse/core'
76
import { computed, onMounted, reactive, ref, shallowRef } from 'vue'
87
import { useSideNav } from '~/state/nav'
@@ -118,10 +117,10 @@ onMounted(async () => {
118117
<div
119118
v-if="route.query.module" fixed inset-0
120119
backdrop-blur-8 backdrop-brightness-95 z-panel-content
120+
@click.self="closeFlowPanel"
121121
>
122122
<div
123123
:key="(route.query.module as string)"
124-
v-on-click-outside="closeFlowPanel"
125124
fixed right-0 bottom-0 top-20 left-20 z-panel-content
126125
bg-glass border="l t base rounded-tl-xl"
127126
>
@@ -137,10 +136,10 @@ onMounted(async () => {
137136
<div
138137
v-if="route.query.asset" fixed inset-0
139138
backdrop-blur-8 backdrop-brightness-95 z-panel-content
139+
@click.self="closeAssetPanel"
140140
>
141141
<div
142142
:key="(route.query.asset as string)"
143-
v-on-click-outside="closeAssetPanel"
144143
fixed right-0 bottom-0 top-30 z-panel-content of-hidden
145144
bg-glass border="l t base rounded-tl-xl"
146145
class="left-20 xl:left-100 2xl:left-150"
@@ -155,10 +154,10 @@ onMounted(async () => {
155154
<div
156155
v-if="route.query.plugin" fixed inset-0
157156
backdrop-blur-8 backdrop-brightness-95 z-panel-content
157+
@click.self="closePluginPanel"
158158
>
159159
<div
160160
:key="(route.query.plugin as string)"
161-
v-on-click-outside="[closePluginPanel, { ignore: ['.module-type-filter'] }]"
162161
fixed right-0 bottom-0 top-20 left-20 z-panel-content
163162
bg-glass border="l t base rounded-tl-xl"
164163
>

packages/devtools-vite/src/app/pages/session/[session]/assets.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ const options = computed<GraphBaseOptions<AssetChartInfo | undefined>>(() => {
234234
onHover(node) {
235235
if (node && !route.query.asset)
236236
nodeHover.value = node
237+
if (node === null)
238+
nodeHover.value = undefined
237239
},
238240
onLeave() {
239241
nodeHover.value = undefined

0 commit comments

Comments
 (0)