storage + nes.css

This commit is contained in:
_Bastler 2021-05-14 16:41:41 +02:00
parent d6e99d5f4d
commit e7727e122e
3 changed files with 248 additions and 149 deletions

View File

@ -1,15 +1,20 @@
* a, button, select{ * a,
button,
select {
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
} }
body { body {
overflow: hidden; overflow: hidden;
font-size: 10px; font-size: 10px;
} }
body button:focus, body button:focus,
body img:focus, body img:focus,
body input:focus { body input:focus {
outline: -webkit-focus-ring-color auto 0; outline: -webkit-focus-ring-color auto 0;
} }
body .message-info { body .message-info {
width: 20%; width: 20%;
height: auto; height: auto;
@ -20,23 +25,29 @@ body .message-info{
padding-top: 10px; padding-top: 10px;
text-align: center; text-align: center;
} }
body .message-info.error { body .message-info.error {
background: red; background: red;
} }
body .message-info.success { body .message-info.success {
background: green; background: green;
} }
body .message-info.info { body .message-info.info {
background: dodgerblue; background: dodgerblue;
} }
body .message-info.warning { body .message-info.warning {
background: #ffa500d6; background: #ffa500d6;
} }
.video-container { .video-container {
position: relative; position: relative;
transition: all 0.2s ease; transition: all 0.2s ease;
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
} }
.video-container i { .video-container i {
position: absolute; position: absolute;
width: 100px; width: 100px;
@ -62,6 +73,7 @@ body .message-info.warning{
padding: 10px; padding: 10px;
z-index: 2; z-index: 2;
} }
.video-container img.block-logo { .video-container img.block-logo {
left: 30%; left: 30%;
bottom: 15%; bottom: 15%;
@ -108,6 +120,7 @@ body .message-info.warning{
width: 25px; width: 25px;
height: 25px; height: 25px;
} }
.video-container button.report span { .video-container button.report span {
position: absolute; position: absolute;
bottom: 6px; bottom: 6px;
@ -116,6 +129,7 @@ body .message-info.warning{
font-size: 16px; font-size: 16px;
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
} }
.video-container img.active { .video-container img.active {
display: block !important; display: block !important;
} }
@ -147,7 +161,6 @@ video#myCamVideo{
/*height: 113px;*/ /*height: 113px;*/
} }
.btn-cam-action { .btn-cam-action {
pointer-events: all; pointer-events: all;
position: absolute; position: absolute;
@ -156,7 +169,10 @@ video#myCamVideo{
width: 450px; width: 450px;
height: 150px; height: 150px;
} }
/*btn animation*/ /*btn animation*/
.btn-cam-action div { .btn-cam-action div {
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
position: absolute; position: absolute;
@ -167,41 +183,50 @@ video#myCamVideo{
bottom: 20px; bottom: 20px;
pointer-events: none; pointer-events: none;
} }
.btn-cam-action div.disabled { .btn-cam-action div.disabled {
background: #d75555; background: #d75555;
} }
.btn-cam-action div.enabled { .btn-cam-action div.enabled {
background: #73c973; background: #73c973;
} }
.btn-cam-action:hover div { .btn-cam-action:hover div {
transform: translateY(0); transform: translateY(0);
} }
.btn-cam-action div:hover { .btn-cam-action div:hover {
background: #407cf7; background: #407cf7;
box-shadow: 4px 4px 48px #666; box-shadow: 4px 4px 48px #666;
transition: 120ms; transition: 120ms;
} }
.btn-micro { .btn-micro {
pointer-events: auto; pointer-events: auto;
transition: all .3s; transition: all .3s;
right: 44px; right: 44px;
} }
.btn-video { .btn-video {
pointer-events: auto; pointer-events: auto;
transition: all .25s; transition: all .25s;
right: 134px; right: 134px;
} }
.btn-monitor { .btn-monitor {
pointer-events: auto; pointer-events: auto;
transition: all .2s; transition: all .2s;
right: 224px; right: 224px;
} }
.btn-copy { .btn-copy {
pointer-events: auto; pointer-events: auto;
transition: all .3s; transition: all .3s;
right: 44px; right: 44px;
opacity: 1; opacity: 1;
} }
.btn-cam-action div img { .btn-cam-action div img {
height: 22px; height: 22px;
width: auto; width: auto;
@ -210,17 +235,18 @@ video#myCamVideo{
pointer-events: all; pointer-events: all;
} }
/* Spinner */ /* Spinner */
.connecting-spinner { .connecting-spinner {
/*display: inline-block;*/ /*display: inline-block;*/
position: absolute; position: absolute;
left: calc(50% - 62px); left: calc(50% - 62px);
top: calc(50% - 62px); top: calc(50% - 62px);
width: 130px; width: 130px;
height: 130px; height: 130px;
} }
.connecting-spinner:after { .connecting-spinner:after {
content: " "; content: " ";
display: block; display: block;
@ -232,6 +258,7 @@ video#myCamVideo{
border-color: #fff transparent #fff transparent; border-color: #fff transparent #fff transparent;
animation: connecting-spinner 1.2s linear infinite; animation: connecting-spinner 1.2s linear infinite;
} }
@keyframes connecting-spinner { @keyframes connecting-spinner {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);
@ -241,16 +268,14 @@ video#myCamVideo{
} }
} }
.rtc-error { .rtc-error {
position: absolute; position: absolute;
left: calc(50% - 68px); left: calc(50% - 68px);
top: calc(50% - 68px); top: calc(50% - 68px);
width: 130px; width: 130px;
height: 130px; height: 130px;
} }
.rtc-error:after { .rtc-error:after {
content: " "; content: " ";
display: block; display: block;
@ -280,6 +305,7 @@ video#myCamVideo{
width: 50%; width: 50%;
border: white 6px solid; border: white 6px solid;
} }
.webrtcsetup .background-img { .webrtcsetup .background-img {
position: relative; position: relative;
display: block; display: block;
@ -290,21 +316,25 @@ video#myCamVideo{
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
#myCamVideoSetup { #myCamVideoSetup {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.webrtcsetup.active { .webrtcsetup.active {
display: block; display: block;
} }
/* New layout */ /* New layout */
body { body {
margin: 0; margin: 0;
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
} }
.main-container { .main-container {
height: 100vh; height: 100vh;
width: 100vw; width: 100vw;
@ -315,25 +345,21 @@ body {
.game-overlay { .game-overlay {
flex-direction: row; flex-direction: row;
} }
.sidebar { .sidebar {
flex-direction: column; flex-direction: column;
} }
.sidebar>div { .sidebar>div {
max-height: 21%; max-height: 21%;
} }
.sidebar>div:hover { .sidebar>div:hover {
max-height: 25%; max-height: 25%;
} }
} }
#game { #game {
width: 100%; width: 100%;
position: relative; /* Position relative is needed for the game-overlay. */ position: relative;
/* Position relative is needed for the game-overlay. */
} }
.audioplayer:first-child { .audioplayer:first-child {
@ -341,7 +367,9 @@ body {
grid: 2rem / 4rem 10rem; grid: 2rem / 4rem 10rem;
} }
.audioplayer > button, .audioplayer > div, .audioplayer > label { .audioplayer>button,
.audioplayer>div,
.audioplayer>label {
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
display: flex; display: flex;
align-items: center; align-items: center;
@ -365,49 +393,62 @@ body {
max-width: 5rem; max-width: 5rem;
border: none; border: none;
} }
#audioplayer_mute:focus, #audioplayer_mute:active {
#audioplayer_mute:focus,
#audioplayer_mute:active {
outline: none; outline: none;
} }
#audioplayer_mute>svg { #audioplayer_mute>svg {
width: 100%; width: 100%;
height: 100%; height: 100%;
pointer-events: none; pointer-events: none;
} }
#audioplayer_volume_icon_playing.muted { #audioplayer_volume_icon_playing.muted {
visibility: hidden; visibility: hidden;
display: none; display: none;
} }
#audioplayer_volume_icon_playing.low #audioplayer_volume_icon_playing_high { #audioplayer_volume_icon_playing.low #audioplayer_volume_icon_playing_high {
visibility: hidden; visibility: hidden;
display: none; display: none;
} }
#audioplayer_volume_icon_playing.low #audioplayer_volume_icon_playing_mid { #audioplayer_volume_icon_playing.low #audioplayer_volume_icon_playing_mid {
visibility: hidden; visibility: hidden;
display: none; display: none;
} }
#audioplayer_volume_icon_playing.mid #audioplayer_volume_icon_playing_high { #audioplayer_volume_icon_playing.mid #audioplayer_volume_icon_playing_high {
visibility: hidden; visibility: hidden;
display: none; display: none;
} }
#audioplayerctrl>#audioplayer_volume { #audioplayerctrl>#audioplayer_volume {
width: 100%; width: 100%;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
} }
/* /*
* sollte eigentlich in den aspect-ratio teil .. * sollte eigentlich in den aspect-ratio teil ..
*/ */
#audioplayerctrl.loading { #audioplayerctrl.loading {
transform: translateY(-90%); transform: translateY(-90%);
} }
#audioplayerctrl.hidden { #audioplayerctrl.hidden {
transform: translateY(-100%); transform: translateY(-100%);
} }
/* /*
* Style Input Range * Style Input Range
* https://www.cssportal.com/style-input-range/ * https://www.cssportal.com/style-input-range/
*/ */
input[type=range] { input[type=range] {
height: 28px; height: 28px;
-webkit-appearance: none; -webkit-appearance: none;
@ -415,9 +456,11 @@ input[type=range] {
width: 100%; width: 100%;
background-color: transparent; background-color: transparent;
} }
input[type=range]:focus { input[type=range]:focus {
outline: none; outline: none;
} }
input[type=range]::-webkit-slider-runnable-track { input[type=range]::-webkit-slider-runnable-track {
width: 100%; width: 100%;
height: 5px; height: 5px;
@ -427,6 +470,7 @@ input[type=range]::-webkit-slider-runnable-track {
border-radius: 5px; border-radius: 5px;
border: 1px solid #000000; border: 1px solid #000000;
} }
input[type=range]::-webkit-slider-thumb { input[type=range]::-webkit-slider-thumb {
box-shadow: 1px 1px 1px #000000; box-shadow: 1px 1px 1px #000000;
border: 1px solid #000000; border: 1px solid #000000;
@ -437,9 +481,11 @@ input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none; -webkit-appearance: none;
margin-top: -8.5px; margin-top: -8.5px;
} }
input[type=range]:focus::-webkit-slider-runnable-track { input[type=range]:focus::-webkit-slider-runnable-track {
background: #FFFFFF; background: #FFFFFF;
} }
input[type=range]::-moz-range-track { input[type=range]::-moz-range-track {
width: 100%; width: 100%;
height: 5px; height: 5px;
@ -449,6 +495,7 @@ input[type=range]::-moz-range-track {
border-radius: 5px; border-radius: 5px;
border: 1px solid #000000; border: 1px solid #000000;
} }
input[type=range]::-moz-range-thumb { input[type=range]::-moz-range-thumb {
box-shadow: 1px 1px 1px #000000; box-shadow: 1px 1px 1px #000000;
border: 1px solid #000000; border: 1px solid #000000;
@ -457,6 +504,7 @@ input[type=range]::-moz-range-thumb {
border-radius: 5px; border-radius: 5px;
background: #FFFFFF; background: #FFFFFF;
} }
input[type=range]::-ms-track { input[type=range]::-ms-track {
width: 100%; width: 100%;
height: 5px; height: 5px;
@ -465,18 +513,21 @@ input[type=range]::-ms-track {
border-color: transparent; border-color: transparent;
color: transparent; color: transparent;
} }
input[type=range]::-ms-fill-lower { input[type=range]::-ms-fill-lower {
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #000000; border: 1px solid #000000;
border-radius: 10px; border-radius: 10px;
box-shadow: 1px 1px 1px #000000; box-shadow: 1px 1px 1px #000000;
} }
input[type=range]::-ms-fill-upper { input[type=range]::-ms-fill-upper {
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #000000; border: 1px solid #000000;
border-radius: 10px; border-radius: 10px;
box-shadow: 1px 1px 1px #000000; box-shadow: 1px 1px 1px #000000;
} }
input[type=range]::-ms-thumb { input[type=range]::-ms-thumb {
margin-top: 1px; margin-top: 1px;
box-shadow: 1px 1px 1px #000000; box-shadow: 1px 1px 1px #000000;
@ -486,14 +537,15 @@ input[type=range]::-ms-thumb {
border-radius: 5px; border-radius: 5px;
background: #FFFFFF; background: #FFFFFF;
} }
input[type=range]:focus::-ms-fill-lower { input[type=range]:focus::-ms-fill-lower {
background: #FFFFFF; background: #FFFFFF;
} }
input[type=range]:focus::-ms-fill-upper { input[type=range]:focus::-ms-fill-upper {
background: #FFFFFF; background: #FFFFFF;
} }
.game-overlay { .game-overlay {
display: none; display: none;
position: absolute; position: absolute;
@ -550,7 +602,9 @@ input[type=range]:focus::-ms-fill-upper {
margin: 0%; margin: 0%;
} }
/* Let's make sure videos are vertically centered if they need to be cropped */ /* Let's make sure videos are vertically centered if they need to be cropped */
.media-container { .media-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -561,9 +615,7 @@ input[type=range]:focus::-ms-fill-upper {
.chat-mode { .chat-mode {
display: grid; display: grid;
width: 100%; width: 100%;
align-items: flex-start; align-items: flex-start;
padding: 1%; padding: 1%;
} }
@ -577,6 +629,7 @@ input[type=range]:focus::-ms-fill-upper {
.chat-mode>div:hover { .chat-mode>div:hover {
margin: 0%; margin: 0%;
} }
.chat-mode.one-col { .chat-mode.one-col {
grid-template-columns: repeat(1, 1fr); grid-template-columns: repeat(1, 1fr);
} }
@ -593,6 +646,7 @@ input[type=range]:focus::-ms-fill-upper {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
} }
/*CONSOLE*/ /*CONSOLE*/
.message-container, .message-container,
@ -667,6 +721,7 @@ input[type=range]:focus::-ms-fill-upper {
transform: rotateY(0); transform: rotateY(0);
opacity: 0.5; opacity: 0.5;
} }
.main-console div.console img:hover, .main-console div.console img:hover,
.message-container div.clear img:hover { .message-container div.clear img:hover {
opacity: 1; opacity: 1;
@ -717,6 +772,7 @@ input[type=range]:focus::-ms-fill-upper {
padding: 10px 30px; padding: 10px 30px;
transition: all .2s ease; transition: all .2s ease;
} }
.main-console .btn-action .btn:hover { .main-console .btn-action .btn:hover {
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
background-color: #ffda01; background-color: #ffda01;
@ -762,20 +818,23 @@ input[type=range]:focus::-ms-fill-upper {
.main-console section div.upload label { .main-console section div.upload label {
color: #ffda01; color: #ffda01;
} }
.main-console section div.upload input { .main-console section div.upload input {
display: none; display: none;
} }
.main-console section div.upload label img { .main-console section div.upload label img {
height: 150px; height: 150px;
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
} }
.main-console section div.upload label img { .main-console section div.upload label img {
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
} }
/*audio html when audio message playing*/ /*audio html when audio message playing*/
.main-container .audio-playing { .main-container .audio-playing {
position: absolute; position: absolute;
width: 200px; width: 200px;
@ -791,22 +850,27 @@ input[type=range]:focus::-ms-fill-upper {
.main-container .audio-playing.active { .main-container .audio-playing.active {
right: 0; right: 0;
} }
.main-container .audio-playing img { .main-container .audio-playing img {
/*width: 30px;*/ /*width: 30px;*/
border-radius: 50%; border-radius: 50%;
background-color: #ffda01; background-color: #ffda01;
padding: 10px; padding: 10px;
} }
.main-container .audio-playing p { .main-container .audio-playing p {
color: white; color: white;
margin-left: 10px; margin-left: 10px;
margin-top: 14px; margin-top: 14px;
} }
/* VIDEO QUALITY */ /* VIDEO QUALITY */
.main-console div.setting h1 { .main-console div.setting h1 {
color: white; color: white;
} }
.main-console div.setting select { .main-console div.setting select {
background: black; background: black;
color: white; color: white;
@ -816,16 +880,19 @@ input[type=range]:focus::-ms-fill-upper {
padding: 10px; padding: 10px;
border-radius: 15px; border-radius: 15px;
} }
.main-console div.setting select:focus { .main-console div.setting select:focus {
border: solid 1px white; border: solid 1px white;
outline: none; outline: none;
} }
.main-console div.setting.active section { .main-console div.setting.active section {
display: block; display: block;
} }
/*REPORT input*/ /*REPORT input*/
div.modal-report-user { div.modal-report-user {
position: absolute; position: absolute;
width: 800px; width: 800px;
@ -881,6 +948,7 @@ div.modal-report-user{
padding: 10px 30px; padding: 10px 30px;
transition: all .2s ease; transition: all .2s ease;
} }
.modal-report-user button:hover { .modal-report-user button:hover {
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
background-color: #ffda01; background-color: #ffda01;
@ -906,23 +974,28 @@ div.modal-report-user{
width: 100%; width: 100%;
text-align: left; text-align: left;
padding: 30px; padding: 30px;
max-width: calc(800px - 60px); /* size of modal - padding*/ max-width: calc(800px - 60px);
/* size of modal - padding*/
} }
/*MESSAGE*/ /*MESSAGE*/
.discussion { .discussion {
position: fixed; position: fixed;
left: -300px; left: -300px;
top: 0px; top: 0px;
width: 220px; width: 280px;
height: 100%; height: 100%;
background-color: #333333; background-color: #333333;
padding: 20px; padding: 20px;
transition: all 0.5s ease; transition: all 0.5s ease;
} }
.discussion.active { .discussion.active {
left: 0; left: 0;
} }
.discussion .active-btn { .discussion .active-btn {
display: none; display: none;
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
@ -936,12 +1009,15 @@ div.modal-report-user{
border: none; border: none;
transition: all 0.5s ease; transition: all 0.5s ease;
} }
.discussion .active-btn.active { .discussion .active-btn.active {
display: block; display: block;
} }
.discussion .active-btn:hover { .discussion .active-btn:hover {
transform: scale(1.1) rotateY(3.142rad); transform: scale(1.1) rotateY(3.142rad);
} }
.discussion .active-btn img { .discussion .active-btn img {
width: 26px; width: 26px;
height: 26px; height: 26px;
@ -956,6 +1032,7 @@ div.modal-report-user{
border: none; border: none;
cursor: url('/resources/logos/cursor_pointer.png'), pointer; cursor: url('/resources/logos/cursor_pointer.png'), pointer;
} }
.discussion .close-btn img { .discussion .close-btn img {
height: 15px; height: 15px;
right: 15px; right: 15px;
@ -963,7 +1040,7 @@ div.modal-report-user{
.discussion p { .discussion p {
color: white; color: white;
font-size: 22px; font-size: 12px;
padding-left: 10px; padding-left: 10px;
margin: 0; margin: 0;
} }
@ -985,6 +1062,7 @@ div.modal-report-user{
.discussion .participants .participant:hover { .discussion .participants .participant:hover {
background-color: #ffffff; background-color: #ffffff;
} }
.discussion .participants .participant:hover p { .discussion .participants .participant:hover p {
color: black; color: black;
} }
@ -1041,10 +1119,11 @@ div.modal-report-user{
.discussion .messages h2 { .discussion .messages h2 {
color: white; color: white;
font-size: 12px;
} }
.discussion .messages .message { .discussion .messages .message {
margin: 5px; margin: 5px 0px;
float: right; float: right;
text-align: right; text-align: right;
width: 100%; width: 100%;
@ -1056,16 +1135,20 @@ div.modal-report-user{
} }
.discussion .messages .message p { .discussion .messages .message p {
font-size: 12px; font-size: 10px;
} }
.discussion .messages .message p.body { .discussion .messages .message p.body {
color: white; color: black;
font-size: 16px; font-size: 12px;
overflow: hidden;
white-space: pre-wrap; white-space: pre-wrap;
word-wrap: break-word; word-wrap: break-word;
width: 100%;
padding: 5px;
margin-top: 5px;
margin-bottom: 12px;
} }
.discussion .messages .message p a { .discussion .messages .message p a {
color: white; color: white;
} }
@ -1096,12 +1179,14 @@ div.modal-report-user{
height: 20px; height: 20px;
background-color: #ffffff69; background-color: #ffffff69;
} }
.discussion .send-message img:hover { .discussion .send-message img:hover {
background-color: #ffffff; background-color: #ffffff;
} }
/** Action button **/ /** Action button **/
div.action { div.action {
position: absolute; position: absolute;
width: 100%; width: 100%;
@ -1113,6 +1198,7 @@ div.action{
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-timing-function: ease-in-out; animation-timing-function: ease-in-out;
} }
div.action p.action-body { div.action p.action-body {
padding: 10px; padding: 10px;
font-size: 12px; font-size: 12px;
@ -1120,11 +1206,13 @@ div.action p.action-body{
text-align: center; text-align: center;
max-width: 350px; max-width: 350px;
} }
.popUpElement { .popUpElement {
font-family: 'Press Start 2P'; font-family: 'Press Start 2P';
text-align: left; text-align: left;
color: white; color: white;
} }
.popUpElement div { .popUpElement div {
font-family: 'Press Start 2P'; font-family: 'Press Start 2P';
font-size: 10px; font-size: 10px;
@ -1141,12 +1229,16 @@ div.action p.action-body{
.popUpElement .buttonContainer { .popUpElement .buttonContainer {
float: right; float: right;
background-color: inherit; background-color: inherit;
} }
@keyframes mymove { @keyframes mymove {
0% {bottom: 40px;} 0% {
50% {bottom: 30px;} bottom: 40px;
100% {bottom: 40px;} }
50% {
bottom: 30px;
}
100% {
bottom: 40px;
}
} }

View File

@ -139,6 +139,7 @@ class IframeListener {
// We are putting a sandbox on this script because it will run in the same domain as the main website. // We are putting a sandbox on this script because it will run in the same domain as the main website.
iframe.sandbox.add('allow-scripts'); iframe.sandbox.add('allow-scripts');
iframe.sandbox.add('allow-top-navigation-by-user-activation'); iframe.sandbox.add('allow-top-navigation-by-user-activation');
iframe.sandbox.add('allow-same-origin');
document.body.prepend(iframe); document.body.prepend(iframe);

View File

@ -174,13 +174,19 @@ export class DiscussionManager {
} }
pMessage.innerHTML = `<span style="font-weight: bold">${name}</span> pMessage.innerHTML = `<span style="font-weight: bold">${name}</span>
<span style="color:#bac2cc;display:inline-block;font-size:12px;"> <span style="color:#bac2cc;display:inline-block;font-size:12px;">
${date.getHours()}:${date.getMinutes()} ${date.getHours() < 10 ? '0' + date.getHours() : date.getHours()}:${date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()}
</span>`; </span>`;
divMessage.appendChild(pMessage); divMessage.appendChild(pMessage);
const userMessage: HTMLParagraphElement = document.createElement('p'); const userMessage: HTMLParagraphElement = document.createElement('p');
userMessage.innerHTML = HtmlUtils.urlify(message); userMessage.innerHTML = HtmlUtils.urlify(message);
userMessage.classList.add('body'); userMessage.classList.add('body');
userMessage.classList.add('nes-balloon');
if (isMe) {
userMessage.classList.add('from-left');
} else {
userMessage.classList.add('from-right');
}
divMessage.appendChild(userMessage); divMessage.appendChild(userMessage);
this.divMessages?.appendChild(divMessage); this.divMessages?.appendChild(divMessage);