mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
lint
This commit is contained in:
@@ -141,3 +141,4 @@ rules:
|
||||
'@typescript-eslint/consistent-type-exports': off
|
||||
'@typescript-eslint/consistent-generic-constructors': off
|
||||
'keyword-spacing': off
|
||||
'@typescript-eslint/keyword-spacing': off
|
||||
|
@@ -65,7 +65,7 @@ export class Application {
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
app.commandLine.appendSwitch('no-sandbox')
|
||||
if (((this.configStore.appearance || {}).opacity || 1) !== 1) {
|
||||
if ((this.configStore.appearance?.opacity || 1) !== 1) {
|
||||
app.commandLine.appendSwitch('enable-transparent-visuals')
|
||||
app.disableHardwareAcceleration()
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export class Application {
|
||||
async newWindow (options?: WindowOptions): Promise<Window> {
|
||||
const window = new Window(this, this.configStore, options)
|
||||
this.windows.push(window)
|
||||
if (this.windows.length === 1){
|
||||
if (this.windows.length === 1) {
|
||||
window.makeMain()
|
||||
}
|
||||
window.visible$.subscribe(visible => {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import * as fs from 'mz/fs'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import * as yaml from 'js-yaml'
|
||||
import { app } from 'electron'
|
||||
|
@@ -89,7 +89,7 @@ export class Window {
|
||||
}
|
||||
}
|
||||
|
||||
if ((this.configStore.appearance || {}).frame === 'native') {
|
||||
if (this.configStore.appearance?.frame === 'native') {
|
||||
bwOptions.frame = true
|
||||
} else {
|
||||
if (process.platform === 'darwin') {
|
||||
@@ -108,7 +108,7 @@ export class Window {
|
||||
this.window.once('ready-to-show', () => {
|
||||
if (process.platform === 'darwin') {
|
||||
this.window.setVibrancy(macOSVibrancyType)
|
||||
} else if (process.platform === 'win32' && (this.configStore.appearance || {}).vibrancy) {
|
||||
} else if (process.platform === 'win32' && this.configStore.appearance?.vibrancy) {
|
||||
this.setVibrancy(true)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user