ref(tabby-terminal): remove deprecated Reconnectable interface

This commit is contained in:
Clem Fern 2023-05-16 19:13:00 +02:00
parent 89b3f3892e
commit 539ad0bddc
3 changed files with 2 additions and 26 deletions

View File

@ -9,7 +9,7 @@ import { BaseSession } from '../session'
import { Frontend } from '../frontends/frontend'
import { XTermFrontend, XTermWebGLFrontend } from '../frontends/xtermFrontend'
import { ResizeEvent, BaseTerminalProfile, isReconnectable } from './interfaces'
import { ResizeEvent, BaseTerminalProfile } from './interfaces'
import { TerminalDecorator } from './decorator'
import { SearchPanelComponent } from '../components/searchPanel.component'
import { MultifocusService } from '../services/multifocus.service'
@ -312,11 +312,6 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
case 'scroll-to-bottom':
this.frontend?.scrollToBottom()
break
case 'reconnect-tab':
if (isReconnectable(this)) {
this.reconnect()
}
break
}
})

View File

@ -19,21 +19,3 @@ export interface TerminalColorScheme {
export interface BaseTerminalProfile extends Profile {
terminalColorScheme?: TerminalColorScheme
}
/**
* Use ConnectableTerminalTab instead
* @deprecated
*/
export interface Reconnectable {
reconnect: () => Promise<void>;
}
/**
* Use ConnectableTerminalTab instead
* @deprecated
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function isReconnectable (object: any): object is Reconnectable {
return 'reconnect' in object
}

View File

@ -1,7 +1,6 @@
import { Injectable, Optional, Inject } from '@angular/core'
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent } from 'tabby-core'
import { BaseTerminalTabComponent } from './api/baseTerminalTab.component'
import { isReconnectable } from './api/interfaces'
import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
import { MultifocusService } from './services/multifocus.service'
import { ConnectableTerminalTabComponent } from './api/connectableTerminalTab.component'
@ -98,7 +97,7 @@ export class ReconnectContextMenu extends TabContextMenuItemProvider {
) { super() }
async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> {
if (isReconnectable(tab) || tab instanceof ConnectableTerminalTabComponent) {
if (tab instanceof ConnectableTerminalTabComponent) {
return [
{
label: this.translate.instant('Reconnect'),