Skip to content

Commit

Permalink
[mirotalkc2c] - improve chat UI
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Oct 14, 2024
1 parent 3b5afbc commit 84c231d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.1.35
* @version 1.1.36
*/

require('dotenv').config();
Expand Down
61 changes: 30 additions & 31 deletions frontend/css/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
width: 350px;
max-width: 100%;
height: 100%;
background: linear-gradient(145deg, #282c34, #1c1e24);
background: var(--chat-bg);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--border-radius) 0 0 0;
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
Expand All @@ -19,27 +19,26 @@
opacity 0.3s ease;
}

/* Header */
/* Chat Header */
.chat .header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
background: var(--primary-color);
padding: 16px;
background: #5865f2;
color: white;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--border-radius) 0 0 0;
border-radius: 12px 0 0 0;
}

.chat .header .title {
color: white;
font-weight: 600;
font-size: 1.2rem;
letter-spacing: 0.5px;
font-weight: bold;
font-size: 1.4rem;
}

.chat .header .header-buttons {
display: inline;
float: right;
display: flex;
gap: 12px;
}

.chat .header button {
Expand All @@ -52,7 +51,8 @@
}

.chat .header button:hover {
color: #439fff;
transform: scale(1.2);
transition: all 0.3s ease-in-out;
}

/* Chat Body */
Expand All @@ -63,37 +63,35 @@
height: 80vh;
flex-grow: 1;
scrollbar-width: thin;
scrollbar-color: var(--primary-color) transparent;
scrollbar-color: #5865f2 #2f3136;
transition: max-height 0.3s ease;
}

.chat .body .msg {
display: flex;
flex-direction: column;
margin-bottom: 10px;
padding: 10px;
}

.chat .body .msg .from {
padding: 5px;
font-weight: bold;
color: var(--secondary-color);
border-bottom: 0.1px solid #439fff;
margin-bottom: 5px;
font-size: 0.9rem;
color: #ccc;
}

.chat .body .msg.sent .from {
align-self: flex-start;
text-align: left;
margin: 0;
}

.chat .body .msg.received .from {
align-self: flex-end;
text-align: right;
margin: 0;
}

.chat .body .msg .text {
padding: 5px;
border-radius: 10px;
padding: 10px;
border-radius: 12px;
background: var(--chat-bg);
color: var(--text-color);
overflow: auto;
Expand All @@ -104,20 +102,20 @@
.chat .body .msg.sent .text {
background: #495057;
color: white;
border-radius: 10px 10px 10px 0;
border-radius: 12px 12px 12px 0;
}

.chat .body .msg.received .text {
background: #1c7ed6;
background: #5865f2;
color: white;
border-radius: 10px 10px 0 10px;
border-radius: 12px 12px 0 12px;
}

.chat .body .msg .text:hover {
background-color: rgba(255, 255, 255, 0.05);
}

/* Footer */
/* Chat Footer */
.chat .footer {
position: absolute;
bottom: 0px;
Expand All @@ -132,8 +130,8 @@
.chat .footer textarea {
flex-grow: 1;
padding: 5px;
height: 20px;
border: 1px solid var(--primary-color);
height: 40px;
border: 1px solid #5865f2;
border-radius: 8px;
background: #2b2d36;
color: var(--text-color);
Expand All @@ -143,10 +141,10 @@
}

.chat .footer textarea:focus {
border-color: #439fff;
border-color: #5865f2;
height: 60px;
outline: none;
box-shadow: 0 0 5px #439fff;
box-shadow: 0 0 5px #5865f2;
}

.chat .footer .footer-buttons {
Expand All @@ -161,7 +159,7 @@
padding: 5px;
border: none;
border-radius: 50px;
background: #439fff;
background: #5865f2;
color: white;
text-align: center;
font-size: 1.1rem;
Expand Down Expand Up @@ -209,6 +207,7 @@
display: block;
}

/* Responsive for mobile */
@media (max-width: 768px) {
.chat {
position: fixed;
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com or purchase it directly via Code Canyon:
* @license https://codecanyon.net/item/mirotalk-c2c-webrtc-real-time-cam-2-cam-video-conferences-and-screen-sharing/43383005
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.1.35
* @version 1.1.36
*/

const roomId = new URLSearchParams(window.location.search).get('room');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkc2c",
"version": "1.1.35",
"version": "1.1.36",
"description": "A free WebRTC Cam-2-Cam browser-based video calls",
"main": "server.js",
"scripts": {
Expand Down

0 comments on commit 84c231d

Please sign in to comment.