Fix: Emojis aus JavaScript-Code entfernt
- Emojis in authStatus-Meldungen durch Text ersetzt - Verhindert Syntaxfehler in einigen Browsern Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@ -204,7 +204,7 @@ const App = {
|
||||
if (signInBtn) signInBtn.classList.add('hidden');
|
||||
if (signOutBtn) signOutBtn.classList.remove('hidden');
|
||||
if (authStatus) {
|
||||
authStatus.innerHTML = `<span style="color: #4CAF50">👤 Angemeldet als: ${this.state.currentUser?.displayName || this.state.currentUser?.email}</span>`;
|
||||
authStatus.innerHTML = `<span style="color: #4CAF50">Angemeldet als: ${this.state.currentUser?.displayName || this.state.currentUser?.email}</span>`;
|
||||
}
|
||||
},
|
||||
|
||||
@ -217,7 +217,7 @@ const App = {
|
||||
if (signInBtn) signInBtn.classList.remove('hidden');
|
||||
if (signOutBtn) signOutBtn.classList.add('hidden');
|
||||
if (authStatus) {
|
||||
authStatus.innerHTML = '<span style="color: #F44336">🔒 Nicht angemeldet</span>';
|
||||
authStatus.innerHTML = '<span style="color: #F44336">Nicht angemeldet</span>';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
57
test.html
Normal file
57
test.html
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Firebase Quick Test</title>
|
||||
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-app-compat.js"></script>
|
||||
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-auth-compat.js"></script>
|
||||
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-firestore-compat.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Firebase Test</h1>
|
||||
<button onclick="signIn()">Mit Google anmelden</button>
|
||||
<button onclick="writeTest()">Test-Dokument schreiben</button>
|
||||
<div id="result"></div>
|
||||
|
||||
<script>
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyBJUvCJLHHwnSXX-dJjuUaGH00fVC3NWQg",
|
||||
authDomain: "teetracker-ceeb0.firebaseapp.com",
|
||||
projectId: "teetracker-ceeb0",
|
||||
storageBucket: "teetracker-ceeb0.firebasestorage.app",
|
||||
messagingSenderId: "717161359362",
|
||||
appId: "1:717161359362:web:1a290095bea868e1b41f1b"
|
||||
};
|
||||
|
||||
firebase.initializeApp(firebaseConfig);
|
||||
const db = firebase.firestore();
|
||||
const auth = firebase.auth();
|
||||
|
||||
async function signIn() {
|
||||
try {
|
||||
const provider = new firebase.auth.GoogleAuthProvider();
|
||||
await auth.signInWithPopup(provider);
|
||||
document.getElementById('result').innerHTML += '<p>✅ Angemeldet!</p>';
|
||||
} catch (error) {
|
||||
document.getElementById('result').innerHTML = `<p style="color:red">❌ Login-Fehler: ${error.message}</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
async function writeTest() {
|
||||
try {
|
||||
const user = auth.currentUser;
|
||||
if (!user) {
|
||||
alert('Bitte zuerst anmelden!');
|
||||
return;
|
||||
}
|
||||
await db.collection('users').doc(user.uid).collection('test').add({
|
||||
message: 'Firebase funktioniert!',
|
||||
timestamp: firebase.firestore.FieldValue.serverTimestamp()
|
||||
});
|
||||
document.getElementById('result').innerHTML += '<p>✅ Test-Dokument geschrieben!</p>';
|
||||
} catch (error) {
|
||||
document.getElementById('result').innerHTML = `<p style="color:red">❌ Schreibfehler: ${error.message}</p>`;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user