Skip to content

Commit 86b4d3f

Browse files
author
Guillaume Chau
committed
feat: routing tab keyboard shortcut
1 parent 3871f23 commit 86b4d3f

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/devtools/App.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
Events
8282
</VueGroupButton>
8383
<GroupDropdown
84+
v-tooltip="$t('App.routing.tooltip')"
8485
:is-open="isRouterGroupOpen"
8586
:options="routingTabs"
8687
:value="routeModel"
@@ -204,9 +205,15 @@ export default {
204205
this.$router.push({ name: 'events' })
205206
return false
206207
} else if (code === 'Digit4') {
208+
if (this.$route.name !== 'router') {
209+
this.$router.push({ name: 'router' })
210+
} else {
211+
this.$router.push({ name: 'routes' })
212+
}
213+
} else if (code === 'Digit5') {
207214
this.$router.push({ name: 'perf' })
208215
return false
209-
} else if (code === 'Digit5') {
216+
} else if (code === 'Digit6') {
210217
this.$router.push({ name: 'settings' })
211218
return false
212219
} else if (key === 'p' || code === 'KeyP') {

src/devtools/locales/en.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ export default {
99
refresh: {
1010
tooltip: '[[{{keys.ctrl}}]] + [[{{keys.alt}}]] + [[R]] Force Refresh'
1111
},
12+
routing: {
13+
tooltip: '[[{{keys.ctrl}}]] + [[4]] Switch to Routing'
14+
},
1215
perf: {
13-
tooltip: '[[{{keys.ctrl}}]] + [[4]] Switch to Performance'
16+
tooltip: '[[{{keys.ctrl}}]] + [[5]] Switch to Performance'
1417
},
1518
settings: {
16-
tooltip: '[[{{keys.ctrl}}]] + [[5]] Switch to Settings'
19+
tooltip: '[[{{keys.ctrl}}]] + [[6]] Switch to Settings'
1720
},
1821
vuex: {
1922
tooltip: '[[{{keys.ctrl}}]] + [[2]] Switch to Vuex'

0 commit comments

Comments
 (0)