@@ -80,62 +80,35 @@ export default class ProjectEvaluationPage extends ObservedComponent<
8080 const name = isBot ? `${ t ( 'ai_assistant' ) } 🤖` : createdBy ?. name || 'User' ;
8181
8282 return (
83- < Box
83+ < div
8484 key = { id }
8585 id = { index + 1 === length ? 'last-message' : undefined }
86- sx = { {
87- display : 'flex' ,
88- justifyContent : isBot ? 'flex-start' : 'flex-end' ,
89- mb : 2 ,
90- width : '100%' ,
91- } }
86+ className = { `mb-2 flex w-full ${ isBot ? 'justify-start' : 'justify-end' } ` }
9287 >
93- < Box
94- sx = { {
95- display : 'flex' ,
96- flexDirection : isBot ? 'row' : 'row-reverse' ,
97- alignItems : 'flex-start' ,
98- maxWidth : { xs : '95%' , sm : '80%' } ,
99- gap : 1 ,
100- } }
88+ < div
89+ className = { `flex items-start gap-1 max-w-[95%] sm:max-w-[80%] ${ isBot ? 'flex-row' : 'flex-row-reverse' } ` }
10190 >
102- < Avatar
103- src = { avatarSrc }
104- alt = { name }
105- sx = { {
106- width : { xs : 28 , sm : 32 } ,
107- height : { xs : 28 , sm : 32 } ,
108- } }
109- />
91+ < Avatar src = { avatarSrc } alt = { name } className = "h-7 w-7 sm:h-8 sm:w-8" />
11092 < Paper
11193 elevation = { 1 }
94+ className = "rounded-[16px_16px_4px_16px] p-1.5 sm:p-2 bg-primary-light text-primary-contrast"
11295 sx = { {
113- p : { xs : 1.5 , sm : 2 } ,
11496 backgroundColor : 'primary.light' ,
11597 color : 'primary.contrastText' ,
116- borderRadius : '16px 16px 4px 16px' ,
11798 } }
11899 >
119100 < Typography
120101 variant = "caption"
121102 display = "block"
122- sx = { {
123- mb : 0.5 ,
124- opacity : 0.8 ,
125- fontSize : { xs : '0.7rem' , sm : '0.75rem' } ,
126- } }
103+ className = "mb-0.5 text-[0.7rem] opacity-80 sm:text-[0.75rem]"
127104 >
128105 { name }
129106 </ Typography >
130107
131108 { content && (
132109 < Typography
133- className = "prose"
110+ className = "prose mb-1 text-[0.875rem] sm:text-base "
134111 variant = "body2"
135- sx = { {
136- mb : 1 ,
137- fontSize : { xs : '0.875rem' , sm : '1rem' } ,
138- } }
139112 dangerouslySetInnerHTML = { { __html : marked ( content ) } }
140113 />
141114 ) }
@@ -148,19 +121,13 @@ export default class ProjectEvaluationPage extends ObservedComponent<
148121 />
149122 ) }
150123 { createdAt && (
151- < Typography
152- variant = "caption"
153- sx = { {
154- opacity : 0.6 ,
155- fontSize : { xs : '0.65rem' , sm : '0.75rem' } ,
156- } }
157- >
124+ < Typography variant = "caption" className = "text-[0.65rem] opacity-60 sm:text-[0.75rem]" >
158125 { new Date ( createdAt ) . toLocaleTimeString ( ) }
159126 </ Typography >
160127 ) }
161128 </ Paper >
162- </ Box >
163- </ Box >
129+ </ div >
130+ </ div >
164131 ) ;
165132 } ;
166133
@@ -178,66 +145,36 @@ export default class ProjectEvaluationPage extends ObservedComponent<
178145
179146 < Container
180147 maxWidth = "md"
181- sx = { {
182- height : { xs : 'calc(100vh - 120px)' , md : '85vh' } ,
183- display : 'flex' ,
184- flexDirection : 'column' ,
185- gap : { xs : '0.5rem' , sm : '1rem' } ,
186- px : { xs : 0 , sm : 2 } ,
187- } }
148+ className = "flex h-[calc(100vh-120px)] flex-col gap-2 px-0 sm:gap-4 sm:px-2 md:h-[85vh]"
188149 >
189150 < Typography
190151 component = "h1"
191- sx = { {
192- mt : { xs : 2 , sm : 4 , md : 20 } ,
193- mb : { xs : 1 , sm : 2 } ,
194- fontSize : { xs : '1.5rem' , sm : '2rem' , md : '3rem' } ,
195- fontWeight : 'bold' ,
196- px : { xs : 2 , sm : 0 } ,
197- } }
152+ className = "mb-1 mt-2 px-2 text-2xl font-bold sm:mb-2 sm:mt-4 sm:px-0 sm:text-3xl md:mt-20 md:text-5xl"
198153 >
199154 { title }
200155 </ Typography >
201156 { /* Chat Messages Area */ }
202- < Box sx = { { flex : 1 , overflow : ' auto' , mb : 2 } } >
157+ < div className = "mb-2 flex-1 overflow- auto" >
203158 < ScrollList
204159 translator = { i18n }
205160 store = { messageStore }
206161 filter = { { project : projectId } }
207162 renderList = { allItems => (
208- < Box
209- sx = { {
210- height : '100%' ,
211- overflowY : 'auto' ,
212- p : { xs : 1 , sm : 2 } ,
213- } }
214- >
163+ < div className = "h-full overflow-y-auto p-1 sm:p-2" >
215164 { allItems . map ( this . renderChatMessage ) }
216- </ Box >
165+ </ div >
217166 ) }
218167 />
219- </ Box >
168+ </ div >
220169
221170 { /* Message Input Form */ }
222171 < Paper
223172 component = "form"
224173 elevation = { 1 }
225- sx = { {
226- p : { xs : 1.5 , sm : 2 } ,
227- mt : 'auto' ,
228- mx : { xs : 1 , sm : 0 } ,
229- mb : { xs : 1 , sm : 0 } ,
230- } }
174+ className = "mx-1 mb-1 mt-auto p-1.5 sm:mx-0 sm:mb-0 sm:p-2"
231175 onSubmit = { this . handleMessageSubmit }
232176 >
233- < Box
234- sx = { {
235- display : 'flex' ,
236- gap : 1 ,
237- alignItems : 'flex-end' ,
238- flexDirection : { xs : 'column' , sm : 'row' } ,
239- } }
240- >
177+ < div className = "flex flex-col items-end gap-1 sm:flex-row" >
241178 < TextField
242179 name = "content"
243180 placeholder = { t ( 'type_your_message' ) }
@@ -251,16 +188,12 @@ export default class ProjectEvaluationPage extends ObservedComponent<
251188 < Button
252189 type = "submit"
253190 variant = "contained"
254- sx = { {
255- minWidth : { xs : '100%' , sm : 'auto' } ,
256- px : 2 ,
257- whiteSpace : 'nowrap' ,
258- } }
191+ className = "min-w-full whitespace-nowrap px-2 sm:min-w-0"
259192 disabled = { messageStore . uploading > 0 }
260193 >
261194 { t ( 'send' ) }
262195 </ Button >
263- </ Box >
196+ </ div >
264197 </ Paper >
265198 </ Container >
266199 </ SessionBox >
0 commit comments