mirror of
https://github.com/Eugeny/tabby.git
synced 2025-04-18 16:20:27 +08:00
ref(tabby-terminal): remove deprecated Reconnectable interface
This commit is contained in:
parent
89b3f3892e
commit
539ad0bddc
@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user