Fügt Unterstützung für die neue nuscore API hinzu. Aktualisiert die Backend-Routen zur Verarbeitung von Anfragen an die nuscore API und integriert die neuen Dialogkomponenten im Frontend. Ermöglicht das Erstellen lokaler Kopien von nuscore-Daten und verbessert die Benutzeroberfläche durch neue Schaltflächen und Dialoge. Entfernt veraltete Konsolenausgaben und optimiert die Logik zur PIN-Verwaltung.
This commit is contained in:
65
test-iframe.html
Normal file
65
test-iframe.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>nuscore iframe Test</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 20px; }
|
||||
iframe { width: 100%; height: 600px; border: 2px solid #007bff; }
|
||||
.status { padding: 10px; margin: 10px 0; background: #f8f9fa; border-radius: 4px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>nuscore iframe Test</h1>
|
||||
|
||||
<div class="status">
|
||||
<strong>Test-URL:</strong> <span id="test-url"></span><br>
|
||||
<strong>Status:</strong> <span id="status">Lädt...</span>
|
||||
</div>
|
||||
|
||||
<iframe
|
||||
id="test-iframe"
|
||||
src="http://localhost:3000/api/proxy/nuscore?code=KXEA9JR5EUPW&pin=1555"
|
||||
onload="iframeLoaded()"
|
||||
onerror="iframeError()">
|
||||
</iframe>
|
||||
|
||||
<script>
|
||||
const iframe = document.getElementById('test-iframe');
|
||||
const statusEl = document.getElementById('status');
|
||||
const urlEl = document.getElementById('test-url');
|
||||
|
||||
urlEl.textContent = iframe.src;
|
||||
|
||||
function iframeLoaded() {
|
||||
statusEl.textContent = '✅ Iframe geladen';
|
||||
statusEl.style.color = 'green';
|
||||
|
||||
try {
|
||||
// Versuche auf iframe-Inhalt zuzugreifen
|
||||
const iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
|
||||
if (iframeDoc) {
|
||||
console.log('Iframe-Titel:', iframeDoc.title);
|
||||
console.log('Iframe-Body:', iframeDoc.body ? 'Vorhanden' : 'Nicht vorhanden');
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Cross-Origin-Zugriff blockiert (erwartet):', e.message);
|
||||
}
|
||||
}
|
||||
|
||||
function iframeError() {
|
||||
statusEl.textContent = '❌ Iframe-Fehler';
|
||||
statusEl.style.color = 'red';
|
||||
}
|
||||
|
||||
// Timeout nach 10 Sekunden
|
||||
setTimeout(() => {
|
||||
if (statusEl.textContent === 'Lädt...') {
|
||||
statusEl.textContent = '⏰ Timeout';
|
||||
statusEl.style.color = 'orange';
|
||||
}
|
||||
}, 10000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user