Spaces:
Paused
Paused
Update flare-ui/src/app/components/chat/chat.component.scss
Browse files
flare-ui/src/app/components/chat/chat.component.scss
CHANGED
|
@@ -1,13 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
.start-wrapper {
|
| 2 |
display: flex;
|
| 3 |
justify-content: center;
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
}
|
| 6 |
|
| 7 |
.chat-card {
|
|
|
|
| 8 |
display: flex;
|
| 9 |
flex-direction: column;
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
|
| 13 |
.chat-history {
|
|
@@ -15,18 +42,27 @@
|
|
| 15 |
overflow-y: auto;
|
| 16 |
padding: 16px;
|
| 17 |
background: #fafafa;
|
|
|
|
| 18 |
}
|
| 19 |
|
| 20 |
.msg-row {
|
| 21 |
display: flex;
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
&.me {
|
| 25 |
justify-content: flex-end;
|
|
|
|
| 26 |
|
| 27 |
.bubble {
|
| 28 |
-
background: #
|
| 29 |
-
color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
}
|
| 32 |
|
|
@@ -34,25 +70,91 @@
|
|
| 34 |
justify-content: flex-start;
|
| 35 |
|
| 36 |
.bubble {
|
| 37 |
-
background: #
|
| 38 |
color: #000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
}
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
.bubble {
|
| 43 |
max-width: 70%;
|
| 44 |
-
padding:
|
| 45 |
border-radius: 16px;
|
| 46 |
-
line-height: 1.
|
| 47 |
word-wrap: break-word;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
}
|
| 49 |
}
|
| 50 |
|
| 51 |
.input-row {
|
| 52 |
display: flex;
|
| 53 |
-
padding:
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
.flex-1 {
|
| 56 |
flex: 1;
|
| 57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.chat-container {
|
| 2 |
+
height: 100%;
|
| 3 |
+
padding: 24px;
|
| 4 |
+
max-width: 900px;
|
| 5 |
+
margin: 0 auto;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
.start-wrapper {
|
| 9 |
display: flex;
|
| 10 |
justify-content: center;
|
| 11 |
+
align-items: center;
|
| 12 |
+
min-height: 400px;
|
| 13 |
+
|
| 14 |
+
mat-card {
|
| 15 |
+
max-width: 500px;
|
| 16 |
+
width: 100%;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.project-select {
|
| 20 |
+
width: 100%;
|
| 21 |
+
margin-bottom: 16px;
|
| 22 |
+
}
|
| 23 |
}
|
| 24 |
|
| 25 |
.chat-card {
|
| 26 |
+
height: calc(100vh - 200px);
|
| 27 |
display: flex;
|
| 28 |
flex-direction: column;
|
| 29 |
+
|
| 30 |
+
mat-card-header {
|
| 31 |
+
background-color: #f5f5f5;
|
| 32 |
+
padding: 16px;
|
| 33 |
+
|
| 34 |
+
.spacer {
|
| 35 |
+
flex: 1;
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
}
|
| 39 |
|
| 40 |
.chat-history {
|
|
|
|
| 42 |
overflow-y: auto;
|
| 43 |
padding: 16px;
|
| 44 |
background: #fafafa;
|
| 45 |
+
min-height: 300px;
|
| 46 |
}
|
| 47 |
|
| 48 |
.msg-row {
|
| 49 |
display: flex;
|
| 50 |
+
align-items: flex-start;
|
| 51 |
+
margin: 12px 0;
|
| 52 |
+
gap: 8px;
|
| 53 |
|
| 54 |
&.me {
|
| 55 |
justify-content: flex-end;
|
| 56 |
+
flex-direction: row-reverse;
|
| 57 |
|
| 58 |
.bubble {
|
| 59 |
+
background: #3f51b5;
|
| 60 |
+
color: white;
|
| 61 |
+
border-bottom-right-radius: 4px;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.msg-icon {
|
| 65 |
+
color: #3f51b5;
|
| 66 |
}
|
| 67 |
}
|
| 68 |
|
|
|
|
| 70 |
justify-content: flex-start;
|
| 71 |
|
| 72 |
.bubble {
|
| 73 |
+
background: #e8eaf6;
|
| 74 |
color: #000;
|
| 75 |
+
border-bottom-left-radius: 4px;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.msg-icon {
|
| 79 |
+
color: #7986cb;
|
| 80 |
}
|
| 81 |
}
|
| 82 |
|
| 83 |
+
.msg-icon {
|
| 84 |
+
margin-top: 4px;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
.bubble {
|
| 88 |
max-width: 70%;
|
| 89 |
+
padding: 12px 16px;
|
| 90 |
border-radius: 16px;
|
| 91 |
+
line-height: 1.5;
|
| 92 |
word-wrap: break-word;
|
| 93 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
| 94 |
+
|
| 95 |
+
// Animation for new messages
|
| 96 |
+
animation: slideIn 0.3s ease-out;
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
@keyframes slideIn {
|
| 101 |
+
from {
|
| 102 |
+
opacity: 0;
|
| 103 |
+
transform: translateY(10px);
|
| 104 |
+
}
|
| 105 |
+
to {
|
| 106 |
+
opacity: 1;
|
| 107 |
+
transform: translateY(0);
|
| 108 |
}
|
| 109 |
}
|
| 110 |
|
| 111 |
.input-row {
|
| 112 |
display: flex;
|
| 113 |
+
padding: 16px;
|
| 114 |
+
gap: 12px;
|
| 115 |
+
align-items: flex-start;
|
| 116 |
+
background-color: #fff;
|
| 117 |
|
| 118 |
.flex-1 {
|
| 119 |
flex: 1;
|
| 120 |
}
|
| 121 |
+
|
| 122 |
+
.send-button {
|
| 123 |
+
margin-top: 8px;
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
// Loading state
|
| 128 |
+
.loading-spinner {
|
| 129 |
+
display: flex;
|
| 130 |
+
justify-content: center;
|
| 131 |
+
padding: 20px;
|
| 132 |
}
|
| 133 |
+
|
| 134 |
+
// Error state
|
| 135 |
+
.error-message {
|
| 136 |
+
color: #f44336;
|
| 137 |
+
padding: 16px;
|
| 138 |
+
text-align: center;
|
| 139 |
+
background-color: #ffebee;
|
| 140 |
+
border-radius: 4px;
|
| 141 |
+
margin: 16px;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
// Scrollbar styling
|
| 145 |
+
.chat-history::-webkit-scrollbar {
|
| 146 |
+
width: 8px;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.chat-history::-webkit-scrollbar-track {
|
| 150 |
+
background: #f1f1f1;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
.chat-history::-webkit-scrollbar-thumb {
|
| 154 |
+
background: #888;
|
| 155 |
+
border-radius: 4px;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.chat-history::-webkit-scrollbar-thumb:hover {
|
| 159 |
+
background: #555;
|
| 160 |
+
}
|