This commit is contained in:
Eugene Pankov
2020-04-20 11:25:20 +02:00
parent f8645df60c
commit d36ef2e48e
5 changed files with 9 additions and 9 deletions

View File

@@ -64,7 +64,7 @@ export class Application {
return window
}
onGlobalHotkey () {
onGlobalHotkey (): void {
if (this.windows.some(x => x.isFocused())) {
for (let window of this.windows) {
window.hide()
@@ -76,7 +76,7 @@ export class Application {
}
}
presentAllWindows() {
presentAllWindows (): void {
for (let window of this.windows) {
window.present()
}

View File

@@ -169,7 +169,7 @@ export class Window {
return this.window.isFocused()
}
hide () {
hide (): void {
if (process.platform === 'darwin') {
// Lose focus
Menu.sendActionToFirstResponder('hide:')
@@ -180,7 +180,7 @@ export class Window {
}
}
present () {
present (): void {
if (!this.window.isVisible()) {
// unfocused, invisible
this.window.show()

View File

@@ -250,7 +250,7 @@ export class HostAppService {
/**
* Notifies other windows of config file changes
*/
broadcastConfigChange (configStore: any): void {
broadcastConfigChange (configStore: {[k: string]: any}): void {
this.electron.ipcRenderer.send('app:config-change', configStore)
}

View File

@@ -88,9 +88,9 @@ export class WSLShellProvider extends ShellProvider {
if (!childKey.DistributionName) {
continue
}
const wslVersion = (childKey.Flags.value & 8) ? 2 : 1
const wslVersion = childKey.Flags.value & 8 ? 2 : 1
const name = childKey.DistributionName.value
const fsBase = (wslVersion === 2) ? `\\\\wsl$\\${name}` : (childKey.BasePath.value as string + '\\rootfs')
const fsBase = wslVersion === 2 ? `\\\\wsl$\\${name}` : childKey.BasePath.value as string + '\\rootfs'
const shell: Shell = {
id: `wsl-${slugify(name)}`,
name: `WSL / ${name}`,