Firebase-Integration für Multi-Device-Zugriff

- Firebase SDK hinzugefügt (Firestore & Auth)
- config.js mit Firebase-Konfigurationstemplate
- Google Sign-In für Benutzerauthentifizierung
- Daten werden jetzt in Firestore gespeichert (pro Benutzer)
- Echtzeit-Updates auf allen Geräten
- Datenstruktur: users/{uid}/teaTypes und users/{uid}/consumption
- Anleitung in config.js für die Einrichtung

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
wralto-user-1
2026-11-21 21:34:26 +01:00
parent ca2ec1ce9e
commit 83e6dcbdc9
4 changed files with 553 additions and 205 deletions

View File

@ -62,6 +62,72 @@ body {
gap: 30px;
}
/* Auth Section */
.auth-section {
background: var(--card-background);
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--shadow);
text-align: center;
}
.auth-section.hidden {
display: none;
}
.auth-card {
max-width: 400px;
margin: 0 auto;
}
.auth-card h2 {
color: var(--primary-color);
margin-bottom: 15px;
font-size: 1.5rem;
}
.auth-card p {
color: var(--text-secondary);
margin-bottom: 20px;
}
.google-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
padding: 12px 20px;
font-size: 1rem;
background-color: #4285F4;
color: white;
border: none;
border-radius: var(--border-radius);
cursor: pointer;
transition: background-color 0.2s ease;
}
.google-btn:hover {
background-color: #3367D6;
}
.google-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
background-color: white;
color: #4285F4;
border-radius: 50%;
font-weight: bold;
}
.auth-status {
margin-top: 15px;
font-size: 0.9rem;
}
/* Sections */
section {
background: var(--card-background);
@ -299,6 +365,11 @@ section h2 {
background-color: #D32F2F;
}
/* Hidden class */
.hidden {
display: none !important;
}
/* Tea List */
.tea-list {
display: flex;
@ -568,67 +639,19 @@ section h2 {
}
}
/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
justify-content: center;
align-items: center;
/* Loading Spinner */
.loading-spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(46, 125, 50, 0.3);
border-radius: 50%;
border-top-color: var(--primary-color);
animation: spin 1s ease-in-out infinite;
}
.modal.active {
display: flex;
}
.modal-content {
background: var(--card-background);
border-radius: var(--border-radius);
padding: 25px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
color: var(--primary-color);
margin: 0;
}
.modal-close {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--text-secondary);
}
.modal-close:hover {
color: var(--text-primary);
}
.modal-body {
margin-bottom: 20px;
}
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
@keyframes spin {
to {
transform: rotate(360deg);
}
}