Skip to content

Commit

Permalink
feat: add 'reveal-current-file-in-sidebar' feature to status bar navi…
Browse files Browse the repository at this point in the history
…gation
  • Loading branch information
purocean committed Apr 23, 2024
1 parent 9608fef commit 505bb04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/renderer/plugins/status-bar-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ export default {
ellipsis: true,
onClick: () => ctx.action.getActionHandler('workbench.show-quick-open')()
},
{
id: 'reveal-current-file-in-sidebar',
hidden: ctx.store.state.currentRepo?.name !== ctx.store.state.currentFile?.repo,
type: 'normal',
title: ctx.i18n.t('status-bar.nav.reveal-current-file-in-sidebar'),
subTitle: ctx.keybinding.getKeysLabel('tree.reveal-current-node'),
ellipsis: false,
onClick: () => ctx.action.getActionHandler('tree.reveal-current-node')()
},
{ type: 'separator' },
]
}
Expand Down
1 change: 1 addition & 0 deletions src/share/i18n/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ const data = {
'nav': {
'nav': 'Navigation',
'goto': 'Goto',
'reveal-current-file-in-sidebar': 'Reveal Current File in Sidebar',
'forward': 'Forward',
'back': 'Back',
},
Expand Down
1 change: 1 addition & 0 deletions src/share/i18n/languages/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ const data: BaseLanguage = {
'nav': {
'nav': '导航',
'goto': '快速跳转',
'reveal-current-file-in-sidebar': '在侧栏中显示当前文件',
'forward': '前进',
'back': '后退',
},
Expand Down

0 comments on commit 505bb04

Please sign in to comment.