mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
ref(tabby-terminal): remove deprecated Reconnectable interface
This commit is contained in:
@@ -9,7 +9,7 @@ import { BaseSession } from '../session'
|
|||||||
|
|
||||||
import { Frontend } from '../frontends/frontend'
|
import { Frontend } from '../frontends/frontend'
|
||||||
import { XTermFrontend, XTermWebGLFrontend } from '../frontends/xtermFrontend'
|
import { XTermFrontend, XTermWebGLFrontend } from '../frontends/xtermFrontend'
|
||||||
import { ResizeEvent, BaseTerminalProfile, isReconnectable } from './interfaces'
|
import { ResizeEvent, BaseTerminalProfile } from './interfaces'
|
||||||
import { TerminalDecorator } from './decorator'
|
import { TerminalDecorator } from './decorator'
|
||||||
import { SearchPanelComponent } from '../components/searchPanel.component'
|
import { SearchPanelComponent } from '../components/searchPanel.component'
|
||||||
import { MultifocusService } from '../services/multifocus.service'
|
import { MultifocusService } from '../services/multifocus.service'
|
||||||
@@ -312,11 +312,6 @@ export class BaseTerminalTabComponent<P extends BaseTerminalProfile> extends Bas
|
|||||||
case 'scroll-to-bottom':
|
case 'scroll-to-bottom':
|
||||||
this.frontend?.scrollToBottom()
|
this.frontend?.scrollToBottom()
|
||||||
break
|
break
|
||||||
case 'reconnect-tab':
|
|
||||||
if (isReconnectable(this)) {
|
|
||||||
this.reconnect()
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -19,21 +19,3 @@ export interface TerminalColorScheme {
|
|||||||
export interface BaseTerminalProfile extends Profile {
|
export interface BaseTerminalProfile extends Profile {
|
||||||
terminalColorScheme?: TerminalColorScheme
|
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 { Injectable, Optional, Inject } from '@angular/core'
|
||||||
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent } from 'tabby-core'
|
import { BaseTabComponent, TabContextMenuItemProvider, NotificationsService, MenuItemOptions, TranslateService, SplitTabComponent } from 'tabby-core'
|
||||||
import { BaseTerminalTabComponent } from './api/baseTerminalTab.component'
|
import { BaseTerminalTabComponent } from './api/baseTerminalTab.component'
|
||||||
import { isReconnectable } from './api/interfaces'
|
|
||||||
import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
|
import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
|
||||||
import { MultifocusService } from './services/multifocus.service'
|
import { MultifocusService } from './services/multifocus.service'
|
||||||
import { ConnectableTerminalTabComponent } from './api/connectableTerminalTab.component'
|
import { ConnectableTerminalTabComponent } from './api/connectableTerminalTab.component'
|
||||||
@@ -98,7 +97,7 @@ export class ReconnectContextMenu extends TabContextMenuItemProvider {
|
|||||||
) { super() }
|
) { super() }
|
||||||
|
|
||||||
async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> {
|
async getItems (tab: BaseTabComponent): Promise<MenuItemOptions[]> {
|
||||||
if (isReconnectable(tab) || tab instanceof ConnectableTerminalTabComponent) {
|
if (tab instanceof ConnectableTerminalTabComponent) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: this.translate.instant('Reconnect'),
|
label: this.translate.instant('Reconnect'),
|
||||||
|
Reference in New Issue
Block a user