Browse Source

Changed message bubble colors + added new badges

pull/100/head
Justin Ferrari 2 years ago
parent
commit
432c98bee6
  1. BIN
      img/badges/Level-8.png
  2. BIN
      img/badges/level-10.png
  3. BIN
      img/badges/level-6.png
  4. BIN
      img/badges/level-7.png
  5. BIN
      img/badges/level-9.png
  6. 2
      qortal-ui-core/font/switch-theme.css
  7. 2
      qortal-ui-core/src/styles/switch-theme.css
  8. 30
      qortal-ui-plugins/plugins/core/components/ChatScroller-css.js
  9. 23
      qortal-ui-plugins/plugins/core/components/ChatScroller.js
  10. 1
      qortal-ui-plugins/plugins/core/components/LevelFounder.js

BIN
img/badges/Level-8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
img/badges/level-10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
img/badges/level-6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
img/badges/level-7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
img/badges/level-9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

2
qortal-ui-core/font/switch-theme.css

@ -10,6 +10,7 @@ html {
--chat-group: #080808; --chat-group: #080808;
--chat-bubble: #9f9f9f0a; --chat-bubble: #9f9f9f0a;
--chat-bubble-bg: #e6e6e6; --chat-bubble-bg: #e6e6e6;
--chat-bubble-myBg: #d1ddf2;
--chat-bubble-msg-color: #080808; --chat-bubble-msg-color: #080808;
--reaction-bubble-outline: #6b6969; --reaction-bubble-outline: #6b6969;
--chat-menu-bg: #ffffff; --chat-menu-bg: #ffffff;
@ -65,6 +66,7 @@ html[theme="dark"] {
--chat-group: #ffffff; --chat-group: #ffffff;
--chat-bubble: #9694941a; --chat-bubble: #9694941a;
--chat-bubble-bg: #2d3749; --chat-bubble-bg: #2d3749;
--chat-bubble-myBg: #40444d;
--chat-bubble-msg-color: #ffffff; --chat-bubble-msg-color: #ffffff;
--reaction-bubble-outline: #ffffff; --reaction-bubble-outline: #ffffff;
--chat-menu-bg: #32394c; --chat-menu-bg: #32394c;

2
qortal-ui-core/src/styles/switch-theme.css

@ -10,6 +10,7 @@ html {
--chat-group: #080808; --chat-group: #080808;
--chat-bubble: #9f9f9f0a; --chat-bubble: #9f9f9f0a;
--chat-bubble-bg: #e6e6e6; --chat-bubble-bg: #e6e6e6;
--chat-bubble-myBg: #d1ddf2;
--chat-bubble-msg-color: #080808; --chat-bubble-msg-color: #080808;
--reaction-bubble-outline: #6b6969; --reaction-bubble-outline: #6b6969;
--chat-menu-bg: #ffffff; --chat-menu-bg: #ffffff;
@ -62,6 +63,7 @@ html[theme="dark"] {
--chat-group: #ffffff; --chat-group: #ffffff;
--chat-bubble: #9694941a; --chat-bubble: #9694941a;
--chat-bubble-bg: #2d3749; --chat-bubble-bg: #2d3749;
--chat-bubble-myBg: #40444d;
--chat-bubble-msg-color: #ffffff; --chat-bubble-msg-color: #ffffff;
--reaction-bubble-outline: #ffffff; --reaction-bubble-outline: #ffffff;
--chat-menu-bg: #32394c; --chat-menu-bg: #32394c;

30
qortal-ui-plugins/plugins/core/components/ChatScroller-css.js

@ -77,8 +77,8 @@ export const chatStyles = css`
} }
.message-data-my-name { .message-data-my-name {
color: var(--mdc-theme-primary); color: #05be0e;
text-shadow: 0 0 3px var(--mdc-theme-primary); font-weight: bold;
} }
.message-data-time { .message-data-time {
@ -137,6 +137,11 @@ export const chatStyles = css`
min-width: 150px; min-width: 150px;
} }
.message-myBg {
background-color: var(--chat-bubble-myBg) !important;
}
.message-triangle { .message-triangle {
position: relative; position: relative;
} }
@ -153,6 +158,22 @@ export const chatStyles = css`
border-color: transparent transparent var(--chat-bubble-bg) transparent; border-color: transparent transparent var(--chat-bubble-bg) transparent;
} }
.message-myTriangle {
position: relative;
}
.message-myTriangle:after {
content: "";
position: absolute;
bottom: 0px;
left: -9px;
width: 0;
height: 0;
border-style: solid;
border-width: 0px 0px 7px 9px;
border-color: transparent transparent var(--chat-bubble-myBg) transparent;
}
.message-reactions { .message-reactions {
background-color: transparent; background-color: transparent;
width: calc(100% - 54px); width: calc(100% - 54px);
@ -185,9 +206,7 @@ export const chatStyles = css`
} }
.original-message-sender { .original-message-sender {
margin: 0 0 5px 0;
color: var(--mdc-theme-primary); color: var(--mdc-theme-primary);
cursor: pointer;
} }
.replied-message { .replied-message {
@ -198,6 +217,7 @@ export const chatStyles = css`
max-width: 300px; max-width: 300px;
max-height: 40px; max-height: 40px;
} }
.replied-message p { .replied-message p {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
@ -412,7 +432,7 @@ export const chatStyles = css`
.message-data-level { .message-data-level {
height: 21px; height: 21px;
width: 21px; width: auto;
overflow: hidden; overflow: hidden;
} }

23
qortal-ui-plugins/plugins/core/components/ChatScroller.js

@ -502,9 +502,12 @@ class MessageTemplate extends LitElement {
`} `}
<div <div
class="${`message-subcontainer2 class="${`message-subcontainer2
${((this.isFirstMessage === true && this.isSingleMessageInGroup === false) || ${this.myAddress === this.messageObj.sender && "message-myBg" }
(this.isSingleMessageInGroup === true && this.isLastMessageInGroup === true)) && ${(((this.isFirstMessage === true && this.isSingleMessageInGroup === false) ||
'message-triangle'}`}" (this.isSingleMessageInGroup === true && this.isLastMessageInGroup === true)) && this.myAddress !== this.messageObj.sender)
? 'message-triangle'
: (((this.isFirstMessage === true && this.isSingleMessageInGroup === false) ||
(this.isSingleMessageInGroup === true && this.isLastMessageInGroup === true)) && this.myAddress === this.messageObj.sender) ? "message-myTriangle" : null}`}"
style="${(this.isSingleMessageInGroup === true && this.isLastMessageInGroup === false) ? 'margin-bottom: 0;' : null} style="${(this.isSingleMessageInGroup === true && this.isLastMessageInGroup === false) ? 'margin-bottom: 0;' : null}
${(this.isFirstMessage === false && this.isSingleMessageInGroup === true && this.isLastMessageInGroup === false) ${(this.isFirstMessage === false && this.isSingleMessageInGroup === true && this.isLastMessageInGroup === false)
? 'border-radius: 8px 25px 25px 8px;' ? 'border-radius: 8px 25px 25px 8px;'
@ -552,14 +555,13 @@ class MessageTemplate extends LitElement {
this.goToRepliedMessage(repliedToData) this.goToRepliedMessage(repliedToData)
}}> }}>
<p <p
style=${"cursor: pointer; margin: 0 0 5px 0;"}
class=${this.myAddress !== repliedToData.sender
class="original-message-sender"> ? "original-message-sender"
: "message-data-my-name"}>
${repliedToData.senderName ?? cropAddress(repliedToData.sender)} ${repliedToData.senderName ?? cropAddress(repliedToData.sender)}
</p> </p>
<p class="replied-message"> <p class="replied-message">
${version.toString() === '1' ? html` ${version.toString() === '1' ? html`
${repliedToData.decodedMessage.messageText} ${repliedToData.decodedMessage.messageText}
` : ''} ` : ''}
@ -570,8 +572,8 @@ class MessageTemplate extends LitElement {
Highlight Highlight
// other extensions … // other extensions …
]))} ]))}
` : ''} `
: ''}
</p> </p>
</div> </div>
`} `}
@ -604,7 +606,6 @@ class MessageTemplate extends LitElement {
<vaadin-icon <vaadin-icon
@click=${() => { @click=${() => {
this.openDeleteImage = true; this.openDeleteImage = true;
this.chatE
}} }}
class="image-delete-icon" icon="vaadin:close" slot="icon"></vaadin-icon> class="image-delete-icon" icon="vaadin:close" slot="icon"></vaadin-icon>
` : ''} ` : ''}

1
qortal-ui-plugins/plugins/core/components/LevelFounder.js

@ -63,6 +63,7 @@ class LevelFounder extends LitElement {
.message-data { .message-data {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center;
gap: 5px; gap: 5px;
} }

Loading…
Cancel
Save