diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/index.ts index 53ac688b..17ab1479 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/index.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/index.ts @@ -2,14 +2,18 @@ import { IntroComponent } from './intro.component'; import { LeftSideComponent } from './left-side.component'; import { MessagesComponent } from './messages.component'; import { RightSideComponent } from './right-side.component'; +import { RightDrawerComponent } from './right-drawer.component'; import { LEFT_SIDENAV_COMPONENTS } from './left-sidenav'; +import { RIGHT_DRAWER_COMPONENTS } from './right-drawer'; export const COMPONENTS = [ IntroComponent, LeftSideComponent, MessagesComponent, RightSideComponent, + RightDrawerComponent, - ...LEFT_SIDENAV_COMPONENTS + ...LEFT_SIDENAV_COMPONENTS, + ...RIGHT_DRAWER_COMPONENTS ]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html index a8921446..7edc38e5 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.html @@ -27,7 +27,14 @@ [hasBackdrop]="false" > + + + 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 6e200e6d..5a051a2b 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 @@ -25,7 +25,7 @@ .chat-toolbar { width: 100%; height: 80px; - min-height: 70px; + min-height: 80px; align-items: center; background-color: #ffffff !important; border-bottom: 1px solid #dddddd; @@ -68,7 +68,7 @@ height: 20px; span { border-radius: 10px; - padding: 1px 10px; + padding: 2px 10px; margin-right: 6px; font-size: 13px; } 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 9c3e903a..2c3e2a0a 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 @@ -40,12 +40,14 @@ import * as AppStore from '@app/store'; import * as EventStore from '@app/store/messenger/event'; import * as ChatStore from '@app/store/messenger/chat'; import * as RoomStore from '@app/store/messenger/room'; +import * as SyncStore from '@app/store/messenger/sync'; import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO, - UserSelectDialogType + UserSelectDialogType, + RightDrawer } from '@app/types'; import { RoomInfo, UserInfo, RoomType } from '@ucap-webmessenger/protocol-room'; import { tap, take, map, catchError } from 'rxjs/operators'; @@ -84,6 +86,12 @@ import { EditChatRoomDialogResult, EditChatRoomDialogData } from '../dialogs/chat/edit-chat-room.dialog.component'; +import { + SelectGroupDialogComponent, + SelectGroupDialogResult, + SelectGroupDialogData +} from '../dialogs/group/select-group.dialog.component'; +import { GroupDetailData } from '@ucap-webmessenger/protocol-sync'; @Component({ selector: 'app-layout-messenger-messages', @@ -794,6 +802,24 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { async onClickContextMenu(menuType: string) { switch (menuType) { + case 'OPEN_ALBUM_LIST': + { + this.store.dispatch( + ChatStore.selectedRightDrawer({ + req: RightDrawer.AlbumBox + }) + ); + } + break; + case 'OPEN_FILE_LIST': + { + this.store.dispatch( + ChatStore.selectedRightDrawer({ + req: RightDrawer.FileBox + }) + ); + } + break; case 'ADD_MEMBER': { const result = await this.dialogService.open< @@ -838,6 +864,40 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { } } break; + case 'ADD_GROUP': + { + const result = await this.dialogService.open< + SelectGroupDialogComponent, + SelectGroupDialogData, + SelectGroupDialogResult + >(SelectGroupDialogComponent, { + width: '600px', + data: { + title: 'Group Select' + } + }); + + if (!!result && !!result.choice && result.choice) { + if (!!result.group) { + const oldGroup: GroupDetailData = result.group; + const trgtUserSeq: number[] = []; + result.group.userSeqs.map(seq => trgtUserSeq.push(seq)); + this.userInfoList + .filter(v => result.group.userSeqs.indexOf(v.seq) < 0) + .forEach(user => { + trgtUserSeq.push(user.seq); + }); + + this.store.dispatch( + SyncStore.updateGroupMember({ + oldGroup, + trgtUserSeq + }) + ); + } + } + } + break; case 'EDIT_ROOM': { const result = await this.dialogService.open< diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.html new file mode 100644 index 00000000..0337b70b --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.spec.ts new file mode 100644 index 00000000..0db929d6 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RightDrawerComponent } from './right-drawer.component'; + +describe('RightDrawerComponent', () => { + let component: RightDrawerComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RightDrawerComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RightDrawerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts new file mode 100644 index 00000000..0b0f4893 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts @@ -0,0 +1,18 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { RightDrawer } from '@app/types'; + +@Component({ + selector: 'app-layout-messenger-right-drawer', + templateUrl: './right-drawer.component.html', + styleUrls: ['./right-drawer.component.scss'] +}) +export class RightDrawerComponent implements OnInit { + @Input() + selectedRightDrawer: RightDrawer; + + RightDrawer = RightDrawer; + + constructor() {} + + ngOnInit() {} +} 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 new file mode 100644 index 00000000..26983003 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.html @@ -0,0 +1 @@ +

album-box works!

diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.spec.ts new file mode 100644 index 00000000..e3f18dc0 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AlbumBoxComponent } from './album-box.component'; + +describe('AlbumBoxComponent', () => { + let component: AlbumBoxComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AlbumBoxComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AlbumBoxComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..e4737472 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/album-box.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-layout-chat-right-drawer-album-box', + templateUrl: './album-box.component.html', + styleUrls: ['./album-box.component.scss'] +}) +export class AlbumBoxComponent implements OnInit { + constructor() {} + + ngOnInit() {} +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html new file mode 100644 index 00000000..e361c50b --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.html @@ -0,0 +1 @@ +

file-box works!

diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.spec.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.spec.ts new file mode 100644 index 00000000..2f2d4ef3 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FileBoxComponent } from './file-box.component'; + +describe('FileBoxComponent', () => { + let component: FileBoxComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ FileBoxComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FileBoxComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts new file mode 100644 index 00000000..dd06f32f --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/file-box.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-layout-chat-right-drawer-file-box', + templateUrl: './file-box.component.html', + styleUrls: ['./file-box.component.scss'] +}) +export class FileBoxComponent implements OnInit { + constructor() {} + + ngOnInit() {} +} diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/index.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/index.ts new file mode 100644 index 00000000..dc7431d2 --- /dev/null +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/index.ts @@ -0,0 +1,4 @@ +import { FileBoxComponent } from './file-box.component'; +import { AlbumBoxComponent } from './album-box.component'; + +export const RIGHT_DRAWER_COMPONENTS = [FileBoxComponent, AlbumBoxComponent]; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss index 2c156946..2452c863 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.scss @@ -76,3 +76,6 @@ } } } +.mat-tab-group>.mat-tab-header .mat-tab-label{ + border-bottom:2px solid #dddddd; +} \ No newline at end of file diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html index 72e84557..dff20e2b 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.html @@ -5,12 +5,11 @@ > - +
+ + + + + + + + + + + + + + {{ fileInfo.fileName }} - +
@@ -41,43 +61,52 @@ (loadeddata)="onLoadedDataVideo()" >
-
- +
- -
-
-
- {{ currentTime | ucapSecondsToMinutes }} + +
- - - -
- {{ duration | ucapSecondsToMinutes }} +
+ {{ currentTime | ucapSecondsToMinutes }} +
+ + + +
+ {{ duration | ucapSecondsToMinutes }} +
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 7ad92977..0e1f1c55 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 @@ -4,40 +4,57 @@ .ucap-video-viewer-header { width: 100%; - height: 50px; + height: 60px; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6); + background-color: #333333; .ucap-video-viewer-icon { + margin-right: 10px; } .ucap-video-viewer-title { + font-size:16px; + } + .stroke-bar { + width: 1px; + height: 30px; + background-color: rgba(256, 256, 256, 0.3); + margin: 0 10px; + } + .ucap-image-viewer-action { + &:hover { + opacity: 0.7; + } } } .ucap-video-viewer-body { position: relative; - background-color: white; width: 100%; - height: 100%; - padding-bottom: 70px; + height: calc(100% - 60px); .ucap-video-viewer-video-icon { width: 100%; - height: calc(100% - 60px); + height: calc(100% - 80px); } - .ucap-video-viewer-video-time { - width: 100%; - height: 30px; - } - .ucap-video-viewer-video-controls { - width: 100%; - height: 30px; - - .ucap-video-viewer-video-time-current { - padding-left: 30px; + .viewer-bottom{ + background-color: #212121; + color:#ffffff; + .ucap-video-viewer-video-time { + width: 100%; + height: 30px; } + .ucap-video-viewer-video-controls { + width: 100%; + height: 50px; - .ucap-video-viewer-video-time-total { - padding-right: 30px; + .ucap-video-viewer-video-time-current { + padding-left: 30px; + } + + .ucap-video-viewer-video-time-total { + padding-right: 30px; + } } } } @@ -45,9 +62,22 @@ flex: 1 1 auto; } .ucap-video-viewer-action { + .mat-icon{ + font-size: 40px; + width: 100%; + height: 100%; + line-height:40px; + } } } mat-slider { - width: 95%; + width: 94%; } + +::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{ + border-color: #999999 !important; +} \ No newline at end of file