Added chat page

This commit is contained in:
mrfry 2021-05-26 18:37:06 +02:00
parent 3a67f2a1aa
commit c60ace4f9b
2 changed files with 664 additions and 0 deletions

172
src/pages/chat.module.css Normal file
View file

@ -0,0 +1,172 @@
.chat {
display: flex;
align-items: stretch;
height: 100%;
}
.main {
display: flex;
flex-flow: column;
flex: 1 0;
}
.sidebar {
display: flex;
flex-direction: column;
width: calc(20vw);
z-index: 1;
right: 0;
overflow-x: hidden;
}
.sidebar > div:last-child {
text-align: center;
cursor: pointer;
}
.usersContainer {
padding: 0px 5px;
user-select: none;
}
.usersContainer > div {
cursor: pointer;
}
.spacer {
flex: 1 1;
}
.new {
display: flex;
flex-direction: column;
align-self: center;
margin: 5px;
width: 140px;
text-align: center;
}
.new > input {
text-align: center;
}
.group {
padding: 15px;
cursor: pointer;
user-select: none;
transition: width 0.5s, height 0.5s, ease-in 0.5s;
}
.group > div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.group:hover {
background-color: var(--hoover-color);
}
.activeSidebarItem {
color: black;
background-color: var(--primary-color);
}
.activeSidebarItem:hover {
background-color: var(--primary-color);
}
.unread {
color: var(--text-color);
}
.header {
display: flex;
justify-content: center;
color: var(--text-color);
display: flex;
align-items: center;
padding: 10px 0px;
}
.messages {
display: flex;
flex-flow: column;
word-break: break-all;
padding: 5px 0px;
overflow-x: none;
overflow-y: auto;
flex: 1 0 200px;
}
.chatInput {
display: flex;
align-items: center;
padding: 4px 0px;
}
.chatInput > input {
padding: 2px;
height: 30px;
}
.messageContainer {
display: flex;
margin: 2px 10px;
max-width: 300px;
}
.ownMsg {
align-self: flex-end;
justify-content: flex-end;
}
.ownMsg > div {
background-color: #99f;
}
.partnerMsg > div {
background-color: var(--primary-color);
}
.unreadMarker {
align-self: flex-end;
justify-content: flex-end;
font-size: 14px;
padding: 0px 5px;
}
.newMarker {
font-size: 14px;
padding: 0px 5px;
}
.messageEntry {
padding: 5px 8px;
border-radius: 4px;
color: black;
}
.sendButton {
width: 90px;
}
.home {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.home input {
text-align: center;
width: 300px;
}