mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-30 08:19:54 +00:00
fixed TerminalContextMenuProvider typing
This commit is contained in:
parent
8b64a819e7
commit
b799128427
@ -3,7 +3,7 @@ import { ToastrService } from 'ngx-toastr'
|
|||||||
import { ConfigService } from 'terminus-core'
|
import { ConfigService } from 'terminus-core'
|
||||||
import { UACService } from './services/uac.service'
|
import { UACService } from './services/uac.service'
|
||||||
import { TerminalService } from './services/terminal.service'
|
import { TerminalService } from './services/terminal.service'
|
||||||
import { TerminalTabComponent } from './components/terminalTab.component'
|
import { BaseTerminalTabComponent } from './components/baseTerminalTab.component'
|
||||||
import { TerminalContextMenuItemProvider } from './api'
|
import { TerminalContextMenuItemProvider } from './api'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -19,14 +19,14 @@ export class NewTabContextMenu extends TerminalContextMenuItemProvider {
|
|||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
async getItems (tab: TerminalTabComponent): Promise<Electron.MenuItemConstructorOptions[]> {
|
async getItems (tab: BaseTerminalTabComponent): Promise<Electron.MenuItemConstructorOptions[]> {
|
||||||
let shells = await this.terminalService.shells$.toPromise()
|
let shells = await this.terminalService.shells$.toPromise()
|
||||||
|
|
||||||
let items: Electron.MenuItemConstructorOptions[] = [
|
let items: Electron.MenuItemConstructorOptions[] = [
|
||||||
{
|
{
|
||||||
label: 'New terminal',
|
label: 'New terminal',
|
||||||
click: () => this.zone.run(() => {
|
click: () => this.zone.run(() => {
|
||||||
this.terminalService.openTabWithOptions(tab.sessionOptions)
|
this.terminalService.openTabWithOptions((tab as any).sessionOptions)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -84,7 +84,7 @@ export class CopyPasteContextMenu extends TerminalContextMenuItemProvider {
|
|||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
async getItems (tab: TerminalTabComponent): Promise<Electron.MenuItemConstructorOptions[]> {
|
async getItems (tab: BaseTerminalTabComponent): Promise<Electron.MenuItemConstructorOptions[]> {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: 'Copy',
|
label: 'Copy',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user