feat(login): Hinweis-Banner wenn Server nicht erreichbar
Ergaenzt den listStudios-Fix: statt stillem Fallback sieht der User jetzt 'Server nicht erreichbar', wenn die API beim Start nicht antwortet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -16,7 +16,7 @@ function writeAttempts(state) {
|
||||
try { sessionStorage.setItem(ATTEMPT_KEY, JSON.stringify(state)); } catch {}
|
||||
}
|
||||
|
||||
export default function Login({ verifyLogin, settings, version }) {
|
||||
export default function Login({ verifyLogin, settings, version, cloudUnreachable = false }) {
|
||||
// Backend-Modus aus localStorage (per-Device, ähnlich Dark Mode).
|
||||
// Beim Wechsel wird die App neu geladen, damit der Storage-Adapter neu initialisiert.
|
||||
const [backend, setBackend] = useState(() => localStorage.getItem("rapport_backend") || "local");
|
||||
@@ -236,6 +236,12 @@ export default function Login({ verifyLogin, settings, version }) {
|
||||
<div style={{ width: 32, height: 1.5, background: "#ddd8d0", margin: "16px auto 0" }} />
|
||||
</div>
|
||||
|
||||
{cloudUnreachable && (
|
||||
<div style={{ marginBottom: 18, padding: "9px 14px", background: "#fff5f0", borderRadius: 8, border: "1px solid #f5c9b0", fontSize: 11, color: "#b5621e", textAlign: "center", lineHeight: 1.5 }}>
|
||||
Server nicht erreichbar. Bitte Verbindung prüfen und neu laden.
|
||||
</div>
|
||||
)}
|
||||
|
||||
<form onSubmit={handleSubmit}>
|
||||
{isCloud && studios.length > 1 && (
|
||||
<div style={{ marginBottom: 14 }}>
|
||||
|
||||
Reference in New Issue
Block a user