@@ -108,11 +108,11 @@ export function ProjectSettingsManager({
108
108
109
109
return (
110
110
< div className = "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4" >
111
- < div className = "bg-white rounded-xl shadow-2xl w-full max-w-4xl max-h-[90vh] overflow-hidden flex flex-col" >
111
+ < div className = "bg-white dark:bg-gray-900 rounded-xl shadow-2xl w-full max-w-4xl max-h-[90vh] overflow-hidden flex flex-col" >
112
112
{ /* Header */ }
113
- < div className = "flex items-center justify-between p-6 border-b border-gray-200 bg-gradient-to-r from-blue-600 to-indigo-600 text-white" >
113
+ < div className = "flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700 bg-gradient-to-r from-blue-600 to-indigo-600 text-white" >
114
114
< div className = "flex items-center space-x-3" >
115
- < div className = "w-10 h-10 bg-white/20 rounded-lg flex items-center justify-center" >
115
+ < div className = "w-10 h-10 bg-white/20 dark:bg-gray-800/30 rounded-lg flex items-center justify-center" >
116
116
< Settings className = "w-6 h-6" />
117
117
</ div >
118
118
< div >
@@ -131,74 +131,80 @@ export function ProjectSettingsManager({
131
131
{ /* Content */ }
132
132
< div className = "flex-1 overflow-y-auto p-6 space-y-6" >
133
133
{ /* Project Information */ }
134
- < div className = "bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg p-6 border border-blue-200" >
134
+ < div className = "bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg p-6 border border-blue-200 dark:from-gray-800 dark:to-gray-900 dark:border-gray-700 " >
135
135
< div className = "flex items-center space-x-2 mb-4" >
136
- < FolderOpen className = "w-5 h-5 text-blue-600" />
137
- < h4 className = "text-lg font-semibold text-blue-900" > Project Information</ h4 >
136
+ < FolderOpen className = "w-5 h-5 text-blue-600 dark:text-blue-400 " />
137
+ < h4 className = "text-lg font-semibold text-blue-900 dark:text-blue-200 " > Project Information</ h4 >
138
138
</ div >
139
139
140
140
< div className = "space-y-4" >
141
141
{ /* Project Name */ }
142
142
< div >
143
- < label className = "block text-sm font-medium text-gray-700 mb-2" >
143
+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" >
144
144
Project Name *
145
145
</ label >
146
146
< input
147
147
type = "text"
148
148
value = { settings . name }
149
149
onChange = { ( e ) => handleProjectNameChange ( e . target . value ) }
150
150
onKeyPress = { ( e ) => handleKeyPress ( e , handleSave ) }
151
- className = { `w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent ${
152
- errors . length > 0 ? 'border-red-300' : 'border-gray-300'
151
+ className = { `w-full px-3 py-2 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-800 dark:text-white dark:border-gray-700 dark:placeholder-gray-400 ${
152
+ errors . length > 0 ? 'border-red-300 dark:border-red-500 ' : 'border-gray-300 dark:border-gray-700 '
153
153
} `}
154
154
placeholder = "my-awesome-project"
155
155
/>
156
156
{ errors . length > 0 && (
157
157
< div className = "mt-2 space-y-1" >
158
158
{ errors . map ( ( error , index ) => (
159
- < div key = { index } className = "flex items-center space-x-2 text-sm text-red-600" >
159
+ < div key = { index } className = "flex items-center space-x-2 text-sm text-red-600 dark:text-red-400 " >
160
160
< AlertTriangle className = "w-4 h-4" />
161
161
< span > { error } </ span >
162
162
</ div >
163
163
) ) }
164
164
</ div >
165
165
) }
166
- < p className = "mt-1 text-xs text-gray-500" >
166
+ < p className = "mt-1 text-xs text-gray-500 dark:text-gray-400 " >
167
167
This name will be used as a prefix for generated resource names and as a default label
168
168
</ p >
169
169
</ div >
170
170
171
171
{ /* Project Description */ }
172
172
< div >
173
- < label className = "block text-sm font-medium text-gray-700 mb-2" >
173
+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" >
174
174
Description (Optional)
175
175
</ label >
176
176
< textarea
177
177
value = { settings . description || '' }
178
178
onChange = { ( e ) => setSettings ( prev => ( { ...prev , description : e . target . value } ) ) }
179
- className = "w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
179
+ className = "w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-800 dark:text-white dark:border-gray-700 dark:placeholder-gray-400 "
180
180
placeholder = "Brief description of your project..."
181
181
rows = { 3 }
182
182
/>
183
183
</ div >
184
184
</ div >
185
185
</ div >
186
186
187
- { /* Global Labels */ }
188
- < div className = "bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg p-6 border border-green-200" >
187
+ { /* Global Labels */ }
188
+ < div className = "bg-gradient-to-r from-green-50 to-emerald-50
189
+ rounded-lg p-6 border border-green-200
190
+ dark:from-green-900 dark:to-emerald-900
191
+ dark:border-green-700" >
189
192
< div className = "flex items-center space-x-2 mb-4" >
190
- < Tag className = "w-5 h-5 text-green-600" />
191
- < h4 className = "text-lg font-semibold text-green-900" > Global Labels</ h4 >
193
+ < Tag className = "w-5 h-5 text-green-600 dark:text-green-400" />
194
+ < h4 className = "text-lg font-semibold text-green-900 dark:text-green-200" >
195
+ Global Labels
196
+ </ h4 >
192
197
</ div >
193
198
194
- < div className = "bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4" >
199
+ < div className = "bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4
200
+ dark:bg-blue-900/30 dark:border-blue-700" >
195
201
< div className = "flex items-start space-x-2" >
196
- < Info className = "w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5" />
197
- < div className = "text-sm text-blue-800" >
202
+ < Info className = "w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5 dark:text-blue-400 " />
203
+ < div className = "text-sm text-blue-800 dark:text-blue-200 " >
198
204
< p className = "font-medium mb-1" > What are Global Labels?</ p >
199
205
< p >
200
- Global labels are automatically applied to all Kubernetes resources in your project.
201
- They help with organization, filtering, cost allocation, and automation. Common examples
206
+ Global labels are automatically applied to all Kubernetes resources in your project.
207
+ They help with organization, filtering, cost allocation, and automation. Common examples
202
208
include environment, team, version, and component labels.
203
209
</ p >
204
210
</ div >
@@ -208,56 +214,67 @@ export function ProjectSettingsManager({
208
214
{ /* Add New Label */ }
209
215
< div className = "mb-4" >
210
216
< div className = "flex items-center justify-between mb-3" >
211
- < label className = "block text-sm font-medium text-gray-700" >
217
+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 " >
212
218
Add Global Label
213
219
</ label >
214
220
< button
215
221
onClick = { addGlobalLabel }
216
222
disabled = { ! newLabel . key || ! newLabel . value }
217
- className = "inline-flex items-center px-3 py-1 bg-green-600 text-white rounded-lg hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed text-sm"
223
+ className = "inline-flex items-center px-3 py-1 bg-green-600 text-white rounded-lg
224
+ hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed text-sm"
218
225
>
219
226
< Plus className = "w-4 h-4 mr-1" />
220
227
Add
221
228
</ button >
222
229
</ div >
223
-
230
+
224
231
< div className = "grid grid-cols-1 sm:grid-cols-2 gap-3" >
225
232
< input
226
233
type = "text"
227
234
value = { newLabel . key }
228
- onChange = { ( e ) => setNewLabel ( prev => ( { ...prev , key : e . target . value } ) ) }
235
+ onChange = { ( e ) => setNewLabel ( ( prev ) => ( { ...prev , key : e . target . value } ) ) }
229
236
onKeyPress = { ( e ) => handleKeyPress ( e , addGlobalLabel ) }
230
- className = "px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
237
+ className = "px-3 py-2 border rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent
238
+ border-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-white
239
+ dark:placeholder-gray-400"
231
240
placeholder = "Label key (e.g., app.kubernetes.io/component)"
232
241
/>
233
242
< input
234
243
type = "text"
235
244
value = { newLabel . value }
236
- onChange = { ( e ) => setNewLabel ( prev => ( { ...prev , value : e . target . value } ) ) }
245
+ onChange = { ( e ) => setNewLabel ( ( prev ) => ( { ...prev , value : e . target . value } ) ) }
237
246
onKeyPress = { ( e ) => handleKeyPress ( e , addGlobalLabel ) }
238
- className = "px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"
247
+ className = "px-3 py-2 border rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent
248
+ border-gray-300 dark:border-gray-700 dark:bg-gray-800 dark:text-white
249
+ dark:placeholder-gray-400"
239
250
placeholder = "Label value (e.g., api)"
240
251
/>
241
252
</ div >
242
253
</ div >
243
254
244
255
{ /* Common Label Suggestions */ }
245
256
< div className = "mb-4" >
246
- < h5 className = "text-sm font-medium text-gray-700 mb-2" > Common Label Suggestions:</ h5 >
257
+ < h5 className = "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" >
258
+ Common Label Suggestions:
259
+ </ h5 >
247
260
< div className = "grid grid-cols-1 sm:grid-cols-2 gap-2" >
248
261
{ commonLabels . map ( ( label , index ) => (
249
262
< button
250
263
key = { index }
251
264
onClick = { ( ) => setNewLabel ( { key : label . key , value : label . value } ) }
252
- className = "text-left p-2 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors duration-200"
265
+ className = "text-left p-2 bg-white border border-gray-200 rounded-lg
266
+ hover:bg-gray-50 transition-colors duration-200
267
+ dark:bg-gray-800 dark:border-gray-700 dark:hover:bg-gray-700"
253
268
title = { label . description }
254
269
>
255
270
< div className = "text-sm" >
256
- < span className = "font-medium text-green-700" > { label . key } </ span >
257
- < span className = "text-gray-500" > : </ span >
258
- < span className = "text-gray-700" > { label . value } </ span >
271
+ < span className = "font-medium text-green-700 dark:text-green-400" > { label . key } </ span >
272
+ < span className = "text-gray-500 dark:text-gray-400" > : </ span >
273
+ < span className = "text-gray-700 dark:text-gray-400" > { label . value } </ span >
274
+ </ div >
275
+ < div className = "text-xs text-gray-500 mt-1 dark:text-gray-400" >
276
+ { label . description }
259
277
</ div >
260
- < div className = "text-xs text-gray-500 mt-1" > { label . description } </ div >
261
278
</ button >
262
279
) ) }
263
280
</ div >
@@ -266,21 +283,28 @@ export function ProjectSettingsManager({
266
283
{ /* Current Global Labels */ }
267
284
{ Object . keys ( settings . globalLabels ) . length > 0 && (
268
285
< div >
269
- < h5 className = "text-sm font-medium text-gray-700 mb-3" > Current Global Labels:</ h5 >
286
+ < h5 className = "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3" >
287
+ Current Global Labels:
288
+ </ h5 >
270
289
< div className = "space-y-2" >
271
290
{ Object . entries ( settings . globalLabels ) . map ( ( [ key , value ] ) => (
272
- < div key = { key } className = "flex items-center justify-between bg-white px-4 py-3 rounded-lg border border-gray-200" >
291
+ < div
292
+ key = { key }
293
+ className = "flex items-center justify-between bg-white px-4 py-3 rounded-lg
294
+ border border-gray-200 dark:bg-gray-800 dark:border-gray-700"
295
+ >
273
296
< div className = "flex items-center space-x-2" >
274
- < Tag className = "w-4 h-4 text-green-600" />
297
+ < Tag className = "w-4 h-4 text-green-600 dark:text-green-400 " />
275
298
< span className = "text-sm" >
276
- < span className = "font-medium text-gray-900" > { key } </ span >
277
- < span className = "text-gray-500" > : </ span >
278
- < span className = "text-gray-700" > { value } </ span >
299
+ < span className = "font-medium text-gray-900 dark:text-gray-100 " > { key } </ span >
300
+ < span className = "text-gray-500 dark:text-gray-400 " > : </ span >
301
+ < span className = "text-gray-700 dark:text-gray-400 " > { value } </ span >
279
302
</ span >
280
303
</ div >
281
304
< button
282
305
onClick = { ( ) => removeGlobalLabel ( key ) }
283
- className = "text-gray-400 hover:text-red-600 transition-colors duration-200"
306
+ className = "text-gray-400 hover:text-red-600 transition-colors duration-200
307
+ dark:text-gray-600 dark:hover:text-red-600"
284
308
title = "Remove label"
285
309
>
286
310
< Trash2 className = "w-4 h-4" />
@@ -293,19 +317,21 @@ export function ProjectSettingsManager({
293
317
294
318
{ Object . keys ( settings . globalLabels ) . length === 0 && (
295
319
< div className = "text-center py-8" >
296
- < Tag className = "w-12 h-12 text-gray-400 mx-auto mb-4" />
297
- < h5 className = "text-lg font-medium text-gray-900 mb-2" > No Global Labels</ h5 >
298
- < p className = "text-sm text-gray-500" >
320
+ < Tag className = "w-12 h-12 text-gray-400 mx-auto mb-4 dark:text-gray-300" />
321
+ < h5 className = "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2" >
322
+ No Global Labels
323
+ </ h5 >
324
+ < p className = "text-sm text-gray-500 dark:text-gray-400" >
299
325
Add global labels to automatically apply them to all your Kubernetes resources
300
326
</ p >
301
327
</ div >
302
328
) }
303
329
</ div >
304
330
305
331
{ /* Project Metadata */ }
306
- < div className = "bg-gray-50 rounded-lg p-4 border border-gray-200" >
307
- < h5 className = "text-sm font-medium text-gray-700 mb-2" > Project Metadata</ h5 >
308
- < div className = "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm text-gray-600" >
332
+ < div className = "bg-gray-50 rounded-lg p-4 border border-gray-200 dark:bg-gray-800 dark:border-gray-700 " >
333
+ < h5 className = "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2" > Project Metadata</ h5 >
334
+ < div className = "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm text-gray-600 dark:text-gray-400 " >
309
335
< div >
310
336
< span className = "font-medium" > Created:</ span > { new Date ( settings . createdAt ) . toLocaleString ( ) }
311
337
</ div >
@@ -317,21 +343,21 @@ export function ProjectSettingsManager({
317
343
</ div >
318
344
319
345
{ /* Footer */ }
320
- < div className = "flex items-center justify-between p-6 border-t border-gray-200 bg-gray-50" >
321
- < div className = "text-sm text-gray-600" >
346
+ < div className = "flex items-center justify-between p-6 border-t border-gray-200 bg-gray-50 dark:bg-gray-800 dark:border-gray-700 " >
347
+ < div className = "text-sm text-gray-600 dark:text-gray-400 " >
322
348
< p > Global labels will be applied to all deployments, services, and other resources</ p >
323
349
</ div >
324
350
< div className = "flex items-center space-x-3" >
325
351
< button
326
352
onClick = { onClose }
327
- className = "px-6 py-2 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors duration-200"
353
+ className = "px-6 py-2 text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors duration-200 dark:bg-gray-800 dark:text-white dark:border-gray-700 dark:hover:bg-gray-700 dark:hover:text-white "
328
354
>
329
355
Cancel
330
356
</ button >
331
357
< button
332
358
onClick = { handleSave }
333
359
disabled = { ! settings . name || errors . length > 0 }
334
- className = "inline-flex items-center px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors duration-200 font-medium"
360
+ className = "inline-flex items-center px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors duration-200 font-medium dark:bg-blue-700 dark:hover:bg-blue-800 dark:hover:text-white "
335
361
>
336
362
< Save className = "w-4 h-4 mr-2" />
337
363
Save Settings
0 commit comments