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