mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
lint
This commit is contained in:
parent
b2b91f0cfd
commit
a34e4c236d
@ -20,7 +20,7 @@ export class LinkHighlighterDecorator extends TerminalDecorator {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let handler of this.handlers) {
|
for (const handler of this.handlers) {
|
||||||
const getLink = async uri => handler.convert(uri, tab)
|
const getLink = async uri => handler.convert(uri, tab)
|
||||||
const openLink = async uri => handler.handle(await getLink(uri), tab)
|
const openLink = async uri => handler.handle(await getLink(uri), tab)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ export class URLHandler extends LinkHandler {
|
|||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
handle (uri: string) {
|
handle (uri: string): void {
|
||||||
this.platform.openExternal(uri)
|
this.platform.openExternal(uri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ export class IPHandler extends LinkHandler {
|
|||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
handle (uri: string) {
|
handle (uri: string): void {
|
||||||
this.platform.openExternal(`http://${uri}`)
|
this.platform.openExternal(`http://${uri}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -47,9 +47,9 @@ export class BaseFileHandler extends LinkHandler {
|
|||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|
||||||
async handle (uri: string) {
|
async handle (uri: string): Promise<void> {
|
||||||
try {
|
try {
|
||||||
await this.platform.openExternal('file://' + uri)
|
this.platform.openExternal('file://' + uri)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.toastr.error(err.toString())
|
this.toastr.error(err.toString())
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-extraneous-class */
|
||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
import { ToastrModule } from 'ngx-toastr'
|
import { ToastrModule } from 'ngx-toastr'
|
||||||
import { ConfigProvider } from 'tabby-core'
|
import { ConfigProvider } from 'tabby-core'
|
||||||
|
@ -6,7 +6,7 @@ export class X11Socket {
|
|||||||
private socket: Socket | null = null
|
private socket: Socket | null = null
|
||||||
|
|
||||||
static resolveDisplaySpec (spec?: string|null): SocketConnectOpts {
|
static resolveDisplaySpec (spec?: string|null): SocketConnectOpts {
|
||||||
// eslint-disable-next-line prefer-const
|
// eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars
|
||||||
let [_, xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? []
|
let [_, xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? []
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
xHost ??= 'localhost'
|
xHost ??= 'localhost'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user