From d47dd78e4bb25654997c9ef10cde5d05d0de0281 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Mon, 13 Jan 2020 13:55:54 +0900 Subject: [PATCH] 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';