From d47dd78e4bb25654997c9ef10cde5d05d0de0281 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 13:55:54 +0900 Subject: [PATCH 01/10] zooming is implemented --- .../ucap-webmessenger-electron/src/index.ts | 3 +- .../native/components/top-bar.component.html | 21 +++-- .../native/components/top-bar.component.ts | 45 +++++++++-- .../components/main.page.component.ts | 4 +- .../src/app/resolvers/messenger.resolver.ts | 1 + .../app/services/authentication.service.ts | 1 + .../src/app/store/messenger/status/state.ts | 7 +- .../src/app/store/setting/index.ts | 11 ++- .../src/app/store/setting/init/effects.ts | 1 + .../src/app/store/setting/native/actions.ts | 17 ++++ .../src/app/store/setting/native/effects.ts | 77 +++++++++++++++++++ .../src/app/store/setting/native/index.ts | 4 + .../src/app/store/setting/native/reducers.ts | 13 ++++ .../src/app/store/setting/native/state.ts | 16 ++++ .../src/app/types/app-user-info.type.ts | 1 + .../lib/services/browser-native.service.ts | 6 ++ .../lib/services/electron-native.service.ts | 15 +++- .../src/lib/services/native.service.ts | 1 + .../src/lib/components/chat.component.html | 4 +- .../inline-edit-input.component.html | 25 ++++++ .../inline-edit-input.component.scss | 7 ++ .../inline-edit-input.component.spec.ts | 25 ++++++ .../components/inline-edit-input.component.ts | 33 ++++++++ .../src/lib/ucap-ui.module.ts | 2 + .../ucap-webmessenger-ui/src/public-api.ts | 1 + 25 files changed, 312 insertions(+), 29 deletions(-) create mode 100644 projects/ucap-webmessenger-app/src/app/store/setting/native/actions.ts create mode 100644 projects/ucap-webmessenger-app/src/app/store/setting/native/effects.ts create mode 100644 projects/ucap-webmessenger-app/src/app/store/setting/native/index.ts create mode 100644 projects/ucap-webmessenger-app/src/app/store/setting/native/reducers.ts create mode 100644 projects/ucap-webmessenger-app/src/app/store/setting/native/state.ts create mode 100644 projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.html create mode 100644 projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.scss create mode 100644 projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.spec.ts create mode 100644 projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index a825c3e7..ca04b864 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -5,7 +5,8 @@ import { Tray, Menu, shell, - dialog + dialog, + webFrame } from 'electron'; import path from 'path'; import fse from 'fs-extra'; 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 6195f3e7..62a1a776 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 @@ -274,14 +274,14 @@ {{ 'profile.open' | translate }} - +
- + (click)="$event.stopPropagation(); statusMessage1.editMode = true" + > -->
+ + + + + + + + + + diff --git a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.scss b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.scss new file mode 100644 index 00000000..130eb13d --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.scss @@ -0,0 +1,7 @@ +.view-actions { + margin-right: 0px; +} + +.edit-actions { + margin-right: 0px; +} diff --git a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.spec.ts b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.spec.ts new file mode 100644 index 00000000..747d03dc --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.spec.ts @@ -0,0 +1,25 @@ +/* tslint:disable:no-unused-variable */ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InlineEditInputComponent } from './inline-edit-input.component'; + +describe('InlineEditInputComponent', () => { + let component: InlineEditInputComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [InlineEditInputComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(InlineEditInputComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts new file mode 100644 index 00000000..1796dace --- /dev/null +++ b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts @@ -0,0 +1,33 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'ucap-inline-edit-input', + templateUrl: './inline-edit-input.component.html', + styleUrls: ['./inline-edit-input.component.scss'] +}) +export class InlineEditInputComponent implements OnInit { + get editMode() { + return this._editMode; + } + set editMode(editMode: boolean) { + this._editMode = editMode; + } + // tslint:disable-next-line: variable-name + _editMode = false; + + constructor() {} + + ngOnInit() {} + + onClickEdit(event: Event) { + this.editMode = true; + } + + onClickCancel(event: Event) { + this.editMode = false; + } + + onClickApply(event: Event) { + this.editMode = false; + } +} diff --git a/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts b/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts index f5195542..1510db10 100644 --- a/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts +++ b/projects/ucap-webmessenger-ui/src/lib/ucap-ui.module.ts @@ -38,6 +38,7 @@ import { PickDateComponent } from './components/pick-date.component'; import { PickTimeComponent } from './components/pick-time.component'; import { StepInputComponent } from './components/step-input.component'; import { StickerSelectorComponent } from './components/sticker-selector.component'; +import { InlineEditInputComponent } from './components/inline-edit-input.component'; import { BinaryViewerComponent } from './components/file-viewer/binary-viewer.component'; import { DocumentViewerComponent } from './components/file-viewer/document-viewer.component'; @@ -88,6 +89,7 @@ const COMPONENTS = [ PickTimeComponent, StepInputComponent, TranslationSectionComponent, + InlineEditInputComponent, BinaryViewerComponent, DocumentViewerComponent, diff --git a/projects/ucap-webmessenger-ui/src/public-api.ts b/projects/ucap-webmessenger-ui/src/public-api.ts index 7a509dfa..4ad82c07 100644 --- a/projects/ucap-webmessenger-ui/src/public-api.ts +++ b/projects/ucap-webmessenger-ui/src/public-api.ts @@ -18,6 +18,7 @@ export * from './lib/components/pick-time.component'; export * from './lib/components/step-input.component'; export * from './lib/components/split-button.component'; export * from './lib/components/sticker-selector.component'; +export * from './lib/components/inline-edit-input.component'; export * from './lib/data-source/virtual-scroll-tree-flat.data-source'; From 993003ef608547f5cf36eb5c21c7c9d5ba0b3ecb Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 14:54:25 +0900 Subject: [PATCH 02/10] changing of status message is implemented --- .../native/components/top-bar.component.html | 85 +++++++++---------- .../native/components/top-bar.component.ts | 36 ++++++++ .../store/account/authentication/actions.ts | 18 ++++ .../store/account/authentication/effects.ts | 27 +++++- .../store/account/authentication/reducers.ts | 55 +++++++++++- .../src/lib/types/user-info-update.type.ts | 8 +- .../components/inline-edit-input.component.ts | 6 +- 7 files changed, 187 insertions(+), 48 deletions(-) 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 62a1a776..17aa367e 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 @@ -335,41 +335,55 @@ -
-
-
@@ -377,28 +391,11 @@
{{ 'presence.settingOfAwayTime' | translate }}
-
- 10{{ 'common.units.minute' | translate }} -
-
- 20{{ 'common.units.minute' | translate }} -
-
- 30{{ 'common.units.minute' | translate }} -
+ +
+ + {{ awayTime }}{{ 'common.units.minute' | translate }} +
+
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts index 253bb848..7e33245a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts @@ -60,6 +60,7 @@ import { DOCUMENT } from '@angular/common'; import { MatMenu, MatRadioChange } from '@angular/material'; import { StatusCode, StatusType } from '@ucap-webmessenger/core'; import { StatusInfo } from '@ucap-webmessenger/protocol-status'; +import { UserInfoUpdateType } from '@ucap-webmessenger/protocol-info'; const zoomFactors = [60, 70, 85, 100, 120, 145, 170, 200]; @@ -95,6 +96,8 @@ export class TopBarComponent implements OnInit, OnDestroy { WebLinkType = WebLinkType; StatusCode = StatusCode; + readonly awayTimeList = [10, 20, 30]; + @ViewChild('profileMenu', { static: true }) profileMenu: MatMenu; @@ -169,12 +172,19 @@ export class TopBarComponent implements OnInit, OnDestroy { ngOnDestroy(): void { if (!!this.loginResSubscription) { this.loginResSubscription.unsubscribe(); + this.loginResSubscription = undefined; } if (!!this.myStatusSubscription) { this.myStatusSubscription.unsubscribe(); + this.myStatusSubscription = undefined; } if (!!this.myIdleCheckTimeSubscription) { this.myIdleCheckTimeSubscription.unsubscribe(); + this.myIdleCheckTimeSubscription = undefined; + } + if (!!this.zoomSubscription) { + this.zoomSubscription.unsubscribe(); + this.zoomSubscription = undefined; } } @@ -452,6 +462,32 @@ export class TopBarComponent implements OnInit, OnDestroy { ); } + onApplyStatusMessage(index: number, statusMessage: string) { + this.logger.debug('StatusMessage', index, statusMessage); + + let updateType: UserInfoUpdateType; + switch (index) { + case 1: + updateType = UserInfoUpdateType.StatusMessage1; + break; + case 2: + updateType = UserInfoUpdateType.StatusMessage2; + break; + case 3: + updateType = UserInfoUpdateType.StatusMessage3; + break; + + default: + return; + } + + this.store.dispatch( + AuthenticationStore.infoUser({ + req: { type: updateType, info: statusMessage } + }) + ); + } + onClickChangeStatusBusy(event: Event, index: number) { event.stopPropagation(); } diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts index c0e6456c..cd3a61d6 100644 --- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts +++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts @@ -8,6 +8,7 @@ import { UserPasswordSetRequest, UserPasswordSetResponse } from '@ucap-webmessenger/protocol-service'; +import { UserRequest, UserResponse } from '@ucap-webmessenger/protocol-info'; export const webLogin = createAction( '[Account::Authentication] Web Login', @@ -122,3 +123,20 @@ export const updateLoginRes = createAction( loginRes: LoginResponse; }>() ); + +export const infoUser = createAction( + '[Account::Authentication] Info User', + props<{ req: UserRequest }>() +); + +export const infoUserSuccess = createAction( + '[Account::Authentication] Info User Success', + props<{ + res: UserResponse; + }>() +); + +export const infoUserFailure = createAction( + '[Account::Authentication] Info User Failure', + props<{ error: any }>() +); diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts index 2f3d1186..3926db44 100644 --- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts @@ -41,7 +41,10 @@ import { logoutInitialize, userPasswordSet, userPasswordSetSuccess, - userPasswordSetFailure + userPasswordSetFailure, + infoUser, + infoUserSuccess, + infoUserFailure } from './actions'; import { LoginInfo, @@ -77,6 +80,10 @@ import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external'; import { AppUserInfo, KEY_APP_USER_INFO } from '@app/types/app-user-info.type'; import { DaesangCipherService, WebLinkType } from '@ucap-webmessenger/daesang'; import { TranslateService } from '@ngx-translate/core'; +import { + InfoProtocolService, + UserResponse +} from '@ucap-webmessenger/protocol-info'; @Injectable() export class Effects { @@ -482,6 +489,23 @@ export class Effects { { dispatch: false } ); + infoUser$ = createEffect(() => + this.actions$.pipe( + ofType(infoUser), + map(action => action.req), + exhaustMap(req => + this.infoProtocolService.user(req).pipe( + map((res: UserResponse) => { + return infoUserSuccess({ + res + }); + }), + catchError(error => of(infoUserFailure({ error }))) + ) + ) + ) + ); + constructor( private actions$: Actions, private ngZone: NgZone, @@ -493,6 +517,7 @@ export class Effects { private appAuthenticationService: AppAuthenticationService, private protocolService: ProtocolService, private authenticationProtocolService: AuthenticationProtocolService, + private infoProtocolService: InfoProtocolService, private serviceProtocolService: ServiceProtocolService, private translateService: TranslateService, private dialogService: DialogService, diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts index 9b305d30..7429a773 100644 --- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts +++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts @@ -6,8 +6,10 @@ import { initialLoginFailCount, logout, logoutInitialize, - updateLoginRes + updateLoginRes, + infoUserSuccess } from './actions'; +import { UserInfoUpdateType } from '@ucap-webmessenger/protocol-info'; export const reducer = createReducer( initialState, @@ -39,6 +41,57 @@ export const reducer = createReducer( }; }), + on(infoUserSuccess, (state, action) => { + let loginRes = { + ...state.loginRes + }; + + switch (action.res.type) { + case UserInfoUpdateType.Image: + loginRes = { + ...loginRes + }; + break; + case UserInfoUpdateType.Intro: + loginRes = { + ...loginRes + }; + break; + case UserInfoUpdateType.TelephoneVisible: + loginRes = { + ...loginRes + }; + break; + case UserInfoUpdateType.StatusMessage1: + loginRes = { + ...loginRes, + statusMessage1: action.res.info + }; + break; + case UserInfoUpdateType.StatusMessage2: + loginRes = { + ...loginRes, + statusMessage2: action.res.info + }; + break; + case UserInfoUpdateType.StatusMessage3: + loginRes = { + ...loginRes, + statusMessage3: action.res.info + }; + break; + default: + break; + } + + return { + ...state, + loginRes: { + ...loginRes + } + }; + }), + on(logoutInitialize, (state, action) => { return { ...initialState diff --git a/projects/ucap-webmessenger-protocol-info/src/lib/types/user-info-update.type.ts b/projects/ucap-webmessenger-protocol-info/src/lib/types/user-info-update.type.ts index a2496524..fb25bcf8 100644 --- a/projects/ucap-webmessenger-protocol-info/src/lib/types/user-info-update.type.ts +++ b/projects/ucap-webmessenger-protocol-info/src/lib/types/user-info-update.type.ts @@ -4,7 +4,13 @@ export enum UserInfoUpdateType { // R: 인트로소개 Intro = 'R', // T: 전화보이기여부 - TelephoneVisible = 'T' + TelephoneVisible = 'T', + /** StatusMessage1 */ + StatusMessage1 = 'S1', + /** StatusMessage2 */ + StatusMessage2 = 'S2', + /** StatusMessage3 */ + StatusMessage3 = 'S3' } export enum TelephoneVisibleType { diff --git a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts index 1796dace..56ea1bbd 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'ucap-inline-edit-input', @@ -6,6 +6,9 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./inline-edit-input.component.scss'] }) export class InlineEditInputComponent implements OnInit { + @Output() + apply = new EventEmitter(); + get editMode() { return this._editMode; } @@ -29,5 +32,6 @@ export class InlineEditInputComponent implements OnInit { onClickApply(event: Event) { this.editMode = false; + this.apply.emit(); } } From 9561dcbe80ed4d39481538ea6ca26078d3252437 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 15:17:58 +0900 Subject: [PATCH 03/10] bug fixed --- .../native/components/top-bar.component.html | 27 ++++++++++++++----- .../components/inline-edit-input.component.ts | 10 +++++-- 2 files changed, 29 insertions(+), 8 deletions(-) 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 17aa367e..2063a3da 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 @@ -335,8 +335,12 @@ @@ -353,8 +358,12 @@ @@ -371,8 +381,12 @@ diff --git a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts index 56ea1bbd..633108a5 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts +++ b/projects/ucap-webmessenger-ui/src/lib/components/inline-edit-input.component.ts @@ -7,7 +7,11 @@ import { Component, OnInit, Output, EventEmitter } from '@angular/core'; }) export class InlineEditInputComponent implements OnInit { @Output() - apply = new EventEmitter(); + edit = new EventEmitter(); + @Output() + cancel = new EventEmitter(); + @Output() + apply = new EventEmitter(); get editMode() { return this._editMode; @@ -24,14 +28,16 @@ export class InlineEditInputComponent implements OnInit { onClickEdit(event: Event) { this.editMode = true; + this.edit.emit(event); } onClickCancel(event: Event) { this.editMode = false; + this.cancel.emit(event); } onClickApply(event: Event) { this.editMode = false; - this.apply.emit(); + this.apply.emit(event); } } From 34e8db65b4509c2316f54f2ae484d40ea589e534 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 15:41:35 +0900 Subject: [PATCH 04/10] app version is added --- .../ucap-webmessenger-electron/src/index.ts | 7 +++++++ .../layouts/native/components/top-bar.component.html | 12 ++++++++++++ .../layouts/native/components/top-bar.component.ts | 6 ++++++ .../ucap-webmessenger-app/src/assets/i18n/en.json | 4 ++++ .../ucap-webmessenger-app/src/assets/i18n/ko.json | 4 ++++ .../src/lib/services/browser-native.service.ts | 6 ++++++ .../src/lib/services/electron-native.service.ts | 10 ++++++++++ .../src/lib/types/channel.type.ts | 3 ++- .../src/lib/services/native.service.ts | 1 + 9 files changed, 52 insertions(+), 1 deletion(-) diff --git a/electron-projects/ucap-webmessenger-electron/src/index.ts b/electron-projects/ucap-webmessenger-electron/src/index.ts index ca04b864..b5cb70ac 100644 --- a/electron-projects/ucap-webmessenger-electron/src/index.ts +++ b/electron-projects/ucap-webmessenger-electron/src/index.ts @@ -397,6 +397,13 @@ ipcMain.on( } ); +ipcMain.on( + MessengerChannel.GetVersionInfo, + (event: IpcMainEvent, ...args: any[]) => { + event.returnValue = app.getVersion(); + } +); + ipcMain.on( MessengerChannel.ChangeAutoLaunch, (event: IpcMainEvent, ...args: any[]) => { 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 2063a3da..2bbad637 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 @@ -306,6 +306,12 @@ +
+ +
+
+ + +
+ {{ 'information.version' | translate }}: {{ appVersion }} +
+
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts index 7e33245a..c5a7eaf6 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts @@ -93,6 +93,8 @@ export class TopBarComponent implements OnInit, OnDestroy { webLinkBadgeMail = 0; webLinkBadgePayment = 0; + appVersion: string; + WebLinkType = WebLinkType; StatusCode = StatusCode; @@ -167,6 +169,10 @@ export class TopBarComponent implements OnInit, OnDestroy { ); this.zoom = appUserInfo.zoom; + + this.nativeService.getVersionInfo().then(ver => { + this.appVersion = ver; + }); } ngOnDestroy(): void { diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index 79f1ef52..69a72fd4 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -67,6 +67,10 @@ "failToChangeProfileImage": "Failed to change profile image." } }, + "information": { + "label": "Information", + "version": "Version" + }, "settings": { "label": "Settings", "typeGenernal": "Genernal", diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index 6b437934..b79960fa 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -67,6 +67,10 @@ "failToChangeProfileImage": "프로필 이미지 변경에 실패 하였습니다." } }, + "information": { + "label": "정보", + "version": "버전" + }, "settings": { "label": "설정", "typeGenernal": "일반", diff --git a/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts b/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts index 7cc971ee..dd3a7db5 100644 --- a/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts +++ b/projects/ucap-webmessenger-native-browser/src/lib/services/browser-native.service.ts @@ -78,6 +78,12 @@ export class BrowserNativeService extends NativeService { }); } + getVersionInfo(): Promise { + return new Promise((resolve, reject) => { + resolve(''); + }); + } + changeAutoLaunch(autoLaunch: boolean): Promise { return new Promise((resolve, reject) => { resolve(true); diff --git a/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts b/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts index ebd98a94..97fdfb19 100644 --- a/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts +++ b/projects/ucap-webmessenger-native-electron/src/lib/services/electron-native.service.ts @@ -90,6 +90,16 @@ export class ElectronNativeService implements NativeService { }); } + getVersionInfo(): Promise { + return new Promise((resolve, reject) => { + try { + resolve(this.ipcRenderer.sendSync(MessengerChannel.GetVersionInfo)); + } catch (error) { + reject(error); + } + }); + } + changeStatus(): Observable { if (!this.changeStatusSubject) { this.changeStatusSubject = new Subject(); diff --git a/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts b/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts index f766d95a..611c8d76 100644 --- a/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts +++ b/projects/ucap-webmessenger-native-electron/src/lib/types/channel.type.ts @@ -5,7 +5,8 @@ export enum MessengerChannel { ChangeAutoLaunch = 'UCAP::messenger::changeAutoLaunch', ChangeStartupHideWindow = 'UCAP::messenger::changeStartupHideWindow', ChangeDownloadPath = 'UCAP::messenger::changeDownloadPath', - GetNetworkInfo = 'UCAP::messenger::getNetworkInfo' + GetNetworkInfo = 'UCAP::messenger::getNetworkInfo', + GetVersionInfo = 'UCAP::messenger::getVersionInfo' } export enum ChatChannel { diff --git a/projects/ucap-webmessenger-native/src/lib/services/native.service.ts b/projects/ucap-webmessenger-native/src/lib/services/native.service.ts index e587488c..d4967761 100644 --- a/projects/ucap-webmessenger-native/src/lib/services/native.service.ts +++ b/projects/ucap-webmessenger-native/src/lib/services/native.service.ts @@ -25,6 +25,7 @@ export abstract class NativeService { abstract showSetting(): Observable; abstract getNetworkInfo(): Promise; + abstract getVersionInfo(): Promise; abstract changeAutoLaunch(autoLaunch: boolean): Promise; abstract changeStartupHideWindow( From 25ad64ce2e55c7606876f360dd4308a221922ef4 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 16:19:23 +0900 Subject: [PATCH 05/10] zooming is disabled --- .../src/app/layouts/native/components/top-bar.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 2bbad637..8eacbece 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 @@ -274,7 +274,7 @@ {{ 'profile.open' | translate }} -
+
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss index fc124522..83ee9fe3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/message/message-detail.dialog.component.scss @@ -109,5 +109,41 @@ .ps { align-items: flex-start; } + .attachFile { + border-top: 1px solid #dddddd; + li { + display: flex; + flex-flow: row; + line-height: 2em; + flex: 1 1 auto; + .file-name { + display: inline-flex; + flex-flow: row; + flex: 1 1 auto; + border: 1px solid red; + white-space: nowrap; + word-wrap: normal; + overflow: hidden; + span:last-child { + overflow: hidden; + text-overflow: ellipsis; + display: block; + width: calc(100% - 40px); + } + } + .file-size { + display: inline-flex; + margin-left: auto; + align-self: flex-end; + flex: 0 0 auto; + margin: 0 10px; + } + a { + display: inline-block; + width: 20px; + height: 100%; + } + } + } } -} +} \ No newline at end of file diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html b/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html index a2795aac..75a3957b 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.html @@ -1,5 +1,5 @@ -
+ + +
+
+
+ + {{ message.userName }} + + {{ + 'message.andOthers' | translate: { count: message.userCount - 1 } + }} + + +
+
+ image + attach_file + {{ message.title }} +
+
+
+ {{ message.regDate | ucapDate: 'MM:DD' }} + + N + +
+
\ No newline at end of file diff --git a/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.scss b/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.scss index e69de29b..baeb82b3 100644 --- a/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.scss +++ b/projects/ucap-webmessenger-ui-message/src/lib/components/list-item.component.scss @@ -0,0 +1,52 @@ +.message-list { + &.list-item { + dl { + display: flex; + flex-flow: column; + flex: 1 1 auto; + width: calc(100% - 80px); + dt { + .name { + font-size: 16px; + overflow: hidden; + text-overflow: ellipsis; + display: block; + white-space: nowrap; + word-wrap: normal; + font-weight: 600; + span { + font-size: 13px; + } + } + } + + dd { + color: #777777; + margin-top: 4px; + white-space: nowrap; + word-wrap: normal; + text-overflow: ellipsis; + display: block; + width: 100%; + position: relative; + overflow: hidden; + } + } + .date { + display: flex; + flex-flow: column; + align-self: flex-start; + .badge-new { + border-radius: 50%; + color: #ffffff; + padding: 0; + text-align: center; + align-self: flex-end; + width: 20px; + height: 20px; + font-size: 12px; + margin-top: 4px; + } + } + } +} From 8b8c12208bfdcb446071f0876a86ae44a45cdb91 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 16:28:52 +0900 Subject: [PATCH 07/10] bug fixed --- .../messenger/components/left-sidenav/group.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3a39364d..2c8a44d4 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 @@ -168,7 +168,7 @@ (click)="onClickProfileContextMenu('REGISTER_FAVORITE', userInfo)" > {{ - (userInfo.isFavorit ? 'group.unfavorite' : 'group.favorite') | translate + (userInfo.isFavorit ? 'group.unfavorite' : 'group.favorit') | translate }}
\ No newline at end of file + diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html index 34e02756..a4725c1f 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html @@ -1,5 +1,5 @@ -
+