1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-17 16:07:12 +03:00

Fix linting issues

This commit is contained in:
GeminiLn 2024-07-12 17:54:07 -07:00
parent 4a70ed4e73
commit 4c18e0d512
3 changed files with 16 additions and 16 deletions

View File

@ -258,7 +258,7 @@ export class AppHotkeyProvider extends HotkeyProvider {
{ {
id: 'toggle-sftp-pane', id: 'toggle-sftp-pane',
name: this.translate.instant('Toggle SFTP panel'), name: this.translate.instant('Toggle SFTP panel'),
} },
] ]
constructor ( constructor (

View File

@ -248,9 +248,9 @@ export class SFTPPanelComponent {
this.editingPath = null this.editingPath = null
} }
togglePinSFTPPanel() { togglePinSFTPPanel (): void {
this.pinSFTPPanel = !this.pinSFTPPanel; this.pinSFTPPanel = !this.pinSFTPPanel
this.pinStateChange.emit(this.pinSFTPPanel); this.pinStateChange.emit(this.pinSFTPPanel)
} }
close (): void { close (): void {

View File

@ -27,11 +27,11 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
sshSession: SSHSession|null = null sshSession: SSHSession|null = null
session: SSHShellSession|null = null session: SSHShellSession|null = null
sftpPanelVisible = false sftpPanelVisible = false
isSftpPanelPinned = false; isSftpPanelPinned = false
sftpPath = '/' sftpPath = '/'
enableToolbar = true enableToolbar = true
activeKIPrompt: KeyboardInteractivePrompt|null = null activeKIPrompt: KeyboardInteractivePrompt|null = null
@ViewChild(SFTPPanelComponent, { static: false }) sftpPanel: SFTPPanelComponent; @ViewChild(SFTPPanelComponent, { static: false }) sftpPanel: SFTPPanelComponent
constructor ( constructor (
injector: Injector, injector: Injector,
@ -223,25 +223,25 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
}, 100) }, 100)
} }
ngAfterViewChecked() { ngAfterViewChecked (): void {
if (this.sftpPanel && !this.sftpPanel.pinStateChange.observers.length) { if (!this.sftpPanel.pinStateChange.observers.length) {
this.subscribeToPinState(); this.subscribeToPinState()
} }
} }
subscribeToPinState() { subscribeToPinState (): void {
this.sftpPanel.pinStateChange.subscribe((isPinned: boolean) => { this.sftpPanel.pinStateChange.subscribe((isPinned: boolean) => {
this.isSftpPanelPinned = isPinned; this.isSftpPanelPinned = isPinned
}); })
this.sftpPanel.closed.subscribe(() => { this.sftpPanel.closed.subscribe(() => {
this.isSftpPanelPinned = false; this.isSftpPanelPinned = false
}); })
} }
@HostListener('click') @HostListener('click')
onClick(): void { onClick (): void {
if (!this.isSftpPanelPinned) { if (!this.isSftpPanelPinned) {
this.sftpPanelVisible = false; this.sftpPanelVisible = false
} }
} }