diff --git a/tabby-ssh/src/components/sftpCreateDirectoryModal.component.ts b/tabby-ssh/src/components/sftpCreateDirectoryModal.component.ts index 2f2a543c..64b27829 100644 --- a/tabby-ssh/src/components/sftpCreateDirectoryModal.component.ts +++ b/tabby-ssh/src/components/sftpCreateDirectoryModal.component.ts @@ -14,19 +14,15 @@ export class SFTPCreateDirectoryModalComponent extends BaseComponent { item: SFTPFile panel: SFTPPanelComponent directoryName: string - + constructor ( private modalInstance: NgbActiveModal, ) { super() } - async ngOnInit (): Promise { - - } - create (): void { - this.createDirectory(this.item.directory); + this.createDirectory(this.item.directory) } cancel (): void { this.modalInstance.close() @@ -34,9 +30,9 @@ export class SFTPCreateDirectoryModalComponent extends BaseComponent { async createDirectory (currentDirectory: string): Promise { this.sftp.mkdir(path.join(currentDirectory, this.directoryName)).finally(() => { - this.panel.navigate(path.join(currentDirectory, this.directoryName)); - this.cancel(); - }); + this.panel.navigate(path.join(currentDirectory, this.directoryName)) + this.cancel() + }) } } diff --git a/tabby-ssh/src/sftpContextMenu.ts b/tabby-ssh/src/sftpContextMenu.ts index 05b1c95b..8e8b5f9c 100644 --- a/tabby-ssh/src/sftpContextMenu.ts +++ b/tabby-ssh/src/sftpContextMenu.ts @@ -25,7 +25,7 @@ export class CommonSFTPContextMenu extends SFTPContextMenuItemProvider { return [ { click: async () => { - await this.createDirectory(item, panel); + await this.createDirectory(item, panel) }, label: this.translate.instant('Create Directory'), },