bug fixed
This commit is contained in:
parent
46faa2a675
commit
324e2228ed
|
@ -47,7 +47,11 @@ import {
|
|||
} from '@ucap-webmessenger/native';
|
||||
import { ElectronAppChannel } from '@ucap-webmessenger/electron-core';
|
||||
|
||||
import { autoUpdater, CancellationToken } from 'electron-updater';
|
||||
import {
|
||||
autoUpdater,
|
||||
CancellationToken,
|
||||
UpdateCheckResult
|
||||
} from 'electron-updater';
|
||||
import log from 'electron-log';
|
||||
|
||||
import { RendererUpdater } from './lib/renderer-updater';
|
||||
|
@ -124,6 +128,7 @@ let rendererUpdater: RendererUpdater | undefined;
|
|||
log.transports.file.level = 'debug';
|
||||
|
||||
let autoUpdaterCancellationToken: CancellationToken;
|
||||
let updateCheckResult: UpdateCheckResult;
|
||||
autoUpdater.autoDownload = false;
|
||||
autoUpdater.logger = log;
|
||||
|
||||
|
@ -299,6 +304,8 @@ app.on(ElectronAppChannel.Ready, () => {
|
|||
},
|
||||
onDenyUpdate: () => {
|
||||
log.info('OnDenyUpdate');
|
||||
|
||||
updateCheckResult.cancellationToken.cancel();
|
||||
updateWindowService.close();
|
||||
},
|
||||
onCancelDownload: () => {
|
||||
|
@ -353,19 +360,18 @@ function onDidLoad(fn: OnDidLoadFn) {
|
|||
}
|
||||
|
||||
ipcMain.on(UpdaterChannel.Apply, (event: IpcMainEvent, ...args: any[]) => {
|
||||
// if (__DEV__) {
|
||||
// event.returnValue = false;
|
||||
// return;
|
||||
// }
|
||||
if (!autoUpdater.isUpdaterActive()) {
|
||||
log.info('autoUpdater is not active');
|
||||
return;
|
||||
}
|
||||
|
||||
const ver = args[0];
|
||||
|
||||
if (semver.lt(app.getVersion(), ver)) {
|
||||
autoUpdater
|
||||
.checkForUpdatesAndNotify()
|
||||
.then(result => {})
|
||||
.catch(reason => {
|
||||
log.error(reason);
|
||||
updateCheckResult = undefined;
|
||||
autoUpdater.checkForUpdatesAndNotify().then(r => {
|
||||
log.debug('checkForUpdatesAndNotify.then');
|
||||
updateCheckResult = r;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -770,6 +776,8 @@ autoUpdater.on('update-not-available', info => {
|
|||
log.info('Update not available.');
|
||||
});
|
||||
autoUpdater.on('error', err => {
|
||||
updateWindowService.close();
|
||||
|
||||
log.info('Error in auto-updater. ' + err);
|
||||
});
|
||||
autoUpdater.on('download-progress', progressObj => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ucap-webmessenger",
|
||||
"version": "0.0.14",
|
||||
"version": "0.0.13",
|
||||
"author": {
|
||||
"name": "LG CNS",
|
||||
"email": "lgucap@lgcns.com"
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<div class="btn-area">
|
||||
<ucap-integrated-search-form
|
||||
*ngIf="!!loginRes"
|
||||
(search)="onIntegratedSearch($event)" class="input-lineless integrated-search">
|
||||
(search)="onIntegratedSearch($event)"
|
||||
class="input-lineless integrated-search"
|
||||
>
|
||||
</ucap-integrated-search-form>
|
||||
<div
|
||||
*ngIf="!!loginRes && !!weblink"
|
||||
|
@ -160,6 +162,7 @@
|
|||
*ngIf="!!loginRes"
|
||||
class="myprofile-item"
|
||||
[matMenuTriggerFor]="profileMenu"
|
||||
#profileMenuTrigger="matMenuTrigger"
|
||||
></ucap-profile-my-profile-widget>
|
||||
|
||||
<div class="app-layout-native-title-bar-actions">
|
||||
|
@ -498,7 +501,7 @@
|
|||
</span>
|
||||
<span class="version-info-button">
|
||||
<button
|
||||
*ngIf="checkingUpdateIsExist"
|
||||
|
||||
mat-flat-button
|
||||
class="mat-primary"
|
||||
(click)="onClickApplyUpdate($event)"
|
||||
|
|
|
@ -63,7 +63,7 @@ import {
|
|||
} from '@app/layouts/messenger/dialogs/profile/profile.dialog.component';
|
||||
import { DialogService } from '@ucap-webmessenger/ui';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
import { MatMenu, MatRadioChange } from '@angular/material';
|
||||
import { MatMenu, MatRadioChange, MatMenuTrigger } from '@angular/material';
|
||||
import { StatusCode, StatusType } from '@ucap-webmessenger/core';
|
||||
import {
|
||||
StatusInfo,
|
||||
|
@ -119,6 +119,9 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
|
||||
readonly awayTimeList = [10, 20, 30];
|
||||
|
||||
@ViewChild('profileMenuTrigger', { static: false })
|
||||
profileMenuTrigger: MatMenuTrigger;
|
||||
|
||||
@ViewChild('profileMenu', { static: true })
|
||||
profileMenu: MatMenu;
|
||||
|
||||
|
@ -558,7 +561,10 @@ export class TopBarComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
onClickApplyUpdate(event: Event) {
|
||||
// this.profileMenuTrigger.closeMenu();
|
||||
setTimeout(() => {
|
||||
this.nativeService.checkForUpdates(this.checkingUpdateAppVersion);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
onIntegratedSearch(keyword: string) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, ViewChild } from '@angular/core';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
import { StatusBulkInfo, StatusInfo } from '@ucap-webmessenger/protocol-status';
|
||||
import { StatusCode, PresenceType } from '@ucap-webmessenger/core';
|
||||
import { MatMenu, MatMenuTrigger } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'ucap-profile-my-profile-widget',
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
|
||||
export * from './lib/components/list-item.component';
|
||||
export * from './lib/components/my-profile-widget.component';
|
||||
export * from './lib/components/profile.component';
|
||||
export * from './lib/components/user-list-item.component';
|
||||
|
||||
export * from './lib/ucap-ui-profile.module';
|
||||
|
|
Loading…
Reference in New Issue
Block a user