1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-24 19:13:31 +03:00

Fix Typings

This commit is contained in:
Thomas Peterson 2022-03-29 18:43:32 +02:00
parent e223effe98
commit e2a74a2f6e
2 changed files with 6 additions and 10 deletions

View File

@ -14,19 +14,15 @@ export class SFTPCreateDirectoryModalComponent extends BaseComponent {
item: SFTPFile
panel: SFTPPanelComponent
directoryName: string
constructor (
private modalInstance: NgbActiveModal,
) {
super()
}
async ngOnInit (): Promise<void> {
}
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<void> {
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()
})
}
}

View File

@ -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'),
},