@@ -117,128 +117,117 @@ export const MaiaModelSettings: React.FC = () => {
117117 const statusDisplay = getStatusDisplay ( )
118118
119119 return (
120- < div className = "flex flex-col gap-4 rounded-lg bg-background-1 p-6 " >
120+ < div className = "from-white/8 to-white/4 group flex flex-col gap-4 rounded-lg border border-white/10 bg-gradient-to-br px-5 pb-0 pt-5 backdrop-blur-md transition-all duration-300 " >
121121 < div className = "flex flex-col items-start justify-between" >
122- < h3 className = "text-lg font-semibold" > Maia Neural Network Model</ h3 >
123- < p className = "text-sm text-secondary" >
124- Manage your locally stored Maia chess engine model. The model is
125- downloaded once and stored in your browser for offline use.
122+ < h3 className = "text-lg font-semibold text-white/95" > Maia Neural Network Model</ h3 >
123+ < p className = "text-sm text-white/70" >
124+ Manage your locally stored Maia chess engine model. The model is downloaded once and stored in your browser for offline use.
126125 </ p >
127126 </ div >
128127 < div className = "flex flex-col gap-2" >
129- { /* Status Display */ }
130- < div className = "rounded-lg bg-background-2 p-4" >
131- < div className = "flex items-center gap-3" >
132- < span
133- className = { `material-symbols-outlined text-xl ${ statusDisplay . color } ` }
134- >
135- { statusDisplay . icon }
136- </ span >
137- < div className = "flex flex-col" >
138- < p className = "font-medium" > Model Status</ p >
139- < p className = { `text-sm ${ statusDisplay . color } ` } >
140- { statusDisplay . text }
141- </ p >
142- </ div >
128+ { /* Warning displayed above sections so bottom aligns with card */ }
129+ { ! storageInfo ?. supported && (
130+ < div className = "rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-yellow-200" >
131+ < p className = "text-sm" >
132+ < span className = "material-symbols-outlined mr-2 inline text-base align-middle text-yellow-200" > warning</ span >
133+ IndexedDB storage is not supported in your browser. Model management features are unavailable.
134+ </ p >
143135 </ div >
136+ ) }
144137
145- { status === 'downloading' && (
146- < div className = "mt-3" >
147- < div className = "h-2 w-full rounded-full bg-background-2" >
148- < div
149- className = "h-2 rounded-full bg-human-4 transition-all duration-300"
150- style = { { width : `${ progress } %` } }
151- />
138+ { /* Shared border wrapper for Status + Storage */ }
139+ < div className = "-mx-5 mt-1 border-t border-white/10" >
140+ { /* Status section */ }
141+ < div className = "px-5 py-4 text-white/90" >
142+ < div className = "flex items-center gap-3" >
143+ < span className = { `material-symbols-outlined text-xl ${ statusDisplay . color } ` } >
144+ { statusDisplay . icon }
145+ </ span >
146+ < div className = "flex flex-col" >
147+ < p className = "font-medium text-white" > Model Status</ p >
148+ < p className = { `text-sm ${ statusDisplay . color } ` } > { statusDisplay . text } </ p >
152149 </ div >
153150 </ div >
154- ) }
155- </ div >
156151
157- { /* Storage Information */ }
158- { storageInfo && (
159- < div className = "rounded-lg bg-background-2 p-4" >
160- < h4 className = "mb-3 font-medium" > Storage Information</ h4 >
161- < div className = "grid grid-cols-1 gap-2 text-sm md:grid-cols-2" >
162- { storageInfo . modelSize && (
163- < div className = "flex justify-between" >
164- < span className = "text-secondary" > Model Size:</ span >
165- < span > { formatBytes ( storageInfo . modelSize ) } </ span >
166- </ div >
167- ) }
168- { storageInfo . modelTimestamp && (
169- < div className = "flex justify-between" >
170- < span className = "text-secondary" > Downloaded:</ span >
171- < span > { formatDate ( storageInfo . modelTimestamp ) } </ span >
172- </ div >
173- ) }
174- { storageInfo . usage && (
175- < div className = "flex justify-between" >
176- < span className = "text-secondary" > Total Usage:</ span >
177- < span > { formatBytes ( storageInfo . usage ) } </ span >
152+ { status === 'downloading' && (
153+ < div className = "mt-3" >
154+ < div className = "h-2 w-full rounded-full bg-white/10" >
155+ < div className = "h-2 rounded-full bg-red-500/70 transition-all duration-300" style = { { width : `${ progress } %` } } />
178156 </ div >
179- ) }
180- { storageInfo . quota && (
181- < div className = "flex justify-between" >
182- < span className = "text-secondary" > Available:</ span >
183- < span > { formatBytes ( storageInfo . quota ) } </ span >
184- </ div >
185- ) }
186- </ div >
157+ </ div >
158+ ) }
187159 </ div >
188- ) }
189160
190- { /* Action Buttons */ }
191- < div className = "flex flex-col gap-2 md:flex-row" >
192- { status === 'no-cache' && (
193- < button
194- onClick = { handleRedownloadModel }
195- className = "flex items-center justify-center gap-2 rounded bg-human-4 px-4 py-2 text-white hover:bg-human-4/80"
196- >
197- < span className = "material-symbols-outlined text-base" >
198- download
199- </ span >
200- Download Model
201- </ button >
202- ) }
161+ { /* Storage Information section */ }
162+ { storageInfo && (
163+ < div className = "border-t border-white/10 px-5 py-4 text-white/90" >
164+ < h4 className = "mb-3 font-medium text-white" > Storage Information</ h4 >
165+ < div className = "grid grid-cols-1 gap-2 text-sm md:grid-cols-2" >
166+ { storageInfo . modelSize && (
167+ < div className = "flex justify-between" >
168+ < span className = "text-white/70" > Model Size:</ span >
169+ < span > { formatBytes ( storageInfo . modelSize ) } </ span >
170+ </ div >
171+ ) }
172+ { storageInfo . modelTimestamp && (
173+ < div className = "flex justify-between" >
174+ < span className = "text-white/70" > Downloaded:</ span >
175+ < span > { formatDate ( storageInfo . modelTimestamp ) } </ span >
176+ </ div >
177+ ) }
178+ { storageInfo . usage && (
179+ < div className = "flex justify-between" >
180+ < span className = "text-white/70" > Total Usage:</ span >
181+ < span > { formatBytes ( storageInfo . usage ) } </ span >
182+ </ div >
183+ ) }
184+ { storageInfo . quota && (
185+ < div className = "flex justify-between" >
186+ < span className = "text-white/70" > Available:</ span >
187+ < span > { formatBytes ( storageInfo . quota ) } </ span >
188+ </ div >
189+ ) }
190+ </ div >
203191
204- { status === 'ready' && (
205- < >
206- < button
207- onClick = { handleRedownloadModel }
208- disabled = { status !== 'ready' }
209- className = "flex items-center justify-center gap-2 rounded bg-background-2 px-4 py-2 hover:bg-background-3 disabled:opacity-50"
210- >
211- < span className = "material-symbols-outlined text-base" >
212- refresh
213- </ span >
214- Re-download
215- </ button >
216-
217- < button
218- onClick = { handleDeleteModel }
219- disabled = { isDeleting || status !== 'ready' }
220- className = "flex items-center justify-center gap-2 rounded bg-human-4 px-4 py-2 text-white hover:bg-human-4/80 disabled:opacity-50"
221- >
222- < span className = "material-symbols-outlined text-base" >
223- delete
224- </ span >
225- { isDeleting ? 'Deleting...' : 'Delete Model' }
226- </ button >
227- </ >
192+ { /* Action Buttons inside storage section */ }
193+ < div className = "mt-3 flex flex-col gap-2 md:flex-row" >
194+ { status === 'no-cache' && (
195+ < button
196+ onClick = { handleRedownloadModel }
197+ className = "flex items-center justify-center gap-2 rounded-md border border-red-500/30 bg-red-500/20 px-4 py-2 text-red-200 transition-all duration-200 hover:border-red-500/40 hover:bg-red-500/30"
198+ >
199+ < span className = "material-symbols-outlined text-base text-red-200" > download</ span >
200+ Download Model
201+ </ button >
202+ ) }
203+
204+ { status === 'ready' && (
205+ < >
206+ < button
207+ onClick = { handleRedownloadModel }
208+ disabled = { status !== 'ready' }
209+ className = "flex items-center justify-center gap-2 rounded-md border border-white/10 bg-white/5 px-4 py-2 text-white/90 backdrop-blur-sm transition-all duration-200 hover:border-white/20 hover:bg-white/10 disabled:opacity-50"
210+ >
211+ < span className = "material-symbols-outlined text-base text-white/80" > refresh</ span >
212+ Re-download
213+ </ button >
214+
215+ < button
216+ onClick = { handleDeleteModel }
217+ disabled = { isDeleting || status !== 'ready' }
218+ className = "flex items-center justify-center gap-2 rounded-md border border-red-500/30 bg-red-500/20 px-4 py-2 text-red-200 transition-all duration-200 hover:border-red-500/40 hover:bg-red-500/30 disabled:opacity-50"
219+ >
220+ < span className = "material-symbols-outlined text-base text-red-200" > delete</ span >
221+ { isDeleting ? 'Deleting...' : 'Delete Model' }
222+ </ button >
223+ </ >
224+ ) }
225+ </ div >
226+ </ div >
228227 ) }
229228 </ div >
230229
231- { ! storageInfo ?. supported && (
232- < div className = "rounded-lg bg-yellow-100 p-3 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" >
233- < p className = "text-sm" >
234- < span className = "material-symbols-outlined mr-2 inline text-base" >
235- warning
236- </ span >
237- IndexedDB storage is not supported in your browser. Model
238- management features are unavailable.
239- </ p >
240- </ div >
241- ) }
230+ { /* Action buttons are inside storage info section above */ }
242231 </ div >
243232 </ div >
244233 )
0 commit comments