').addClass('chat-message ' + (isUser ? 'user-message' : 'bot-message'));
@@ -189,8 +200,13 @@ seu código
files.map(file => `
${file.name}
`).join('')
);
});
-
- // Send message handling
+
+ $("#message-input").keypress(function (e) {
+ if (e.which === 13) {
+ $("#send-message").click();
+ }
+ });
+
$('#send-message').on('click', async function (e) {
e.preventDefault();
const message = messageInput.val().trim();
diff --git a/Chat/Views/Shared/_Layout.cshtml b/Chat/Views/Shared/_Layout.cshtml
index 828a31f..f02cfd2 100644
--- a/Chat/Views/Shared/_Layout.cshtml
+++ b/Chat/Views/Shared/_Layout.cshtml
@@ -16,7 +16,9 @@
#wrapper {
opacity: 1;
transition: opacity 0.3s ease-in-out;
- display: block;
+ flex: 1 0 auto;
+ display: flex;
+ flex-direction: column;
}
#wrapper.fade-out {
@@ -50,8 +52,42 @@
100% { transform: rotate(360deg); }
}
+ html, body {
+ height: 100%;
+ margin: 0;
+ }
+
body {
- display: block;
+ display: flex;
+ flex-direction: column;
+ min-height: 100vh;
+ }
+
+
+ .container, .container-fluid {
+ flex: 1 0 auto;
+ display: flex;
+ flex-direction: column;
+ padding: 1rem;
+ }
+
+ .main-content {
+ flex: 1 0 auto;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .card {
+ flex: 1 0 auto;
+ display: flex;
+ flex-direction: column;
+ margin: 1rem 0;
+ }
+
+ .card-body {
+ flex: 1 0 auto;
+ display: flex;
+ flex-direction: column;
}
@@ -61,8 +97,11 @@
-