fixed shell integration installed - fixes #4039

This commit is contained in:
Eugene Pankov 2021-06-27 11:27:45 +02:00
parent 77a2113411
commit 8a1a3ce002
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -8,6 +8,7 @@ import { Injectable, NgZone } from '@angular/core'
import { PlatformService, ClipboardContent, HostAppService, Platform, MenuItemOptions, MessageBoxOptions, MessageBoxResult, FileUpload, FileDownload, FileUploadOptions, wrapPromise } from 'terminus-core' import { PlatformService, ClipboardContent, HostAppService, Platform, MenuItemOptions, MessageBoxOptions, MessageBoxResult, FileUpload, FileDownload, FileUploadOptions, wrapPromise } from 'terminus-core'
import { ElectronService } from '../services/electron.service' import { ElectronService } from '../services/electron.service'
import { ElectronHostWindow } from './hostWindow.service' import { ElectronHostWindow } from './hostWindow.service'
import { ShellIntegrationService } from './shellIntegration.service'
const fontManager = require('fontmanager-redux') // eslint-disable-line const fontManager = require('fontmanager-redux') // eslint-disable-line
/* eslint-disable block-scoped-var */ /* eslint-disable block-scoped-var */
@ -29,6 +30,7 @@ export class ElectronPlatformService extends PlatformService {
private hostWindow: ElectronHostWindow, private hostWindow: ElectronHostWindow,
private electron: ElectronService, private electron: ElectronService,
private zone: NgZone, private zone: NgZone,
private shellIntegration: ShellIntegrationService,
) { ) {
super() super()
this.configPath = path.join(electron.app.getPath('userData'), 'config.yaml') this.configPath = path.join(electron.app.getPath('userData'), 'config.yaml')
@ -85,15 +87,15 @@ export class ElectronPlatformService extends PlatformService {
} }
async isShellIntegrationInstalled (): Promise<boolean> { async isShellIntegrationInstalled (): Promise<boolean> {
return false return this.shellIntegration.isInstalled()
} }
async installShellIntegration (): Promise<void> { async installShellIntegration (): Promise<void> {
throw new Error('Not implemented') await this.shellIntegration.install()
} }
async uninstallShellIntegration (): Promise<void> { async uninstallShellIntegration (): Promise<void> {
throw new Error('Not implemented') await this.shellIntegration.remove()
} }
async loadConfig (): Promise<string> { async loadConfig (): Promise<string> {