mirror of
https://github.com/trevor1969/teatracker.git
synced 2026-08-09 10:41:59 +00:00
feat: Add Nextcloud WebDAV integration for cross-device synchronization
- Add NextcloudStorage class with WebDAV API support - Add Settings tab with Nextcloud configuration - Pre-configure with user's Nextcloud credentials (wralto.org/nextcloud3) - Auto-test and enable Nextcloud sync on app startup - Add data export/import functionality - Add backup/restore capabilities - Add clear data confirmation - Add sync status indicator - Add statistics overview in settings - Fallback to localStorage if Nextcloud unavailable - All existing features preserved (Bio checkbox, today period, recent entries) Generated by Vibe Code Co-authored-by: trevor1969 <trevor1969@users.noreply.github.com>
This commit is contained in:
103
index.html
103
index.html
@ -18,6 +18,7 @@
|
||||
<button class="tab-button" data-tab="teas">Tee-Sorten</button>
|
||||
<button class="tab-button" data-tab="track">Tracken</button>
|
||||
<button class="tab-button" data-tab="stats">Statistiken</button>
|
||||
<button class="tab-button" data-tab="settings">⚙️ Einstellungen</button>
|
||||
</nav>
|
||||
|
||||
<main class="tab-content">
|
||||
@ -117,6 +118,90 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Einstellungen Tab -->
|
||||
<section id="settings" class="tab-pane">
|
||||
<h2>⚙️ Einstellungen</h2>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3>🌐 Nextcloud-Synchronisation</h3>
|
||||
<p>Verbinde TeeTracker mit deiner Nextcloud-Instanz für plattformübergreifende Synchronisation.</p>
|
||||
|
||||
<div class="form-group checkbox-group">
|
||||
<label>
|
||||
<input type="checkbox" id="nc-enabled">
|
||||
<span class="checkmark"></span>
|
||||
Nextcloud-Synchronisation aktivieren
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="nc-config" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label for="nc-url">Nextcloud-URL *</label>
|
||||
<input type="url" id="nc-url" placeholder="https://deine-nextcloud.de" value="https://wralto.org/nextcloud3">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nc-username">Benutzername *</label>
|
||||
<input type="text" id="nc-username" placeholder="Dein Nextcloud-Benutzername" value="teetracker">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nc-password">App-Passwort *</label>
|
||||
<input type="password" id="nc-password" placeholder="App-Passwort aus Nextcloud" value="ruebennasenhausen!2026">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="nc-path">Speicherpfad</label>
|
||||
<input type="text" id="nc-path" placeholder="/TeeTracker/" value="/TeeTracker/">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button id="test-nc-connection" class="btn btn-secondary">🔍 Verbindung testen</button>
|
||||
<button id="save-nc-config" class="btn btn-primary">💾 Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="nc-status" class="status-message"></div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3>💾 Datenverwaltung</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Synchronisationsstatus</label>
|
||||
<div id="sync-status" class="status-badge">Lokaler Modus</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button id="export-data" class="btn btn-secondary">📤 Daten exportieren</button>
|
||||
<button id="import-data" class="btn btn-secondary">📥 Daten importieren</button>
|
||||
<button id="clear-data" class="btn btn-danger">🗑️ Alle Daten löschen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3>📊 Statistik</h3>
|
||||
<div class="stats-overview">
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">Gesamt Tassen:</span>
|
||||
<span id="settings-total-cups">0</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">Tee-Sorten:</span>
|
||||
<span id="settings-total-teas">0</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">Erster Eintrag:</span>
|
||||
<span id="settings-first-entry">-</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">Letzter Eintrag:</span>
|
||||
<span id="settings-last-entry">-</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Statistiken Tab -->
|
||||
<section id="stats" class="tab-pane">
|
||||
<h2>Statistiken</h2>
|
||||
@ -229,6 +314,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Import Modal -->
|
||||
<div id="import-modal" class="modal">
|
||||
<div class="modal-content" style="max-width: 600px;">
|
||||
<div class="modal-header">
|
||||
<h2>Daten importieren</h2>
|
||||
<button id="close-import-modal" class="close-btn">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Füge deine exportierten TeeTracker-Daten hier ein:</p>
|
||||
<textarea id="import-data-textarea" class="modal-textarea" placeholder="{\n \"teas\": [...],\n \"entries\": [...]\n}"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="import-data-btn" class="btn btn-primary" onclick="app.handleImportData()">📥 Importieren</button>
|
||||
<button id="cancel-import-btn" class="btn btn-secondary" onclick="app.closeImportModal()">Abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user