From 2fd6f1f5657ff83d19030d0c77e9f365b956169d Mon Sep 17 00:00:00 2001 From: NktAts Date: Sun, 9 Aug 2020 10:18:58 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=E7=94=BB=E5=83=8F=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=82=92=E9=96=8B=E3=81=8FHTML=E4=BF=AE=E6=AD=A3=E3=80=81?= =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/component/chat-input/chat-input.component.html | 4 ++-- src/app/component/chat-input/chat-input.component.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/component/chat-input/chat-input.component.html b/src/app/component/chat-input/chat-input.component.html index 512562d95..0f91e9727 100644 --- a/src/app/component/chat-input/chat-input.component.html +++ b/src/app/component/chat-input/chat-input.component.html @@ -1,6 +1,6 @@
- +
@@ -24,7 +24,7 @@
- diff --git a/src/app/component/chat-input/chat-input.component.ts b/src/app/component/chat-input/chat-input.component.ts index d801f9abe..bb656f0a7 100644 --- a/src/app/component/chat-input/chat-input.component.ts +++ b/src/app/component/chat-input/chat-input.component.ts @@ -11,6 +11,8 @@ import { TextViewComponent } from 'component/text-view/text-view.component'; import { ChatMessageService } from 'service/chat-message.service'; import { PanelOption, PanelService } from 'service/panel.service'; import { PointerDeviceService } from 'service/pointer-device.service'; +import { FileSelecterComponent } from 'component/file-selecter/file-selecter.component'; +import { ModalService } from 'service/modal.service'; @Component({ selector: 'chat-input', @@ -84,7 +86,8 @@ export class ChatInputComponent implements OnInit, OnDestroy { private ngZone: NgZone, public chatMessageService: ChatMessageService, private panelService: PanelService, - private pointerDeviceService: PointerDeviceService + private pointerDeviceService: PointerDeviceService, + private modalService: ModalService ) { } ngOnInit(): void { @@ -231,6 +234,10 @@ export class ChatInputComponent implements OnInit, OnDestroy { }); } + openCharacterImageChange() { + + } + private allowsChat(gameCharacter: GameCharacter): boolean { switch (gameCharacter.location.name) { case 'table': From b1af5b06692dad9b4634a4c1da4b8c0573a73313 Mon Sep 17 00:00:00 2001 From: NktAts Date: Sun, 9 Aug 2020 11:04:49 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=E7=94=BB=E5=83=8F=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=AE=E4=B8=AD=E8=BA=AB=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat-input/chat-input.component.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/app/component/chat-input/chat-input.component.ts b/src/app/component/chat-input/chat-input.component.ts index bb656f0a7..ceb43fc99 100644 --- a/src/app/component/chat-input/chat-input.component.ts +++ b/src/app/component/chat-input/chat-input.component.ts @@ -235,6 +235,23 @@ export class ChatInputComponent implements OnInit, OnDestroy { } openCharacterImageChange() { + let object = ObjectStore.instance.get(this.sendFrom); + if(!object) return; + + this.modalService.open(FileSelecterComponent, { isAllowedEmpty: true }).then(value => { + let character = ObjectStore.instance.get(this.sendFrom); + let peer = ObjectStore.instance.get(this.sendFrom); + + if(character) { + if(!character.imageDataElement || !value) return; + let element = character.imageDataElement.getFirstElementByName('imageIdentifier'); + if(!element) return; + element.value = value; + } else if(peer) { + if(!peer.imageIdentifier || !value) return; + peer.imageIdentifier = value; + } + }); } From 2ec79cd226dde73ffde7711c50fb1061271abb18 Mon Sep 17 00:00:00 2001 From: NktAts Date: Sun, 9 Aug 2020 12:04:50 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E5=9E=8B=E8=AA=8D=E8=AD=98=E3=82=92?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AA=E5=BD=A2=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat-input/chat-input.component.ts | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/app/component/chat-input/chat-input.component.ts b/src/app/component/chat-input/chat-input.component.ts index ceb43fc99..cbb55b534 100644 --- a/src/app/component/chat-input/chat-input.component.ts +++ b/src/app/component/chat-input/chat-input.component.ts @@ -13,6 +13,7 @@ import { PanelOption, PanelService } from 'service/panel.service'; import { PointerDeviceService } from 'service/pointer-device.service'; import { FileSelecterComponent } from 'component/file-selecter/file-selecter.component'; import { ModalService } from 'service/modal.service'; +import { PeerCursorComponent } from 'component/peer-cursor/peer-cursor.component'; @Component({ selector: 'chat-input', @@ -236,21 +237,27 @@ export class ChatInputComponent implements OnInit, OnDestroy { openCharacterImageChange() { let object = ObjectStore.instance.get(this.sendFrom); - if(!object) return; + if(!object) { + console.log("this is null") + return; + } this.modalService.open(FileSelecterComponent, { isAllowedEmpty: true }).then(value => { - let character = ObjectStore.instance.get(this.sendFrom); - let peer = ObjectStore.instance.get(this.sendFrom); + let object = ObjectStore.instance.get(this.sendFrom); + - if(character) { - if(!character.imageDataElement || !value) return; - let element = character.imageDataElement.getFirstElementByName('imageIdentifier'); + if(object instanceof PeerCursor) { + console.log("this is peerCursor"); + if(!object.image || !value) return; + object.imageIdentifier = value; + } + else if(object instanceof GameCharacter) { + console.log("this is character"); + if(!object.imageDataElement || !value) return; + let element = object.imageDataElement.getFirstElementByName('imageIdentifier'); if(!element) return; element.value = value; - } else if(peer) { - if(!peer.imageIdentifier || !value) return; - peer.imageIdentifier = value; - } + } }); } From fabd5690d1c541f2921447e740322bcc27d0a045 Mon Sep 17 00:00:00 2001 From: NktAts Date: Sun, 9 Aug 2020 12:07:43 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E3=83=87=E3=83=90=E3=83=83=E3=82=B0?= =?UTF-8?q?=E7=94=A8=E3=83=AD=E3=82=B0=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/component/chat-input/chat-input.component.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/app/component/chat-input/chat-input.component.ts b/src/app/component/chat-input/chat-input.component.ts index cbb55b534..46503085f 100644 --- a/src/app/component/chat-input/chat-input.component.ts +++ b/src/app/component/chat-input/chat-input.component.ts @@ -237,27 +237,19 @@ export class ChatInputComponent implements OnInit, OnDestroy { openCharacterImageChange() { let object = ObjectStore.instance.get(this.sendFrom); - if(!object) { - console.log("this is null") - return; - } + if(!object) return; this.modalService.open(FileSelecterComponent, { isAllowedEmpty: true }).then(value => { - let object = ObjectStore.instance.get(this.sendFrom); - - if(object instanceof PeerCursor) { - console.log("this is peerCursor"); if(!object.image || !value) return; object.imageIdentifier = value; } else if(object instanceof GameCharacter) { - console.log("this is character"); if(!object.imageDataElement || !value) return; let element = object.imageDataElement.getFirstElementByName('imageIdentifier'); if(!element) return; element.value = value; - } + } else return; }); }