Skip to content

Commit

Permalink
fix(build-analyze): improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 17, 2023
1 parent 37f690b commit bd263ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/devtools/client/components/BuildAnalyzeDetails.vue
Expand Up @@ -24,7 +24,6 @@ const tabs = computed(() => {
})
const selectedTab = ref(tabs.value[0])
const openInEditor = useOpenInEditor()
function formatFileSize(bytes: number) {
if (bytes < 1024)
Expand Down Expand Up @@ -103,10 +102,14 @@ function formatDuration(build: AnalyzeBuildMeta) {
</div>
<div>{{ formatTimeAgo(new Date(current.endTime)) }}</div>
</div>
<div i-carbon:folder-parent text-xl />
<div>
<div text-sm op50>
Report Path
</div>
<FilepathItem :filepath="current.analyzeDir" />
</div>
</div>
<NButton n="primary" icon="carbon-launch" @click="openInEditor(current.analyzeDir)">
Open in Editor
</NButton>
<div flex-auto />
<NButton n="rose" icon="carbon-delete" @click="rpc.clearAnalyzeBuilds([current.name])">
Delete this report
Expand Down
1 change: 1 addition & 0 deletions packages/devtools/src/server-rpc/analyze-build.ts
Expand Up @@ -35,6 +35,7 @@ export function setupAnalyzeBuildRPC({ nuxt, refresh }: NuxtDevtoolsServerContex
.then(() => readBuildInfo())
.finally(() => {
promise = undefined
initalized = undefined
refresh('getAnalyzeBuildInfo')
})

Expand Down

0 comments on commit bd263ee

Please sign in to comment.