diff --git a/qortal-ui-core/font/MaterialSymbolsOutlined.ttf b/qortal-ui-core/font/MaterialSymbolsOutlined.ttf new file mode 100644 index 00000000..06c7bd3e Binary files /dev/null and b/qortal-ui-core/font/MaterialSymbolsOutlined.ttf differ diff --git a/qortal-ui-core/font/MaterialSymbolsOutlined.woff2 b/qortal-ui-core/font/MaterialSymbolsOutlined.woff2 new file mode 100644 index 00000000..d7dd3210 Binary files /dev/null and b/qortal-ui-core/font/MaterialSymbolsOutlined.woff2 differ diff --git a/qortal-ui-core/font/material-icons.css b/qortal-ui-core/font/material-icons.css index 0363d4ee..1af6891e 100644 --- a/qortal-ui-core/font/material-icons.css +++ b/qortal-ui-core/font/material-icons.css @@ -11,6 +11,14 @@ url(MaterialIcons-Regular.ttf) format('truetype'); } +@font-face { + font-family: 'Material Symbols Outlined'; + font-style: normal; + src: local('MaterialSymbolsOutlined'), + url(MaterialSymbolsOutlined.ttf) format('truetype'), + url(MaterialSymbolsOutlined.woff2) format('woff2') +} + @font-face { font-family: 'Montserrat'; src: local('Montserrat'), @@ -63,4 +71,18 @@ /* Support for IE. */ font-feature-settings: 'liga'; +} + +.material-symbols-outlined { + font-family: 'Material Symbols Outlined'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; } \ No newline at end of file diff --git a/qortal-ui-plugins/plugins/core/components/ChatPage.js b/qortal-ui-plugins/plugins/core/components/ChatPage.js index 415d30c3..ed19100a 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatPage.js +++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js @@ -990,6 +990,7 @@ class ChatPage extends LitElement { .editor=${this.editor} .updatePlaceholder=${(editor, value)=> this.updatePlaceholder(editor, value)} id="_chatEditorDOM" + .repliedToMessageObj=${this.repliedToMessageObj} > @@ -1837,6 +1838,7 @@ async getName (recipient) { closeEditMessageContainer() { this.editedMessageObj = null; this.isEditMessageOpen = !this.isEditMessageOpen; + this.editor.commands.setContent('') } closeRepliedToContainer() { diff --git a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js index 9c98b1c4..607eecfb 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js +++ b/qortal-ui-plugins/plugins/core/components/ChatTextEditor.js @@ -8,6 +8,7 @@ import { Editor } from '@tiptap/core' import StarterKit from '@tiptap/starter-kit' import Underline from '@tiptap/extension-underline'; import Image from '@tiptap/extension-image' +import '@material/mwc-icon' const parentEpml = new Epml({ type: 'WINDOW', source: window.parent }); class ChatTextEditor extends LitElement { @@ -21,6 +22,7 @@ class ChatTextEditor extends LitElement { insertImage: { attribute: false }, iframeHeight: { type: Number }, editedMessageObj: { type: Object }, + repliedToMessageObj: {type: Object}, setChatEditor: { attribute: false }, iframeId: { type: String }, hasGlobalEvents: { type: Boolean }, @@ -250,22 +252,29 @@ class ChatTextEditor extends LitElement { outline: none; border: none; color: var(--black); - padding: 4px 8px; + padding: 4px; border-radius: 5px; cursor: pointer; margin-right: 2px; filter: brightness(100%); transition: all 0.2s; + display: none; } .chatbar-button-single:hover { filter: brightness(120%); + } - .chatbar-buttons { - visibility: hidden; - transition: all 0.2s; + + .show-chatbar-buttons { + display: flex; + align-items: center; + justify-content: center; } - .chatbar-container:hover .chatbar-buttons { - visibility: visible; + :host(:hover) .chatbar-button-single { + + display: flex; + align-items: center; + justify-content: center; } .ProseMirror p.is-editor-empty:first-child::before { color: #adb5bd; @@ -307,6 +316,20 @@ class ChatTextEditor extends LitElement { white-space: nowrap; direction: ltr; +} + +.material-symbols-outlined { + font-family: 'Material Symbols Outlined'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; } ` @@ -342,13 +365,9 @@ class ChatTextEditor extends LitElement { scrollHeightBool = false; } return html` -
-
+ style="align-items: center;">
+
+