Skip to content

Commit befe7d4

Browse files
committed
Chat component has been created.
1 parent 5f1b629 commit befe7d4

File tree

6 files changed

+388
-58
lines changed

6 files changed

+388
-58
lines changed

app/src/App.css

Lines changed: 208 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@
275275
/* Panel */
276276
.Panel-body {
277277
font-family: 'Inter', sans-serif;
278+
overflow-x: hidden;
278279
}
279280

280281
/* Create update bot window */
@@ -370,6 +371,7 @@
370371
width: 100vw;
371372
margin: 0;
372373
padding: 0;
374+
overflow: hidden;
373375
}
374376

375377
.db {
@@ -425,22 +427,26 @@
425427
height: 46%;
426428
width: 96%;
427429
margin: 2%;
428-
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
430+
box-shadow: 0px 15px 25px 7px rgba(0, 0, 0, 0.1);
431+
border-radius: 10px;
429432
}
430433

431434
.db-chatlist {
432435
height: 100%;
433436
width: 46.5%;
434437
margin: 0 1.5% 0 2%;
435-
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
438+
box-shadow: 0px 15px 25px 7px rgba(0, 0, 0, 0.1);
439+
border-radius: 10px;
440+
overflow: hidden;
436441
}
437442

438443
.db-happy {
439444
position: relative;
440445
height: 100%;
441446
width: 46.5%;
442447
margin: 0 2% 0 1.5%;
443-
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
448+
box-shadow: 0px 15px 25px 7px rgba(0, 0, 0, 0.1);
449+
border-radius: 10px;
444450
}
445451

446452
.db-chathistory {
@@ -457,7 +463,9 @@
457463
height: 94%;
458464
width: 94%;
459465
margin: 3%;
460-
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
466+
box-shadow: 0px 15px 25px 7px rgba(0, 0, 0, 0.1);
467+
border-radius: 10px;
468+
overflow-y: auto;
461469
}
462470

463471
.db-h2 {
@@ -476,6 +484,7 @@
476484
border-radius: 10px;
477485
border: 0 solid;
478486
margin: 10px;
487+
box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, 0.1);
479488
}
480489

481490
.db-update:hover {
@@ -502,10 +511,10 @@
502511
display: flex;
503512
padding: 15px;
504513
margin: 5px;
505-
border-radius: 15px;
514+
border-radius: 10px;
506515
align-items: center;
507516
background-color: white;
508-
box-shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.1);
517+
box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, 0.1);
509518
}
510519

511520
.db-user-block:hover {
@@ -580,22 +589,33 @@
580589
justify-content: center;
581590
}
582591

592+
.detailbox-container {
593+
height: 100%;
594+
overflow-y: auto;
595+
}
596+
583597
.db-cl-head-element {
584598
height: 60%;
585599
padding: 2%;
586600
}
587601

