Skip to content

Commit

Permalink
feat: state inspector: collapse all with shift too
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 24, 2022
1 parent a054381 commit dcaa51c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions packages/app-frontend/src/features/inspector/StateInspector.vue
Expand Up @@ -86,14 +86,16 @@ export default {
methods: {
toggle (dataType, currentExpanded, event = null) {
if (event) {
if (event.ctrlKey || event.metaKey) {
this.setExpandToAll(false)
this.$emit('collapse-all')
return
} else if (event.shiftKey) {
this.setExpandToAll(true)
this.$emit('expand-all')
return
if (event.shiftKey) {
if (currentExpanded) {
this.setExpandToAll(false)
this.$emit('collapse-all')
return
} else {
this.setExpandToAll(true)
this.$emit('expand-all')
return
}
}
}
Vue.set(this.expandedState, dataType, !currentExpanded)
Expand Down
2 changes: 1 addition & 1 deletion packages/app-frontend/src/locales/en.js
Expand Up @@ -24,7 +24,7 @@ export default {
},
StateInspector: {
dataType: {
tooltip: '[[{{keys.ctrl}}]] + <<mouse>>: Collapse All<br>[[{{keys.shift}}]] + <<mouse>>: Expand All',
tooltip: '[[{{keys.shift}}]] + <<mouse>>: Expand/Collapse All',
},
filter: {
tooltip: '[[{{keys.alt}}]] + [[D]] Filter state by name',
Expand Down

0 comments on commit dcaa51c

Please sign in to comment.