forked from Qortal/qortal-ui
Added emojiPicker and escapeHTML to properties
This commit is contained in:
parent
e22ff8cba0
commit
2e825d2ae6
@ -315,7 +315,6 @@ class ChatPage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async processMessages(messages, isInitial) {
|
async processMessages(messages, isInitial) {
|
||||||
console.log({ messages })
|
|
||||||
if (isInitial) {
|
if (isInitial) {
|
||||||
|
|
||||||
this.messages = messages.map((eachMessage) => {
|
this.messages = messages.map((eachMessage) => {
|
||||||
|
@ -231,7 +231,6 @@ class ChatScroller extends LitElement {
|
|||||||
<div id='downObserver'></div>
|
<div id='downObserver'></div>
|
||||||
<div class='last-message-ref'>
|
<div class='last-message-ref'>
|
||||||
<vaadin-icon icon='vaadin:arrow-circle-down' slot='icon' @click=${() => {
|
<vaadin-icon icon='vaadin:arrow-circle-down' slot='icon' @click=${() => {
|
||||||
console.log("yo500")
|
|
||||||
this.shadowRoot.getElementById('downObserver').scrollIntoView({
|
this.shadowRoot.getElementById('downObserver').scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
})
|
})
|
||||||
@ -263,7 +262,6 @@ class ChatScroller extends LitElement {
|
|||||||
_upObserverhandler(entries) {
|
_upObserverhandler(entries) {
|
||||||
if (entries[0].isIntersecting) {
|
if (entries[0].isIntersecting) {
|
||||||
let _scrollElement = entries[0].target.nextElementSibling
|
let _scrollElement = entries[0].target.nextElementSibling
|
||||||
console.log({ _scrollElement })
|
|
||||||
this._getOldMessage(_scrollElement)
|
this._getOldMessage(_scrollElement)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -315,6 +313,8 @@ class MessageTemplate extends LitElement {
|
|||||||
static get properties() {
|
static get properties() {
|
||||||
return {
|
return {
|
||||||
messageObj: { type: Object },
|
messageObj: { type: Object },
|
||||||
|
emojiPicker: { attribute: false },
|
||||||
|
escapeHTML: { attribute: false },
|
||||||
hideMessages: { type: Array },
|
hideMessages: { type: Array },
|
||||||
openDialogPrivateMessage: {type: Boolean},
|
openDialogPrivateMessage: {type: Boolean},
|
||||||
openDialogBlockUser: {type: Boolean},
|
openDialogBlockUser: {type: Boolean},
|
||||||
@ -542,7 +542,6 @@ class MessageTemplate extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
console.log(this.showBlockAddressIcon)
|
|
||||||
const hidemsg = this.hideMessages
|
const hidemsg = this.hideMessages
|
||||||
|
|
||||||
let avatarImg = ''
|
let avatarImg = ''
|
||||||
@ -574,12 +573,12 @@ class MessageTemplate extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<div class="message-data-avatar" style="width:42px; height:42px; ${this.messageObj.sender === this.myAddress ? "float:left;" : "float:left;"} margin:3px;">${avatarImg}</div>
|
<div class="message-data-avatar" style="width:42px; height:42px; ${this.messageObj.sender === this.myAddress ? "float:left;" : "float:left;"} margin:3px;">${avatarImg}</div>
|
||||||
<div class="message-container">
|
<div class="message-container">
|
||||||
<div id="messageContent" class="message ${this.messageObj.sender === this.myAddress ? "my-message float-left" : "other-message float-left"}">${this.emojiPicker.parse(this.escapeHTML(this.messageObj.decodedMessage))}</div>
|
<div id="messageContent" class="message ${this.messageObj.sender === this.myAddress ? "my-message float-left" : "other-message float-left"}">${this.emojiPicker.parse(this.escapeHTML(this.messageObj.decodedMessage))}</div>
|
||||||
<chat-menu
|
<chat-menu
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="chat-hover"
|
class="chat-hover"
|
||||||
style=${this.showBlockAddressIcon && "display: block"}
|
style=${this.showBlockAddressIcon && "display: block"}
|
||||||
toblockaddress="${this.messageObj.sender}"
|
toblockaddress=${this.messageObj.sender}
|
||||||
.showPrivateMessageModal=${() => this.showPrivateMessageModal()}
|
.showPrivateMessageModal=${() => this.showPrivateMessageModal()}
|
||||||
.showBlockUserModal=${() => this.showBlockUserModal()}
|
.showBlockUserModal=${() => this.showBlockUserModal()}
|
||||||
.showBlockIconFunc=${(props) => this.showBlockIconFunc(props)}
|
.showBlockIconFunc=${(props) => this.showBlockIconFunc(props)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user