Skip to content

Commit 631f9d1

Browse files
authored
fix: refactor docks grouping logic in ViewBuiltinSettings
I think Settings should not be added, because if the user selects it and then closes the panel, they will permanently lose access to Settings.
1 parent 2d5befc commit 631f9d1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/core/src/client/webcomponents/components/views-builtin/ViewBuiltinSettings.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ function setDockMode(mode: string) {
4343
}
4444
4545
const categories = computed(() => {
46-
return docksGroupByCategories(props.context.docks.entries, settingsStore.value(), { includeHidden: true })
46+
const grouped = docksGroupByCategories(props.context.docks.entries, settingsStore.value(), { includeHidden: true })
47+
return grouped
48+
.map(([category, entries]) => [category, entries.filter(e => e.id !== '~settings')] as const)
49+
.filter(([_, entries]) => entries.length > 0)
4750
})
4851
4952
function getCategoryLabel(category: string): string {

0 commit comments

Comments
 (0)