This commit is contained in:
Eugene Pankov
2022-12-05 14:52:23 +01:00
parent 2e9344f8b7
commit 73e25ed099
4 changed files with 6 additions and 5 deletions

View File

@@ -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

View File

@@ -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 => {

View File

@@ -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'

View File

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