Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ import { sharedStateToRef } from '../../state/docks'
import DockEntry from './DockEntry.vue'
import DockGroupButton from './DockGroupButton.vue'

const props = defineProps<{
const props = withDefaults(defineProps<{
context: DocksContext
entries: DevToolsDockEntry[]
selected: DevToolsDockEntry | null
isVertical: boolean
}>()
dimInactive?: boolean
}>(), {
dimInactive: true,
})

const emit = defineEmits<{
(e: 'select', entry: DevToolsDockEntry): void
Expand Down Expand Up @@ -62,6 +65,7 @@ function toggleDockEntry(dock: DevToolsDockEntry) {
:group="dock"
:is-vertical="isVertical"
:selected="selected"
:dim-inactive="dimInactive"
@select="(e) => emit('select', e)"
/>
<DockEntry
Expand All @@ -70,7 +74,7 @@ function toggleDockEntry(dock: DevToolsDockEntry) {
:dock
:is-action="dock.type === 'action'"
:is-selected="selected?.id === dock.id"
:is-dimmed="selected ? (selected.id !== dock.id) : false"
:is-dimmed="dimInactive && selected ? (selected.id !== dock.id) : false"
:is-vertical="isVertical"
:badge="dock.badge"
@click="toggleDockEntry(dock)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ withDefaults(defineProps<{
selected: DevToolsDockEntry | null
isVertical: boolean
rotate?: boolean
dimInactive?: boolean
}>(), {
rotate: true,
dimInactive: true,
})

const emit = defineEmits<{
Expand All @@ -29,6 +31,7 @@ const emit = defineEmits<{
:entries="entries"
:is-vertical="isVertical && rotate"
:selected="selected"
:dim-inactive="dimInactive"
@select="(e) => emit('select', e)"
/>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ import { setDocksGroupPanel, useDocksGroupPanel } from '../../state/floating-too
import DockEntry from './DockEntry.vue'
import DockGroupPopover from './DockGroupPopover.vue'

const props = defineProps<{
const props = withDefaults(defineProps<{
context: DocksContext
group: DevToolsViewGroup
isVertical: boolean
selected: DevToolsDockEntry | null
}>()
dimInactive?: boolean
}>(), {
dimInactive: true,
})

const emit = defineEmits<{
(e: 'select', entry: DevToolsDockEntry): void
Expand Down Expand Up @@ -122,7 +125,7 @@ function onClick() {
:dock="group"
:is-vertical="isVertical"
:is-selected="isActive || isPanelVisible"
:is-dimmed="selected ? !isActive : false"
:is-dimmed="dimInactive && selected ? !isActive : false"
:badge="group.badge"
@click="onClick"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function switchEntry(id: string | undefined) {
:groups="groupedEntries"
:is-vertical="false"
:selected="context.docks.selected"
:dim-inactive="false"
@select="(e) => switchEntry(e?.id)"
>
<template #separator>
Expand Down
Loading