588-
.db-ch-basecontainer {
602+
.db-ch-dbcontainer {
603+
overflow-y: hidden;
604+
}
605+
606+
.db-ch-center {
589607
width: 100%;
590-
overflow-y: auto;
608+
display: flex;
609+
flex-direction: column;
610+
justify-content: center;
591611
}
592612

593613
.db-ch-detailbox {
594614
width: 80%;
595615
border: 1px solid #4B5865;
596616
border-radius: 12px;
597617
padding: 15px;
598-
overflow-y: hidden;
618+
overflow-y: auto;
599619
}
600620

601621
.db-ch-ln2container {
@@ -618,10 +638,6 @@
618638
outline: 2px solid #5850EC;
619639
}
620640

621-
.db-ch-basecontainer {
622-
height: 100%;
623-
}
624-
625641
.cdb-container {
626642
display: flex;
627643
justify-content: space-between;
@@ -659,4 +675,182 @@
659675
/* Handle on hover */
660676
::-webkit-scrollbar-thumb:hover {
661677
background: #585757;
662-
}
678+
}
679+
680+
/* Chat */
681+
.message-body {
682+
height: 95%;
683+
width: 95%;
684+
background-color: transparent;
685+
box-shadow: 0px 10px 20px 5px rgba(0, 0, 0, 0.1);
686+
border-radius: 15px;
687+
}
688+
689+
.chat-header {
690+
background-color: #5850EC;
691+
color: #FFFFFF;
692+
display: flex;
693+
justify-content: space-between;
694+
align-items: center;
695+
height: 15%;
696+
width: 100%;
697+
border-radius: 15px 15px 0 0;
698+
}
699+
700+
.message {
701+
border-radius: 10px;
702+
padding: 8px;
703+
margin: 4px;
704+
max-width: 85%;
705+
}
706+
707+
.user {
708+
border-radius: 10px 10px 10px 0;
709+
background-color: #939ADF;
710+
color: white;
711+
}
712+
713+
.assistant {
714+
border-radius: 10px 10px 0 10px;
715+
background-color: #5850EC;
716+
color: white;
717+
}
718+
719+
.message-input {
720+
display: flex;
721+
justify-content: space-between;
722+
width: 95%;
723+
height: 15%;
724+
margin: 2%;
725+
}
726+
727+
.Chat-input {
728+
width: 80%;
729+
padding: 2%;
730+
border-radius: 15px;
731+
border: 1px solid #4B5865;
732+
background-color: #F9FAFB;
733+
box-shadow: 0px 5px 10px 3px rgba(0, 0, 0, 0.1);
734+
}
735+
736+
.Chat-input:focus {
737+
outline: 1px solid #5850EC;
738+
}
739+
740+
.chat-main {
741+
display: flex;
742+
flex-direction: column;
743+
width: 100%;
744+
height: 85%;
745+
background-color: white;
746+
border-radius: 0 0 15px 15px;
747+
font-size: 14px;
748+
}
749+
750+
.db-chat {
751+
display: flex;
752+
flex-direction: column;
753+
height: 100%;
754+
}
755+
756+
.db-chat-c1 {
757+
flex: 0 0 44%;
758+
}
759+
760+
.db-chat-c2 {
761+
display: flex;
762+
justify-content: center;
763+
flex: 0 0 55%;
764+
}
765+
766+
767+
.message-container {
768+
display: flex;
769+
margin-bottom: 10px;
770+
}
771+
772+
.assistant .message-container {
773+
justify-content: flex-end;
774+
}
775+
776+
.user .message-container {
777+
justify-content: flex-start;
778+
}
779+
780+
.message-send-btn {
781+
background-color: #5850EC;
782+
border-radius: 20px;
783+
height: 40px;
784+
width: 40px;
785+
border: none;
786+
display: inline-flex;
787+
align-items: center;
788+
justify-content: center;
789+
box-shadow: 0px 10px 12px 5px rgba(0, 0, 0, 0.1);
790+
}
791+
792+
.chat-messages {
793+
display: flex;
794+
flex-direction: column;
795+
max-height: 300px;
796+
padding: 10px;
797+
overflow-y: auto;
798+
height: 90%;
799+
max-width: 95%;
800+
}
801+
802+
/* Media queries for different screen sizes */
803+
@media screen and (max-width: 2560px) {
804+
.chat-messages {
805+
max-height: 300px;
806+
}
807+
}
808+
809+
@media screen and (max-width: 2000) {
810+
.chat-messages {
811+
max-height: 270px;
812+
}
813+
}
814+
815+
@media screen and (max-width: 1600px) {
816+
.chat-messages {
817+
max-height: 240px;
818+
}
819+
}
820+
821+
@media screen and (max-width: 1550px) {
822+
.chat-messages {
823+
max-height: 230px;
824+
}
825+
}
826+
827+
@media screen and (max-width: 1440px) {
828+
.chat-messages {
829+
max-height: 200px;
830+
}
831+
}
832+
833+
@media screen and (max-width: 1024px) {
834+
.chat-messages {
835+
max-height: 180px;
836+
}
837+
}
838+
839+
.message-container.user {
840+
align-self: flex-start;
841+
max-width: 60%;
842+
}
843+
844+
.message-container.assistant {
845+
align-self: flex-end;
846+
width: 60%;
847+
}
848+
849+
.message-container {
850+
margin-bottom: 10px;
851+
}
852+
853+
.message {
854+
padding: 8px;
855+
border-radius: 5px;
856+
}

0 commit comments

Comments
 (0)