fix issues
This commit is contained in:
parent
13c8242e6c
commit
9e5f630cb2
@ -541,6 +541,7 @@ export const chatStyles = css`
|
|||||||
font-family: 'JetBrainsMono', monospace;
|
font-family: 'JetBrainsMono', monospace;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
#messageContent pre code {
|
#messageContent pre code {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@ -603,6 +604,7 @@ export const chatStyles = css`
|
|||||||
font-family: 'JetBrainsMono', monospace;
|
font-family: 'JetBrainsMono', monospace;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
.replied-message pre code {
|
.replied-message pre code {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
@ -5,7 +5,6 @@ import { translate, get } from 'lit-translate';
|
|||||||
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
|
import {unsafeHTML} from 'lit/directives/unsafe-html.js';
|
||||||
import { chatStyles } from './ChatScroller-css.js'
|
import { chatStyles } from './ChatScroller-css.js'
|
||||||
import { Epml } from "../../../epml";
|
import { Epml } from "../../../epml";
|
||||||
import { EmojiPicker } from 'emoji-picker-js';
|
|
||||||
import { cropAddress } from "../../utils/cropAddress";
|
import { cropAddress } from "../../utils/cropAddress";
|
||||||
import './LevelFounder.js';
|
import './LevelFounder.js';
|
||||||
import './NameMenu.js';
|
import './NameMenu.js';
|
||||||
@ -19,7 +18,6 @@ import '@material/mwc-button';
|
|||||||
import '@material/mwc-dialog';
|
import '@material/mwc-dialog';
|
||||||
import '@material/mwc-icon';
|
import '@material/mwc-icon';
|
||||||
import { EmojiPicker } from 'emoji-picker-js';
|
import { EmojiPicker } from 'emoji-picker-js';
|
||||||
import { cropAddress } from "../../utils/cropAddress";
|
|
||||||
import { generateHTML } from '@tiptap/core'
|
import { generateHTML } from '@tiptap/core'
|
||||||
import StarterKit from '@tiptap/starter-kit'
|
import StarterKit from '@tiptap/starter-kit'
|
||||||
import Underline from '@tiptap/extension-underline';
|
import Underline from '@tiptap/extension-underline';
|
||||||
|
@ -56,7 +56,9 @@ class ChatTextEditor extends LitElement {
|
|||||||
.chatbar-caption {
|
.chatbar-caption {
|
||||||
border-bottom: 2px solid var(--mdc-theme-primary);
|
border-bottom: 2px solid var(--mdc-theme-primary);
|
||||||
}
|
}
|
||||||
|
.privateMessageMargin {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
.emoji-button {
|
.emoji-button {
|
||||||
width: 45px;
|
width: 45px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -154,6 +156,9 @@ class ChatTextEditor extends LitElement {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.element::-webkit-scrollbar-track {
|
.element::-webkit-scrollbar-track {
|
||||||
background-color: whitesmoke;
|
background-color: whitesmoke;
|
||||||
@ -214,6 +219,7 @@ class ChatTextEditor extends LitElement {
|
|||||||
font-family: 'JetBrainsMono', monospace;
|
font-family: 'JetBrainsMono', monospace;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
.ProseMirror pre code {
|
.ProseMirror pre code {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@ -269,6 +275,16 @@ class ChatTextEditor extends LitElement {
|
|||||||
height: 0;
|
height: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
.ProseMirror p {
|
||||||
|
font-size: 18px;
|
||||||
|
margin-block-start: 0px;
|
||||||
|
margin-block-end: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ProseMirror {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
@ -378,7 +394,9 @@ class ChatTextEditor extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
<textarea style="color: var(--black);" tabindex='1' ?autofocus=${true} ?disabled=${this.isLoading || this.isLoadingMessages} id="messageBox" rows="1"></textarea>
|
<textarea style="color: var(--black);" tabindex='1' ?autofocus=${true} ?disabled=${this.isLoading || this.isLoadingMessages} id="messageBox" rows="1"></textarea>
|
||||||
<!-- <iframe style=${(this.iframeId === "newChat" && this.iframeHeight > 42) && "height: 100%;"} id=${this.iframeId} class="chat-editor" tabindex="-1" height=${this.iframeHeight}></iframe> -->
|
<!-- <iframe style=${(this.iframeId === "newChat" && this.iframeHeight > 42) && "height: 100%;"} id=${this.iframeId} class="chat-editor" tabindex="-1" height=${this.iframeHeight}></iframe> -->
|
||||||
<div id=${this.iframeId} class="element"></div>
|
<div id=${this.iframeId}
|
||||||
|
class=${["element", this.iframeId === "privateMessage" ? "privateMessageMargin" : ""].join(" ")}
|
||||||
|
></div>
|
||||||
<button class="emoji-button" ?disabled=${this.isLoading || this.isLoadingMessages}>
|
<button class="emoji-button" ?disabled=${this.isLoading || this.isLoadingMessages}>
|
||||||
${html`<img class="emoji" draggable="false" alt="😀" src="/emoji/svg/1f600.svg" />`}
|
${html`<img class="emoji" draggable="false" alt="😀" src="/emoji/svg/1f600.svg" />`}
|
||||||
</button>
|
</button>
|
||||||
@ -540,7 +558,7 @@ class ChatTextEditor extends LitElement {
|
|||||||
this.chatMessageSize = 0;
|
this.chatMessageSize = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (changedProperties && changedProperties.has('placeholder')) {
|
if (changedProperties && changedProperties.has('placeholder') && this.updatePlaceholder && this.editor) {
|
||||||
this.updatePlaceholder(this.editor, this.placeholder )
|
this.updatePlaceholder(this.editor, this.placeholder )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ import '../../components/ChatHead.js'
|
|||||||
import '../../components/ChatPage.js'
|
import '../../components/ChatPage.js'
|
||||||
import '../../components/WrapperModal.js';
|
import '../../components/WrapperModal.js';
|
||||||
import '../../components/ChatSeachResults.js';
|
import '../../components/ChatSeachResults.js';
|
||||||
import '../../components/ChatGroupsManagement.js'
|
|
||||||
import snackbar from '../../components/snackbar.js'
|
import snackbar from '../../components/snackbar.js'
|
||||||
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
import '@polymer/paper-spinner/paper-spinner-lite.js'
|
||||||
import '@material/mwc-button'
|
import '@material/mwc-button'
|
||||||
@ -168,7 +167,6 @@ class Chat extends LitElement {
|
|||||||
this.openPrivateMessage = true;
|
this.openPrivateMessage = true;
|
||||||
}}>${translate("chatpage.cchange1")}
|
}}>${translate("chatpage.cchange1")}
|
||||||
</div>
|
</div>
|
||||||
<chat-groups-management></chat-groups-management>
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
${this.isEmptyArray(this.chatHeads) ? this.renderLoadingText() : this.renderChatHead(this.chatHeads)}
|
${this.isEmptyArray(this.chatHeads) ? this.renderLoadingText() : this.renderChatHead(this.chatHeads)}
|
||||||
@ -213,7 +211,7 @@ class Chat extends LitElement {
|
|||||||
?disabled=${this.isLoading}
|
?disabled=${this.isLoading}
|
||||||
id="sendTo"
|
id="sendTo"
|
||||||
placeholder="${translate("chatpage.cchange7")}"
|
placeholder="${translate("chatpage.cchange7")}"
|
||||||
value=${this.userSelected.name}
|
value=${this.userSelected.name ? this.userSelected.name: ''}
|
||||||
@keypress=${() => {
|
@keypress=${() => {
|
||||||
this.userSelected = {};
|
this.userSelected = {};
|
||||||
this.requestUpdate();
|
this.requestUpdate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user