@@ -36,7 +36,12 @@ const SessionSetup: React.FC<SessionSetupProps> = ({ config, onSave, onCancel })
3636 } ;
3737
3838 const handleSave = ( ) => {
39- onSave ( localConfig ) ;
39+ const defaults = createDefaultParticipantConfig ( )
40+ onSave ( {
41+ ...localConfig ,
42+ nameA : localConfig . nameA . trim ( ) || defaults . nameA ,
43+ nameB : localConfig . nameB . trim ( ) || defaults . nameB ,
44+ } )
4045 } ;
4146
4247 const handleReset = ( ) => {
@@ -45,26 +50,27 @@ const SessionSetup: React.FC<SessionSetupProps> = ({ config, onSave, onCancel })
4550
4651 return (
4752 < div className = "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4" >
48- < div className = "bg-white rounded-lg shadow-xl w-full max-w-md" >
53+ < div className = "bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-md" >
4954 < div className = "p-6" >
50- < h2 className = "text-xl font-bold text-gray-900 mb-4" >
55+ < h2 className = "text-xl font-bold text-gray-900 dark:text-white mb-4" >
5156 { t ( 'session.setup.title' , 'Session Setup' ) }
5257 </ h2 >
5358
5459 < div className = "space-y-6" >
5560 { /* Participant A Configuration */ }
5661 < div >
57- < label className = "block text-sm font-medium text-gray-700 mb-1" >
62+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" >
5863 { t ( 'session.setup.nameA' , 'Partner A Name' ) }
5964 </ label >
6065 < input
6166 type = "text"
6267 value = { localConfig . nameA }
6368 onChange = { ( e ) => handleNameChange ( 'A' , e . target . value ) }
64- className = "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
69+ maxLength = { 30 }
70+ className = "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
6571 />
6672
67- < label className = "block text-sm font-medium text-gray-700 mt-3 mb-1" >
73+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mt-3 mb-1" >
6874 { t ( 'session.setup.colorA' , 'Partner A Color' ) }
6975 </ label >
7076 < div className = "flex space-x-2" >
@@ -93,17 +99,18 @@ const SessionSetup: React.FC<SessionSetupProps> = ({ config, onSave, onCancel })
9399
94100 { /* Participant B Configuration */ }
95101 < div >
96- < label className = "block text-sm font-medium text-gray-700 mb-1" >
102+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" >
97103 { t ( 'session.setup.nameB' , 'Partner B Name' ) }
98104 </ label >
99105 < input
100106 type = "text"
101107 value = { localConfig . nameB }
102108 onChange = { ( e ) => handleNameChange ( 'B' , e . target . value ) }
103- className = "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
109+ maxLength = { 30 }
110+ className = "w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"
104111 />
105112
106- < label className = "block text-sm font-medium text-gray-700 mt-3 mb-1" >
113+ < label className = "block text-sm font-medium text-gray-700 dark:text-gray-300 mt-3 mb-1" >
107114 { t ( 'session.setup.colorB' , 'Partner B Color' ) }
108115 </ label >
109116 < div className = "flex space-x-2" >
0 commit comments