Add chat log colors, timestamp, filter & emoji box

Chat log names are now based off the ponies coat and mane.
Added a timestamp infront of each message.

There now is a filter on the top right of the chat box, with it you
can filter the past log.

Use no prefix for normal non-case sensitive search,
use # for case sensitive search and finally
use / for RegExp search.

When party or whisper messages are received, the respective tab is
highlighted.

Added an emoji picker, it is displayed when the chat bar is activated.

Co-authored-by: Stubenhocker1399 <[email protected]>
This commit is contained in:
terncode
2019-09-07 13:28:24 +02:00
committed by Stubenhocker1399
co-authored by Stubenhocker1399
parent cba4e94da2
commit 596fd33126
6 changed files with 509 additions and 171 deletions
+116 -100
View File
@@ -10,150 +10,166 @@ $resizer-size: 12px;
$resizer-offset: $resizer-size / 2;
.chat-log {
display: flex;
position: absolute;
bottom: 0;
left: 0;
right: 0;
min-width: 200px;
max-width: 100%;
max-height: calc(100vh - 220px);
min-height: 120px;
display: flex;
position: absolute;
bottom: 0;
left: 0;
right: 0;
min-width: 200px;
max-width: 100%;
max-height: calc(100vh - 220px);
min-height: 120px;
}
.chat-log-buttons {
flex-direction: column-reverse;
width: $chat-log-buttons-width;
padding: 5px 3px;
padding-bottom: 30px;
z-index: 2;
flex-direction: column-reverse;
width: $chat-log-buttons-width;
padding: 5px 3px;
padding-bottom: 30px;
z-index: 2;
}
.chat-log-toggle {
position: absolute;
bottom: 5px;
left: 4px;
z-index: 3;
position: absolute;
bottom: 5px;
left: 4px;
z-index: 3;
}
.has-unread .main-bubble {
color: $chat-whisper;
color: $chat-whisper;
}
.whispers-count {
color: white;
font-weight: bold;
text-align: center;
position: absolute;
left: 6px;
top: 9px;
width: 16px;
font-size: 10px;
display: flex;
justify-content: center;
align-items: center;
line-height: 1rem;
color: white;
font-weight: bold;
text-align: center;
position: absolute;
left: 6px;
top: 9px;
width: 16px;
font-size: 10px;
display: flex;
justify-content: center;
align-items: center;
line-height: 1rem;
}
.whisper-icon {
position: absolute;
top: 0;
left: 0;
font-size: 14px;
color: $chat-whisper !important;
position: absolute;
top: 0;
left: 0;
font-size: 14px;
color: $chat-whisper !important;
}
.chat-log-content {
position: relative;
display: flex;
background: $chat-log-bg;
padding: 5px 0;
padding-left: 40px;
margin-left: -$chat-log-buttons-width;
border-radius: $border-radius-base;
word-break: break-word;
white-space: pre-line;
line-height: 20px;
height: 100%;
width: 100%;
position: relative;
display: flex;
background: $chat-log-bg;
padding: 5px 0;
padding-left: 40px;
margin-left: -$chat-log-buttons-width;
border-radius: $border-radius-base;
word-break: break-word;
white-space: pre-line;
line-height: 20px;
height: 100%;
width: 100%;
}
.chat-log-tabs {
position: absolute;
top: -$chat-log-tabs-height;
left: 30px;
display: flex;
user-select: none;
position: absolute;
top: -$chat-log-tabs-height;
left: 30px;
display: flex;
user-select: none;
text-shadow: 0px 0px 4px #000000;
}
.chat-log-tab {
background: $chat-log-bg-faded;
padding: 5px 10px 0;
margin-left: 10px;
height: $chat-log-tabs-height;
border-top-left-radius: $border-radius-base;
border-top-right-radius: $border-radius-base;
color: white;
background: $chat-log-bg-faded;
padding: 5px 10px 0;
margin-left: 10px;
height: $chat-log-tabs-height;
border-top-left-radius: $border-radius-base;
border-top-right-radius: $border-radius-base;
color: white;
overflow: hidden;
&.active {
background: $chat-log-bg;
}
&.active {
background: $chat-log-bg;
}
}
.chat-log-scroll-outer {
overflow: hidden;
width: 100%;
overflow: hidden;
width: 100%;
}
.chat-log-scroll-inner {
width: calc(100% + 50px);
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
width: calc(100% + 50px);
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.chat-log-scroll-inner-inner {
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 100%;
padding: 0 5px;
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 100%;
padding: 0 5px;
}
.chat-log-resize-top {
position: absolute;
top: -$resizer-offset;
right: $resizer-offset;
height: $resizer-size;
left: 250px;
cursor: ns-resize;
position: absolute;
top: -$resizer-offset;
right: $resizer-offset;
height: $resizer-size;
left: 250px;
cursor: ns-resize;
}
.chat-log-resize-top-right {
position: absolute;
top: -($resizer-offset + 1);
right: -($resizer-offset + 1);
width: $resizer-size + 4;
height: $resizer-size + 4;
cursor: nesw-resize;
position: absolute;
top: -($resizer-offset + 1);
right: -($resizer-offset + 1);
width: $resizer-size + 4;
height: $resizer-size + 4;
cursor: nesw-resize;
}
.chat-log-resize-right {
position: absolute;
top: $resizer-offset;
right: -$resizer-offset;
width: $resizer-size;
bottom: $resizer-offset;
cursor: ew-resize;
position: absolute;
top: $resizer-offset;
right: -$resizer-offset;
width: $resizer-size;
bottom: $resizer-offset;
cursor: ew-resize;
}
.resize-icon {
font-size: 18px;
position: absolute;
top: -3px;
right: 1px;
transform: rotate(45deg);
color: rgba(255, 255, 255, 0.2);
font-size: 18px;
position: absolute;
top: -3px;
right: 1px;
transform: rotate(45deg);
color: rgba(255, 255, 255, 0.2);
}
.chat-log-filter {
border: none;
width: 100px;
}
@media only screen and (max-width: 360px) {
.chat-log-filter {
position: absolute;
left: 0;
bottom: 35px;
width: 100%;
border-radius: 2px;
}
}