Skip to content

Commit 70790ef

Browse files
style: fix code formatting in settings components
- Improve line breaks and indentation in MaiaModelSettings.tsx - Fix text wrapping in SoundSettings.tsx - Apply consistent code formatting per ESLint/Prettier rules 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 761d7ea commit 70790ef

2 files changed

Lines changed: 35 additions & 12 deletions

File tree

src/components/Settings/MaiaModelSettings.tsx

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,24 @@ export const MaiaModelSettings: React.FC = () => {
119119
return (
120120
<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 text-white/95">Maia Neural Network Model</h3>
122+
<h3 className="text-lg font-semibold text-white/95">
123+
Maia Neural Network Model
124+
</h3>
123125
<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.
126+
Manage your locally stored Maia chess engine model. The model is
127+
downloaded once and stored in your browser for offline use.
125128
</p>
126129
</div>
127130
<div className="flex flex-col gap-2">
128131
{/* Warning displayed above sections so bottom aligns with card */}
129132
{!storageInfo?.supported && (
130133
<div className="rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-yellow-200">
131134
<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.
135+
<span className="material-symbols-outlined mr-2 inline align-middle text-base text-yellow-200">
136+
warning
137+
</span>
138+
IndexedDB storage is not supported in your browser. Model
139+
management features are unavailable.
134140
</p>
135141
</div>
136142
)}
@@ -140,19 +146,26 @@ export const MaiaModelSettings: React.FC = () => {
140146
{/* Status section */}
141147
<div className="px-5 py-4 text-white/90">
142148
<div className="flex items-center gap-3">
143-
<span className={`material-symbols-outlined text-xl ${statusDisplay.color}`}>
149+
<span
150+
className={`material-symbols-outlined text-xl ${statusDisplay.color}`}
151+
>
144152
{statusDisplay.icon}
145153
</span>
146154
<div className="flex flex-col">
147155
<p className="font-medium text-white">Model Status</p>
148-
<p className={`text-sm ${statusDisplay.color}`}>{statusDisplay.text}</p>
156+
<p className={`text-sm ${statusDisplay.color}`}>
157+
{statusDisplay.text}
158+
</p>
149159
</div>
150160
</div>
151161

152162
{status === 'downloading' && (
153163
<div className="mt-3">
154164
<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}%` }} />
165+
<div
166+
className="h-2 rounded-full bg-red-500/70 transition-all duration-300"
167+
style={{ width: `${progress}%` }}
168+
/>
156169
</div>
157170
</div>
158171
)}
@@ -161,7 +174,9 @@ export const MaiaModelSettings: React.FC = () => {
161174
{/* Storage Information section */}
162175
{storageInfo && (
163176
<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>
177+
<h4 className="mb-3 font-medium text-white">
178+
Storage Information
179+
</h4>
165180
<div className="grid grid-cols-1 gap-2 text-sm md:grid-cols-2">
166181
{storageInfo.modelSize && (
167182
<div className="flex justify-between">
@@ -196,7 +211,9 @@ export const MaiaModelSettings: React.FC = () => {
196211
onClick={handleRedownloadModel}
197212
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"
198213
>
199-
<span className="material-symbols-outlined text-base text-red-200">download</span>
214+
<span className="material-symbols-outlined text-base text-red-200">
215+
download
216+
</span>
200217
Download Model
201218
</button>
202219
)}
@@ -208,7 +225,9 @@ export const MaiaModelSettings: React.FC = () => {
208225
disabled={status !== 'ready'}
209226
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"
210227
>
211-
<span className="material-symbols-outlined text-base text-white/80">refresh</span>
228+
<span className="material-symbols-outlined text-base text-white/80">
229+
refresh
230+
</span>
212231
Re-download
213232
</button>
214233

@@ -217,7 +236,9 @@ export const MaiaModelSettings: React.FC = () => {
217236
disabled={isDeleting || status !== 'ready'}
218237
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"
219238
>
220-
<span className="material-symbols-outlined text-base text-red-200">delete</span>
239+
<span className="material-symbols-outlined text-base text-red-200">
240+
delete
241+
</span>
221242
{isDeleting ? 'Deleting...' : 'Delete Model'}
222243
</button>
223244
</>

src/components/Settings/SoundSettings.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export const SoundSettings: React.FC = () => {
3333
{/* Sound Toggle */}
3434
<div className="flex items-center justify-between">
3535
<div className="flex flex-col">
36-
<span className="text-sm font-medium text-white/90">Enable Move Sounds</span>
36+
<span className="text-sm font-medium text-white/90">
37+
Enable Move Sounds
38+
</span>
3739
<p className="text-xs text-white/70">
3840
Play sounds when chess pieces are moved or captured
3941
</p>

0 commit comments

Comments
 (0)