This commit is contained in:
Eugene Pankov
2021-12-08 20:38:16 +01:00
parent b2b91f0cfd
commit a34e4c236d
4 changed files with 7 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ export class LinkHighlighterDecorator extends TerminalDecorator {
return
}
for (let handler of this.handlers) {
for (const handler of this.handlers) {
const getLink = async uri => handler.convert(uri, tab)
const openLink = async uri => handler.handle(await getLink(uri), tab)

View File

@@ -19,7 +19,7 @@ export class URLHandler extends LinkHandler {
super()
}
handle (uri: string) {
handle (uri: string): void {
this.platform.openExternal(uri)
}
}
@@ -34,7 +34,7 @@ export class IPHandler extends LinkHandler {
super()
}
handle (uri: string) {
handle (uri: string): void {
this.platform.openExternal(`http://${uri}`)
}
}
@@ -47,9 +47,9 @@ export class BaseFileHandler extends LinkHandler {
super()
}
async handle (uri: string) {
async handle (uri: string): Promise<void> {
try {
await this.platform.openExternal('file://' + uri)
this.platform.openExternal('file://' + uri)
} catch (err) {
this.toastr.error(err.toString())
}

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-extraneous-class */
import { NgModule } from '@angular/core'
import { ToastrModule } from 'ngx-toastr'
import { ConfigProvider } from 'tabby-core'