@@ -50,10 +50,69 @@ const chatTheme = (viewHeight) => {
50
50
}
51
51
}
52
52
const auxiliaryStyle = ( ) => {
53
+ const common = `
54
+ .inner-message-container{
55
+ position:relative;
56
+ }
57
+ .lds-ripple {
58
+ color: #1c4c5b
59
+ }
60
+ .lds-ripple,
61
+ .lds-ripple div {
62
+ box-sizing: border-box;
63
+ }
64
+ .lds-ripple {
65
+ display: inline-block;
66
+ position: relative;
67
+ width: 80px;
68
+ height: 80px;
69
+ }
70
+ .lds-ripple div {
71
+ position: absolute;
72
+ border: 4px solid currentColor;
73
+ opacity: 1;
74
+ border-radius: 50%;
75
+ animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
76
+ }
77
+ .lds-ripple div:nth-child(2) {
78
+ animation-delay: -0.5s;
79
+ }
80
+ @keyframes lds-ripple {
81
+ 0% {
82
+ top: 36px;
83
+ left: 36px;
84
+ width: 8px;
85
+ height: 8px;
86
+ opacity: 0;
87
+ }
88
+ 4.9% {
89
+ top: 36px;
90
+ left: 36px;
91
+ width: 8px;
92
+ height: 8px;
93
+ opacity: 0;
94
+ }
95
+ 5% {
96
+ top: 36px;
97
+ left: 36px;
98
+ width: 8px;
99
+ height: 8px;
100
+ opacity: 1;
101
+ }
102
+ 100% {
103
+ top: 0;
104
+ left: 0;
105
+ width: 80px;
106
+ height: 80px;
107
+ opacity: 0;
108
+ }
109
+ }`
53
110
if ( isDrak ( ) ) {
54
- return "::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track { background-color: #1c1c1c;}" ;
111
+ return `${ common }
112
+ ::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track { background-color: #1c1c1c;}` ;
55
113
} else {
56
- return "::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track { background-color: #ffffff;}" ;
114
+ return `${ common }
115
+ ::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track { background-color: #ffffff;}` ;
57
116
}
58
117
}
59
118
@@ -111,8 +170,21 @@ const messageStyles = () => {
111
170
"wordBreak" : "break-all" ,
112
171
// "marginTop":"15px","marginBottom":"15px"
113
172
}
173
+ const loading = {
174
+ "bubble" : { "backgroundColor" : "#9855f7" , "fontSize" : "20px" , "color" : "white" } ,
175
+ "history" : {
176
+ "full" : {
177
+ "styles" : { "outerContainer" : { "marginTop" : "28px" } } ,
178
+ "html" : "<div class=\"lds-ripple\"><div></div><div></div></div>"
179
+ } ,
180
+ "small" : {
181
+ "styles" : { "outerContainer" : { "marginTop" : "-10px" , "marginBottom" : "50px" } } ,
182
+ } ,
183
+ }
184
+ }
114
185
if ( isDrak ( ) ) {
115
186
return {
187
+ loading,
116
188
"default" : {
117
189
ai : {
118
190
innerContainer,
@@ -130,6 +202,7 @@ const messageStyles = () => {
130
202
} ;
131
203
} else {
132
204
return {
205
+ loading,
133
206
"default" : {
134
207
ai : {
135
208
innerContainer,
0 commit comments