@@ -80,44 +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 : '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 src = { avatarSrc } alt = { name } sx = { { width : 32 , height : 32 } } />
91+ < Avatar src = { avatarSrc } alt = { name } className = "h-7 w-7 sm:h-8 sm:w-8" />
10392 < Paper
10493 elevation = { 1 }
94+ className = "rounded-[16px_16px_4px_16px] p-1.5 sm:p-2 bg-primary-light text-primary-contrast"
10595 sx = { {
106- p : 2 ,
10796 backgroundColor : 'primary.light' ,
10897 color : 'primary.contrastText' ,
109- borderRadius : '16px 16px 4px 16px' ,
11098 } }
11199 >
112- < Typography variant = "caption" display = "block" sx = { { mb : 0.5 , opacity : 0.8 } } >
100+ < Typography
101+ variant = "caption"
102+ display = "block"
103+ className = "mb-0.5 text-[0.7rem] opacity-80 sm:text-[0.75rem]"
104+ >
113105 { name }
114106 </ Typography >
115107
116108 { content && (
117109 < Typography
118- className = "prose"
110+ className = "prose mb-1 text-[0.875rem] sm:text-base "
119111 variant = "body2"
120- sx = { { mb : 1 } }
121112 dangerouslySetInnerHTML = { { __html : marked ( content ) } }
122113 />
123114 ) }
@@ -130,13 +121,13 @@ export default class ProjectEvaluationPage extends ObservedComponent<
130121 />
131122 ) }
132123 { createdAt && (
133- < Typography variant = "caption" sx = { { opacity : 0.6 , fontSize : ' 0.75rem' } } >
124+ < Typography variant = "caption" className = "text-[0.65rem] opacity-60 sm:text-[ 0.75rem]" >
134125 { new Date ( createdAt ) . toLocaleTimeString ( ) }
135126 </ Typography >
136127 ) }
137128 </ Paper >
138- </ Box >
139- </ Box >
129+ </ div >
130+ </ div >
140131 ) ;
141132 } ;
142133
@@ -154,31 +145,36 @@ export default class ProjectEvaluationPage extends ObservedComponent<
154145
155146 < Container
156147 maxWidth = "md"
157- sx = { { height : '85vh' , display : ' flex' , flexDirection : 'column' , gap : '1rem' } }
148+ className = "flex h-[calc(100vh-120px)] flex-col gap-2 px-0 sm: gap-4 sm:px-2 md:h-[85vh]"
158149 >
159- < h1 className = "mt-20 text-3xl font-bold" > { title } </ h1 >
150+ < Typography
151+ component = "h1"
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"
153+ >
154+ { title }
155+ </ Typography >
160156 { /* Chat Messages Area */ }
161- < Box sx = { { flex : 1 , overflow : ' auto' , mb : 2 } } >
157+ < div className = "mb-2 flex-1 overflow- auto" >
162158 < ScrollList
163159 translator = { i18n }
164160 store = { messageStore }
165161 filter = { { project : projectId } }
166162 renderList = { allItems => (
167- < Box sx = { { height : '100%' , overflowY : ' auto' , p : 1 } } >
163+ < div className = "h-full overflow-y- auto p-1 sm:p-2" >
168164 { allItems . map ( this . renderChatMessage ) }
169- </ Box >
165+ </ div >
170166 ) }
171167 />
172- </ Box >
168+ </ div >
173169
174170 { /* Message Input Form */ }
175171 < Paper
176172 component = "form"
177173 elevation = { 1 }
178- sx = { { p : 2 , mt : 'auto' } }
174+ className = "mx-1 mb-1 mt-auto p-1.5 sm:mx-0 sm:mb-0 sm:p-2"
179175 onSubmit = { this . handleMessageSubmit }
180176 >
181- < Box sx = { { display : ' flex' , gap : 1 , alignItems : ' flex-end' } } >
177+ < div className = "flex flex-col items-end gap-1 sm: flex-row" >
182178 < TextField
183179 name = "content"
184180 placeholder = { t ( 'type_your_message' ) }
@@ -191,14 +187,13 @@ export default class ProjectEvaluationPage extends ObservedComponent<
191187 />
192188 < Button
193189 type = "submit"
194- className = "text-nowrap"
195190 variant = "contained"
196- sx = { { minWidth : 'auto' , px : 2 } }
191+ className = "min-w-full whitespace-nowrap px-2 sm:min-w-0"
197192 disabled = { messageStore . uploading > 0 }
198193 >
199194 { t ( 'send' ) }
200195 </ Button >
201- </ Box >
196+ </ div >
202197 </ Paper >
203198 </ Container >
204199 </ SessionBox >
0 commit comments