mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
lint
This commit is contained in:
@@ -31,7 +31,7 @@ export class Application {
|
||||
}
|
||||
}
|
||||
|
||||
init () {
|
||||
init (): void {
|
||||
electron.screen.on('display-metrics-changed', () => this.broadcast('host:display-metrics-changed'))
|
||||
}
|
||||
|
||||
@@ -52,20 +52,20 @@ export class Application {
|
||||
return window
|
||||
}
|
||||
|
||||
broadcast (event, ...args) {
|
||||
for (let window of this.windows) {
|
||||
broadcast (event: string, ...args): void {
|
||||
for (const window of this.windows) {
|
||||
window.send(event, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
async send (event, ...args) {
|
||||
async send (event: string, ...args): void {
|
||||
if (!this.hasWindows()) {
|
||||
await this.newWindow()
|
||||
}
|
||||
this.windows.filter(w => !w.isDestroyed())[0].send(event, ...args)
|
||||
}
|
||||
|
||||
enableTray () {
|
||||
enableTray (): void {
|
||||
if (this.tray) {
|
||||
return
|
||||
}
|
||||
@@ -90,18 +90,18 @@ export class Application {
|
||||
this.tray.setToolTip(`Terminus ${app.getVersion()}`)
|
||||
}
|
||||
|
||||
disableTray () {
|
||||
disableTray (): void {
|
||||
if (this.tray) {
|
||||
this.tray.destroy()
|
||||
this.tray = null
|
||||
}
|
||||
}
|
||||
|
||||
hasWindows () {
|
||||
hasWindows (): bool {
|
||||
return !!this.windows.length
|
||||
}
|
||||
|
||||
focus () {
|
||||
focus (): void {
|
||||
for (let window of this.windows) {
|
||||
window.show()
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { app } from 'electron'
|
||||
|
||||
export function parseArgs (argv, cwd) {
|
||||
export function parseArgs (argv: string[], cwd: string): any {
|
||||
if (argv[0].includes('node')) {
|
||||
argv = argv.slice(1)
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ export class Window {
|
||||
})
|
||||
}
|
||||
|
||||
setVibrancy (enabled: boolean, type?: string) {
|
||||
setVibrancy (enabled: boolean, type?: string): void {
|
||||
this.lastVibrancy = { enabled, type }
|
||||
if (process.platform === 'win32') {
|
||||
if (parseFloat(os.release()) >= 10) {
|
||||
@@ -140,22 +140,22 @@ export class Window {
|
||||
}
|
||||
}
|
||||
|
||||
show () {
|
||||
show (): void {
|
||||
this.window.show()
|
||||
}
|
||||
|
||||
focus () {
|
||||
focus (): void {
|
||||
this.window.focus()
|
||||
}
|
||||
|
||||
send (event, ...args) {
|
||||
send (event: string, ...args): void {
|
||||
if (!this.window) {
|
||||
return
|
||||
}
|
||||
this.window.webContents.send(event, ...args)
|
||||
}
|
||||
|
||||
isDestroyed () {
|
||||
isDestroyed (): void {
|
||||
return !this.window || this.window.isDestroyed()
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
import { NgModule } from '@angular/core'
|
||||
import { BrowserModule } from '@angular/platform-browser'
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
|
Reference in New Issue
Block a user