FIX: chat and room size
All checks were successful
Deploy React / build-and-deploy (push) Successful in 15s
All checks were successful
Deploy React / build-and-deploy (push) Successful in 15s
This commit is contained in:
@@ -17,5 +17,5 @@
|
|||||||
.toolbutton {
|
.toolbutton {
|
||||||
margin: .5rem;
|
margin: .5rem;
|
||||||
height: 80%;
|
height: 80%;
|
||||||
width: 20%;
|
width: 10%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,26 +9,24 @@
|
|||||||
background-color: var(--card) ;
|
background-color: var(--card) ;
|
||||||
display: grid;
|
display: grid;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Room card */
|
/* Room card */
|
||||||
.card {
|
.card {
|
||||||
background-color: var(--panel) ;
|
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
gap: 0.5rem;
|
||||||
|
background-color: var(--panel) ;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.roomCard input {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-around;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,22 +7,34 @@
|
|||||||
background: var(--card);
|
background: var(--card);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
height: 93vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.convlist {
|
.convHeader {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 20%;
|
height: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.convList{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding: 8px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.convcard {
|
.convcard {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
background: var(--panel);
|
background: var(--panel);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.convcard:hover {
|
.convcard:hover {
|
||||||
@@ -31,7 +43,7 @@
|
|||||||
|
|
||||||
.senderBox{
|
.senderBox{
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 10%;
|
height: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.senderBox * {
|
.senderBox * {
|
||||||
@@ -47,17 +59,18 @@ width: 70%;
|
|||||||
|
|
||||||
.sendbutton{
|
.sendbutton{
|
||||||
width: 30%;
|
width: 30%;
|
||||||
|
border-radius: 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.messageCard {
|
.messageCard {
|
||||||
height: 100%;
|
height: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|
||||||
background: var(--messageCard);
|
background: var(--messageCard);
|
||||||
overflow-y: auto;
|
overflow-y:scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Messages */
|
/* Messages */
|
||||||
@@ -92,6 +105,10 @@ margin: 5px;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.convUtils{
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
.convUtils button {
|
.convUtils button {
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ export default function ChatWidget({convlist}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="chatWidget">
|
<div className="chatWidget">
|
||||||
<div className="convlist">
|
<div className="convHeader">
|
||||||
{convlist.map(conv => (
|
<div className="convList">
|
||||||
|
{convlist.map(conv => (
|
||||||
<ConvCard
|
<ConvCard
|
||||||
key={conv.id}
|
key={conv.id}
|
||||||
id={conv.id}
|
id={conv.id}
|
||||||
@@ -47,7 +48,9 @@ export default function ChatWidget({convlist}) {
|
|||||||
onOpenConv={setActiveConvId}
|
onOpenConv={setActiveConvId}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="convUtils">
|
<div className="convUtils">
|
||||||
<button
|
<button
|
||||||
disabled={!activeConvId}
|
disabled={!activeConvId}
|
||||||
@@ -137,8 +140,7 @@ function SenderBox({ conv_id, onSend, disabled }) {
|
|||||||
function ConvCard({id, title, onOpenConv}) {
|
function ConvCard({id, title, onOpenConv}) {
|
||||||
return(
|
return(
|
||||||
<div className="convcard" onClick={() => onOpenConv(id)} >
|
<div className="convcard" onClick={() => onOpenConv(id)} >
|
||||||
<h3>ConvId : {id} </h3>
|
<h3>{title}</h3>
|
||||||
<h3>Name : {title}</h3>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ function RoomCard({ number, status ,id}) {
|
|||||||
return (
|
return (
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<h3>Room {number}</h3>
|
<h3>Room {number}</h3>
|
||||||
<h4>Id {id}</h4>
|
|
||||||
|
|
||||||
{!editing ?(
|
{!editing ?(
|
||||||
<p onClick={() => setEdtiting(true)} style={{ cursor: "pointer" }}>
|
<p onClick={() => setEdtiting(true)} style={{ cursor: "pointer" }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user