Skip to content

Commit

Permalink
feat(ui): sort items by file name (#5652)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored May 2, 2024
1 parent bdce0a2 commit 1f7268f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/client/composables/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ export const client = (function createVitestClient() {
}
})()

function sort(a: File, b: File) {
return a.name.localeCompare(b.name)
}

export const config = shallowRef<ResolvedConfig>({} as any)
export const status = ref<WebSocketStatus>('CONNECTING')
export const files = computed(() => client.state.getFiles())
export const files = computed(() => client.state.getFiles().sort(sort))
export const current = computed(() => files.value.find(file => file.id === activeFileId.value))
export const currentLogs = computed(() => getTasks(current.value).map(i => i?.logs || []).flat() || [])

Expand Down

0 comments on commit 1f7268f

Please sign in to comment.