From bceb25afa1e177447553a07d11d4a873c9147279 Mon Sep 17 00:00:00 2001 From: Justin Ferrari <‘justinwesleyferrari@gmail.com’> Date: Wed, 2 Nov 2022 19:37:45 -0500 Subject: [PATCH] Added Icons to Chatbar & Styled Chat Bubbles --- img/qchat-send-message-icon.svg | 4 + qortal-ui-core/font/switch-theme.css | 16 +-- qortal-ui-core/src/styles/switch-theme.css | 16 +-- .../plugins/core/components/ChatPage.js | 109 ++++++++++++------ .../core/components/ChatScroller-css.js | 63 ++++++---- .../plugins/core/components/ChatScroller.js | 106 +++++++++-------- 6 files changed, 189 insertions(+), 125 deletions(-) create mode 100644 img/qchat-send-message-icon.svg diff --git a/img/qchat-send-message-icon.svg b/img/qchat-send-message-icon.svg new file mode 100644 index 00000000..ee6cb8bf --- /dev/null +++ b/img/qchat-send-message-icon.svg @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/qortal-ui-core/font/switch-theme.css b/qortal-ui-core/font/switch-theme.css index bb48fc95..4c65b30c 100644 --- a/qortal-ui-core/font/switch-theme.css +++ b/qortal-ui-core/font/switch-theme.css @@ -7,6 +7,7 @@ html { --border: #d0d6de; --border2: #dde2e8; --copybutton: #707584; + --chat-bubble: #efefef73; --sectxt: #576374; --vdicon: #707b8a; --tradehead: #6a6c75; @@ -17,11 +18,11 @@ html { --relaynodetxt: #646464; --menuhover: #eeeeee; --menuactive: #ebebeb; - --mainmenutext:#080808; - --mainmenutexthover:#080808; + --mainmenutext: #080808; + --mainmenutexthover: #080808; --switchbackground: #666666; --switchborder: #333333; - --sidetopbar: #ffffff; + --sidetopbar: #ffffff; --nav-selected-color: #dddddd; --nav-selected-color-text: #333333; --nav-color-active: #d1d1d1; @@ -43,6 +44,7 @@ html[theme="dark"] { --border: #0b305e; --border2: #0b305e; --copybutton: #d0d6de; + --chat-bubble: #9694941a; --sectxt: #bbc3cd; --vdicon: #d0d6de; --tradehead: #008fd5; @@ -53,11 +55,11 @@ html[theme="dark"] { --relaynodetxt: #d4d4d4; --menuhover: #008fd5; --menuactive: #008fd5; - --mainmenutext:#008fd5; - --mainmenutexthover:#0f1a2e; + --mainmenutext: #008fd5; + --mainmenutexthover: #0f1a2e; --switchbackground: #eeeeee; --switchborder: #03a9f4; - --sidetopbar: #070d19; + --sidetopbar: #070d19; --nav-selected-color: #0f1a2e; --nav-selected-color-text: #76c8f5; --nav-color-active: #d1d1d1; @@ -68,4 +70,4 @@ html[theme="dark"] { --nav-border-selected-color: #76c8f5; --error: #d50000; --background: url("/img/qortal_background_dark_.jpg"); -} +} \ No newline at end of file diff --git a/qortal-ui-core/src/styles/switch-theme.css b/qortal-ui-core/src/styles/switch-theme.css index 45fb525b..9c6c517e 100644 --- a/qortal-ui-core/src/styles/switch-theme.css +++ b/qortal-ui-core/src/styles/switch-theme.css @@ -7,6 +7,7 @@ html { --border: #d0d6de; --border2: #dde2e8; --copybutton: #707584; + --chat-bubble: #efefef73; --sectxt: #576374; --vdicon: #707b8a; --tradehead: #6a6c75; @@ -17,11 +18,11 @@ html { --relaynodetxt: #646464; --menuhover: #eeeeee; --menuactive: #ebebeb; - --mainmenutext:#080808; - --mainmenutexthover:#080808; + --mainmenutext: #080808; + --mainmenutexthover: #080808; --switchbackground: #666666; --switchborder: #333333; - --sidetopbar: #ffffff; + --sidetopbar: #ffffff; --nav-selected-color: #dddddd; --nav-selected-color-text: #333333; --nav-color-active: #d1d1d1; @@ -42,6 +43,7 @@ html[theme="dark"] { --border: #0b305e; --border2: #0b305e; --copybutton: #d0d6de; + --chat-bubble: #9694941a; --sectxt: #bbc3cd; --vdicon: #d0d6de; --tradehead: #008fd5; @@ -52,11 +54,11 @@ html[theme="dark"] { --relaynodetxt: #d4d4d4; --menuhover: #008fd5; --menuactive: #008fd5; - --mainmenutext:#008fd5; - --mainmenutexthover:#0f1a2e; + --mainmenutext: #008fd5; + --mainmenutexthover: #0f1a2e; --switchbackground: #eeeeee; --switchborder: #03a9f4; - --sidetopbar: #070d19; + --sidetopbar: #070d19; --nav-selected-color: #0f1a2e; --nav-selected-color-text: #76c8f5; --nav-color-active: #d1d1d1; @@ -66,4 +68,4 @@ html[theme="dark"] { --nav-border-color: #0b305e; --nav-border-selected-color: #76c8f5; --background: url("/img/qortal_background_dark_.jpg"); -} +} \ 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 2bd6b712..ffb5b43c 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatPage.js +++ b/qortal-ui-plugins/plugins/core/components/ChatPage.js @@ -8,7 +8,6 @@ registerTranslateConfig({ }) import ShortUniqueId from 'short-unique-id'; import Compressor from 'compressorjs'; - import { escape, unescape } from 'html-escaper'; import { inputKeyCodes } from '../../utils/keyCodes.js' import './ChatScroller.js' @@ -17,7 +16,6 @@ import './NameMenu.js' import './TimeAgo.js' import { EmojiPicker } from 'emoji-picker-js'; import '@polymer/paper-spinner/paper-spinner-lite.js' - import '@material/mwc-button' import '@material/mwc-dialog' import '@material/mwc-icon' @@ -134,6 +132,7 @@ class ChatPage extends LitElement { margin: 0; color: var(--mdc-theme-primary); font-weight: bold; + user-select: none; } .original-message { @@ -169,9 +168,9 @@ class ChatPage extends LitElement { width: auto; display: flex; justify-content: center; - align-items: flex-end; + align-items: center; height: auto; - padding: 5px; + padding: 5px 5px 5px 7px; overflow-y: hidden; } @@ -194,6 +193,27 @@ class ChatPage extends LitElement { img { border-radius: 25%; } + + .paperclip-icon { + color: #494949; + width: 25px; + } + + .paperclip-icon:hover { + cursor: pointer; + } + + .send-icon { + width: 30px; + margin-left: 5px; + transition: all 0.1s ease-in-out; + } + + .send-icon:hover { + cursor: pointer; + filter: brightness(1.1); + } + ` } @@ -236,9 +256,8 @@ class ChatPage extends LitElement {