@@ -29,7 +29,7 @@ function LoginContent() {
2929 const [ isLoading , setIsLoading ] = useState ( false ) ;
3030 const [ error , setError ] = useState ( "" ) ;
3131 const [ ssoHealthy , setSsoHealthy ] = useState < boolean | null > ( null ) ;
32- const [ showReconfigure , setShowReconfigure ] = useState ( false ) ;
32+
3333 const [ ssoConfig , setSsoConfig ] = useState < {
3434 centerUrl ?: string ;
3535 projectSlug ?: string ;
@@ -61,13 +61,8 @@ function LoginContent() {
6161 projectSlug : data . projectSlug ,
6262 } ) ;
6363 }
64- // Pokaż przycisk rekonfiguracji jeśli SSO nie skonfigurowane lub nie działa
65- if ( ! data . configured || ! data . healthy ) {
66- setShowReconfigure ( true ) ;
67- }
6864 } catch {
6965 setSsoHealthy ( false ) ;
70- setShowReconfigure ( true ) ;
7166 }
7267 }
7368 checkSSOHealth ( ) ;
@@ -85,8 +80,6 @@ function LoginContent() {
8580 project_not_found : "Projekt nie istnieje w centrum logowania." ,
8681 } ;
8782 setError ( errorMessages [ errorParam ] || "Wystąpił nieznany błąd." ) ;
88- // Pokaż przycisk rekonfiguracji przy błędzie
89- setShowReconfigure ( true ) ;
9083 }
9184 } , [ searchParams ] ) ;
9285
@@ -193,31 +186,26 @@ function LoginContent() {
193186 </ div >
194187 </ div >
195188
196- { /* Przycisk rekonfiguracji SSO - widoczny gdy problemy z połączeniem */ }
197- { showReconfigure && (
198- < div className = "flex flex-col items-center gap-3 p-4 rounded-lg bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800" >
199- < div className = "flex items-center gap-2 text-amber-700 dark:text-amber-400" >
200- < AlertCircle className = "h-4 w-4" />
201- < span className = "text-sm font-medium" >
202- Problemy z logowaniem?
203- </ span >
204- </ div >
205- < p className = "text-xs text-amber-600 dark:text-amber-500 text-center" >
206- { ssoHealthy === false
207- ? "Nie można połączyć się z centrum logowania. Możesz skonfigurować połączenie ponownie."
208- : "Jeśli logowanie nie działa, możesz zrekonfigurować połączenie SSO." }
209- </ p >
210- < Link href = "/setup" className = "w-full" >
211- < Button
212- variant = "outline"
213- className = "w-full border-amber-300 dark:border-amber-700 text-amber-700 dark:text-amber-400 hover:bg-amber-100 dark:hover:bg-amber-900/30"
214- >
215- < Settings2 className = "mr-2 h-4 w-4" />
216- Rekonfiguruj SSO
217- </ Button >
218- </ Link >
189+ { /* Przycisk rekonfiguracji SSO - zawsze widoczny */ }
190+ < div className = "flex flex-col items-center gap-3 p-4 rounded-lg bg-muted/50 border border-muted" >
191+ < div className = "flex items-center gap-2 text-muted-foreground" >
192+ < Settings2 className = "h-4 w-4" />
193+ < span className = "text-sm font-medium" >
194+ Konfiguracja połączenia
195+ </ span >
219196 </ div >
220- ) }
197+ < p className = "text-xs text-muted-foreground text-center" >
198+ { ssoHealthy === false
199+ ? "Nie można połączyć się z centrum logowania."
200+ : "Jeśli masz problemy z logowaniem, możesz zrekonfigurować połączenie SSO." }
201+ </ p >
202+ < Link href = "/setup" className = "w-full" >
203+ < Button variant = "outline" className = "w-full" >
204+ < Settings2 className = "mr-2 h-4 w-4" />
205+ Rekonfiguruj SSO
206+ </ Button >
207+ </ Link >
208+ </ div >
221209 </ CardContent >
222210 </ Card >
223211
0 commit comments