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';