Remote support is added

This commit is contained in:
Richard Park 2020-01-09 18:52:08 +09:00
parent ebc5744442
commit dfc03294bd
13 changed files with 2075 additions and 928 deletions

Binary file not shown.

View File

@ -54,7 +54,13 @@
"publisherName": "LGCNS",
"signingHashAlgorithms": ["sha1"],
"certificateFile": "./config/sign/www.lgcns.com.pfx",
"certificatePassword": "it15itsm"
"certificatePassword": "it15itsm",
"extraResources": [
{
"from": "./config/build/win/bin/AeroAdmin.exe",
"to": "./bin/AeroAdmin.exe"
}
]
},
"linux": {
"target": ["AppImage", "deb", "rpm", "zip", "tar.gz"],

View File

@ -11,6 +11,7 @@ import path from 'path';
import fse from 'fs-extra';
import semver from 'semver';
import os from 'os';
import ChildProcess from 'child_process';
import AutoLaunch from 'auto-launch';
@ -21,6 +22,7 @@ import { showUncaughtException } from './crash/show-uncaught-exception';
import {
UpdaterChannel,
FileChannel,
ProcessChannel,
IdleStateChannel,
NotificationChannel,
ChatChannel,
@ -609,6 +611,28 @@ ipcMain.on(
}
);
ipcMain.on(ProcessChannel.Execute, (event: IpcMainEvent, ...args: any[]) => {
try {
const executableName: string = args[0];
const binPath = __DEV__
? path.join(__dirname, '../../', 'config/build/win/bin/')
: path.join(__dirname, '..', '..', '/bin/');
const executablePath = __WIN32__
? path.join(binPath, `${executableName}.exe`)
: path.join(binPath, executableName);
const childProcess = ChildProcess.spawn(executablePath, [], {
stdio: ['ignore', 'ignore', 'ignore'],
detached: true
});
event.returnValue = childProcess.pid;
} catch (error) {
event.returnValue = undefined;
}
});
ipcMain.on(
IdleStateChannel.StartCheck,
(event: IpcMainEvent, ...args: any[]) => {

2855
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -42,40 +42,40 @@
},
"private": true,
"dependencies": {
"@angular/core": "~8.2.12",
"@angular/core": "^8.2.14",
"auto-launch": "^5.0.5",
"electron-log": "^3.0.9",
"electron-store": "^5.1.0",
"electron-updater": "^4.2.0",
"electron-window-state": "^5.0.3",
"fs-extra": "^8.1.0",
"rxjs": "^6.5.2",
"rxjs": "^6.5.4",
"semver": "^6.3.0",
"tslib": "^1.10.0"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^8.2.0",
"@angular-devkit/build-angular": "~0.803.14",
"@angular-devkit/build-ng-packagr": "~0.803.14",
"@angular/animations": "^8.2.12",
"@angular-builders/custom-webpack": "^8.4.1",
"@angular-devkit/build-angular": "^0.803.22",
"@angular-devkit/build-ng-packagr": "^0.803.22",
"@angular/animations": "^8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/cli": "~8.3.14",
"@angular/common": "~8.2.12",
"@angular/compiler": "~8.2.12",
"@angular/compiler-cli": "~8.2.12",
"@angular/cli": "^8.3.22",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/compiler-cli": "^8.2.14",
"@angular/flex-layout": "^8.0.0-beta.27",
"@angular/forms": "~8.2.12",
"@angular/language-service": "~8.2.12",
"@angular/forms": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@angular/material": "^8.2.3",
"@angular/material-moment-adapter": "^8.2.3",
"@angular/platform-browser": "~8.2.12",
"@angular/platform-browser-dynamic": "~8.2.12",
"@angular/router": "~8.2.12",
"@ngrx/effects": "^8.4.0",
"@ngrx/entity": "^8.4.0",
"@ngrx/router-store": "^8.4.0",
"@ngrx/store": "^8.4.0",
"@ngrx/store-devtools": "^8.4.0",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@ngrx/effects": "^8.6.0",
"@ngrx/entity": "^8.6.0",
"@ngrx/router-store": "^8.6.0",
"@ngrx/store": "^8.6.0",
"@ngrx/store-devtools": "^8.6.0",
"@ngx-translate/core": "^11.0.1",
"@types/auto-launch": "^5.0.1",
"@types/axios": "^0.14.0",
@ -86,40 +86,40 @@
"@types/electron-debug": "^2.1.0",
"@types/electron-devtools-installer": "^2.2.0",
"@types/extract-text-webpack-plugin": "^3.0.4",
"@types/fs-extra": "^8.0.0",
"@types/file-saver": "^2.0.1",
"@types/filesize": "^4.1.0",
"@types/fs-extra": "^8.0.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/jasminewd2": "^2.0.8",
"@types/moment-timezone": "^0.5.12",
"@types/node": "^10.14.22",
"@types/semver": "^6.0.2",
"@types/node": "^10.17.13",
"@types/semver": "^6.2.0",
"@types/uglifyjs-webpack-plugin": "^1.1.0",
"@types/webpack": "^4.39.5",
"@types/webpack": "^4.41.2",
"@types/webpack-merge": "^4.1.5",
"@types/webpack-node-externals": "^1.6.3",
"@types/webpack-node-externals": "^1.7.0",
"angular-split": "^3.0.2",
"autolinker": "^3.11.1",
"axios": "^0.19.0",
"awesome-node-loader": "^1.1.1",
"awesome-typescript-loader": "^5.2.1",
"axios": "^0.19.1",
"classlist.js": "^1.1.20150312",
"clean-webpack-plugin": "^3.0.0",
"clone": "^2.1.2",
"copy-webpack-plugin": "^5.0.4",
"codelyzer": "^5.0.0",
"codelyzer": "^5.2.1",
"concurrently": "^4.1.2",
"crypto-js": "^3.1.9-1",
"copy-webpack-plugin": "^5.1.1",
"cross-env": "^5.2.1",
"detect-browser": "^4.6.0",
"crypto-js": "^3.1.9-1",
"detect-browser": "^4.8.0",
"devtron": "^1.4.0",
"electron": "^7.1.7",
"electron": "^7.1.8",
"electron-builder": "^21.2.0",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"electron-reload": "^1.5.0",
"file-saver": "^2.0.2",
"filesize": "^4.1.2",
"filesize": "^4.2.1",
"hammerjs": "^2.0.8",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
@ -127,20 +127,20 @@
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-jasmine-html-reporter": "^1.5.1",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"ng-packagr": "^5.4.0",
"ng-packagr": "^5.7.1",
"ngrx-store-freeze": "^0.2.4",
"ngx-logger": "^4.0.5",
"ngx-logger": "^4.0.8",
"ngx-perfect-scrollbar": "^8.0.0",
"rimraf": "^3.0.0",
"npm-run-all": "^4.1.5",
"parallel-webpack": "^2.4.0",
"protractor": "~5.4.0",
"queueing-subject": "^0.3.4",
"rimraf": "^3.0.0",
"ts-node": "~7.0.0",
"tsickle": "^0.37.0",
"tsickle": "^0.37.1",
"tslib": "^1.10.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3",
@ -148,7 +148,7 @@
"wait-on": "^3.3.0",
"web-animations-js": "^2.3.2",
"webpack": "4.39.2",
"webpack-cli": "^3.3.7",
"webpack-cli": "^3.3.10",
"webpack-node-externals": "^1.7.2",
"zone.js": "~0.9.1"
},

View File

@ -282,6 +282,11 @@
{{ 'notice.label' | translate }}
</button>
</div>
<div class="setting">
<button mat-menu-item (click)="onClickRemoteSupport($event)">
{{ 'profile.remoteSupport' | translate }}
</button>
</div>
<div class="setting">
<button mat-menu-item (click)="onClickSettings()">
{{ 'settings.label' | translate }}

View File

@ -339,4 +339,8 @@ export class TopBarComponent implements OnInit, OnDestroy {
this.document.body.style.zoom = '120%';
}
onClickRemoteSupport(event: Event) {
this.nativeService.executeProcess('AeroAdmin');
}
}

View File

@ -48,6 +48,7 @@
"favorit": "Favorit",
"addBuddy": "Add a buddy",
"removeBuddy": "Remove a buddy",
"remoteSupport": "Remote support",
"fieldCompany": "Company",
"fieldResponsibilities": "Responsibilities",
"fieldWorkplace": "Workplace",

View File

@ -48,6 +48,7 @@
"favorit": "즐겨찾기",
"addBuddy": "동료추가",
"removeBuddy": "동료삭제",
"remoteSupport": "원격 지원",
"fieldCompany": "회사",
"fieldResponsibilities": "담당업무",
"fieldWorkplace": "근무지",

View File

@ -191,6 +191,12 @@ export class BrowserNativeService extends NativeService {
});
}
executeProcess(executableName: string): Promise<number> {
return new Promise<number>((resolve, reject) => {
resolve(-1);
});
}
windowStateChanged(): Observable<WindowState> {
return new Observable<WindowState>(subscriber => {
try {

View File

@ -21,7 +21,8 @@ import {
IdleStateChannel,
ChatChannel,
MessengerChannel,
MessageChannel
MessageChannel,
ProcessChannel
} from '../types/channel.type';
import { Injectable } from '@angular/core';
import { TranslateLoaderService } from '../translate/electron-loader';
@ -316,6 +317,18 @@ export class ElectronNativeService implements NativeService {
});
}
executeProcess(executableName: string): Promise<number> {
return new Promise<number>((resolve, reject) => {
try {
resolve(
this.ipcRenderer.sendSync(ProcessChannel.Execute, executableName)
);
} catch (error) {
reject(error);
}
});
}
windowStateChanged(): Observable<WindowState> {
if (!this.windowStateChangedSubject) {
this.windowStateChangedSubject = new Subject<WindowState>();

View File

@ -39,6 +39,10 @@ export enum FileChannel {
SelectSaveFilePath = 'UCAP::file::SelectSaveFilePath'
}
export enum ProcessChannel {
Execute = 'UCAP::process::execute'
}
export enum WindowStateChannel {
Changed = 'UCAP::windowState::windowStateChanged'
}

View File

@ -60,6 +60,8 @@ export abstract class NativeService {
abstract selectDirectory(): Promise<string>;
abstract selectSaveFilePath(defaultPath?: string): Promise<string>;
abstract executeProcess(executableName: string): Promise<number>;
abstract windowStateChanged(): Observable<WindowState>;
abstract windowClose(): void;
abstract windowMinimize(): void;