mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-27 06:00:26 +08:00
feat: hotkey-restart-tab, remove restart menu
This commit is contained in:
parent
aa5970b12d
commit
c3abff56aa
@ -112,6 +112,10 @@ export class AppRootComponent {
|
||||
if (hotkey === 'duplicate-tab') {
|
||||
this.app.duplicateTab(this.app.activeTab)
|
||||
}
|
||||
if (hotkey === 'restart-tab') {
|
||||
this.app.duplicateTab(this.app.activeTab)
|
||||
this.app.closeTab(this.app.activeTab, true)
|
||||
}
|
||||
if (hotkey === 'explode-tab' && this.app.activeTab instanceof SplitTabComponent) {
|
||||
this.app.explodeTab(this.app.activeTab)
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ hotkeys:
|
||||
rearrange-panes:
|
||||
- 'Ctrl-Shift'
|
||||
duplicate-tab: []
|
||||
restart-tab: []
|
||||
explode-tab:
|
||||
- 'Ctrl-Shift-.'
|
||||
combine-tabs:
|
||||
|
@ -39,6 +39,7 @@ hotkeys:
|
||||
tab-10:
|
||||
- '⌘-0'
|
||||
duplicate-tab: []
|
||||
restart-tab: []
|
||||
explode-tab:
|
||||
- '⌘-Shift-.'
|
||||
combine-tabs:
|
||||
|
@ -22,6 +22,7 @@ hotkeys:
|
||||
rearrange-panes:
|
||||
- 'Ctrl-Shift'
|
||||
duplicate-tab: []
|
||||
restart-tab: []
|
||||
explode-tab:
|
||||
- 'Ctrl-Shift-.'
|
||||
combine-tabs:
|
||||
|
@ -56,6 +56,10 @@ export class AppHotkeyProvider extends HotkeyProvider {
|
||||
id: 'duplicate-tab',
|
||||
name: this.translate.instant('Duplicate tab'),
|
||||
},
|
||||
{
|
||||
id: 'restart-tab',
|
||||
name: this.translate.instant('Restart tab'),
|
||||
},
|
||||
{
|
||||
id: 'explode-tab',
|
||||
name: this.translate.instant('Turn current tab\'s panes into separate tabs'),
|
||||
|
@ -120,17 +120,6 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider {
|
||||
label: this.translate.instant('Duplicate'),
|
||||
click: () => this.app.duplicateTab(tab),
|
||||
},
|
||||
{
|
||||
label: this.translate.instant('Restart'),
|
||||
click: () => {
|
||||
this.app.duplicateTab(tab)
|
||||
if (this.app.tabs.includes(tab)) {
|
||||
this.app.closeTab(tab, true)
|
||||
} else {
|
||||
tab.destroy()
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.translate.instant('Color'),
|
||||
sublabel: currentColor ? this.translate.instant(currentColor) : undefined,
|
||||
|
Loading…
Reference in New Issue
Block a user