diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts
index b8d3935b..73bbcf9e 100644
--- a/electron-projects/ucap-webmessenger-electron/src/index.ts
+++ b/electron-projects/ucap-webmessenger-electron/src/index.ts
@@ -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,20 +360,19 @@ 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 => {
diff --git a/package.json b/package.json
index 3f20a6b8..a2726d77 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ucap-webmessenger",
- "version": "0.0.14",
+ "version": "0.0.15",
"author": {
"name": "LG CNS",
"email": "lgucap@lgcns.com"
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss
index 555bb867..cc7b7a67 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.scss
@@ -174,11 +174,19 @@
}
}
-::ng-deep .chat-snackbar-class {
- .mat-simple-snackbar {
- justify-content: center;
- span {
- @include ellipsis(1);
+::ng-deep .cdk-global-overlay-wrapper {
+ .mat-snack-bar-container {
+ margin: 0;
+ padding: 30px;
+ .mat-simple-snackbar {
+ justify-content: center;
+ span {
+ @include ellipsis(1);
+ padding: 10px 40px;
+ border: 1px solid #ffffff;
+ background-color: rgb(255, 255, 255, 0.2);
+ color: #ffffff;
+ }
}
}
}
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts
index 1af9a30a..1ebcf98d 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts
@@ -970,13 +970,13 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
}
if (result.canceled) {
- this.snackBarService.open(
- this.translateService.instant('common.file.results.canceled'),
- this.translateService.instant('common.file.errors.label'),
- {
- duration: 1000
- }
- );
+ // this.snackBarService.open(
+ // this.translateService.instant('common.file.results.canceled'),
+ // this.translateService.instant('common.file.errors.label'),
+ // {
+ // duration: 1000
+ // }
+ // );
} else {
this.saveFile(value, result.filePath);
}
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html
index e7046c96..9110e07e 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html
@@ -66,10 +66,19 @@
+
+ {{ 'common.file.errors.cantPlay' | translate }}
+
- {{ selectedFile.info.name }}
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts
index f5045111..e8fc9e0d 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts
@@ -1,4 +1,11 @@
-import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
+import {
+ Component,
+ OnInit,
+ OnDestroy,
+ Inject,
+ ElementRef,
+ ViewChild
+} from '@angular/core';
import {
FileInfo,
FileDownloadInfo,
@@ -45,6 +52,9 @@ export interface FileInfoTotal {
styleUrls: ['./album-box.component.scss']
})
export class AlbumBoxComponent implements OnInit, OnDestroy {
+ @ViewChild('videoPlayer', { static: false })
+ videoPlayer: ElementRef;
+
filteredList: FileInfoTotal[] = [];
fileInfoTotal: FileInfoTotal[];
fileInfoList: FileInfo[];
@@ -62,6 +72,8 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
thumbBaseUrl: string;
+ playable = true;
+
constructor(
private store: Store,
private sessionStorageService: SessionStorageService,
@@ -186,6 +198,7 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
event.stopPropagation();
}
+ this.playable = true;
this.selectedFile = fileInfo;
}
@@ -323,4 +336,13 @@ export class AlbumBoxComponent implements OnInit, OnDestroy {
this.logger.error(reason);
});
}
+
+ onLoadedDataVideo(): void {
+ if (
+ 0 === this.videoPlayer.nativeElement.videoWidth ||
+ 0 === this.videoPlayer.nativeElement.videoHeight
+ ) {
+ this.playable = false;
+ }
+ }
}
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html
index e59e270a..3fcf99a9 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html
+++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.html
@@ -5,8 +5,10 @@
DS Talk
+ *ngIf="!!loginRes"
+ (search)="onIntegratedSearch($event)"
+ class="input-lineless integrated-search"
+ >
@@ -498,7 +501,7 @@
{{ playing ? 'pause' : 'play_arrow' }}
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.scss b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.scss
index 0e1f1c55..9b060d85 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.scss
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.scss
@@ -13,7 +13,7 @@
}
.ucap-video-viewer-title {
- font-size:16px;
+ font-size: 16px;
}
.stroke-bar {
width: 1px;
@@ -35,11 +35,17 @@
.ucap-video-viewer-video-icon {
width: 100%;
- height: calc(100% - 80px);
+ height: calc(100% - 80px);
+
+ .guide-msg {
+ font-size: 16px;
+ margin: 30px;
+ color: #ffffff;
+ }
}
- .viewer-bottom{
+ .viewer-bottom {
background-color: #212121;
- color:#ffffff;
+ color: #ffffff;
.ucap-video-viewer-video-time {
width: 100%;
height: 30px;
@@ -62,11 +68,11 @@
flex: 1 1 auto;
}
.ucap-video-viewer-action {
- .mat-icon{
+ .mat-icon {
font-size: 40px;
width: 100%;
height: 100%;
- line-height:40px;
+ line-height: 40px;
}
}
}
@@ -75,9 +81,11 @@ mat-slider {
width: 94%;
}
-::ng-deep .mat-slider-horizontal .mat-slider-track-background{
+::ng-deep .mat-slider-horizontal .mat-slider-track-background {
background-color: #999999 !important;
}
-::ng-deep .mat-slider-min-value:not(.mat-slider-thumb-label-showing) .mat-slider-thumb{
+::ng-deep
+ .mat-slider-min-value:not(.mat-slider-thumb-label-showing)
+ .mat-slider-thumb {
border-color: #999999 !important;
-}
\ No newline at end of file
+}
diff --git a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.ts
index a6c9c50c..38e9cd59 100644
--- a/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.ts
+++ b/projects/ucap-webmessenger-ui/src/lib/components/file-viewer/video-viewer.component.ts
@@ -33,7 +33,7 @@ export class VideoViewerComponent implements OnInit {
@Output()
closed = new EventEmitter();
- @ViewChild('audioPlayer', { static: true })
+ @ViewChild('audioPlayer', { static: false })
audioPlayer: ElementRef;
@ViewChild('timeSlider', { static: true })
@@ -49,6 +49,8 @@ export class VideoViewerComponent implements OnInit {
videoWidth = 0;
videoHeight = 0;
+ playable = true;
+
Math = Math;
constructor(
@@ -101,6 +103,11 @@ export class VideoViewerComponent implements OnInit {
this.videoWidth = this.audioPlayer.nativeElement.videoWidth;
this.videoHeight = this.audioPlayer.nativeElement.videoHeight;
+
+ if (0 === this.videoHeight || 0 === this.videoWidth) {
+ this.playable = false;
+ this.duration = 0;
+ }
}
onClickDownload(): void {