This commit is contained in:
2026-09-07 13:00:59 +02:00
parent cbe4726c07
commit e0326285d3
12 changed files with 478 additions and 143 deletions

View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Freundesbuch Einstellungen</title>
<link rel="stylesheet" href="/assets/style.css" />
<link rel="stylesheet" href="/admin/admin.css" />
</head>
<body>
<div class="top-bar card" style="border-radius:0;">
<h1 style="margin:0;">📖 Freundesbuch</h1>
<div style="display:flex; gap:0.6em; flex-wrap:wrap;">
<a class="btn" href="/book" target="_blank" rel="noopener">🎠 Freundesbuch anschauen</a>
<button class="secondary" id="logoutBtn">Abmelden</button>
</div>
</div>
<nav class="tab-nav">
<a href="/admin" class="tab-link">👥 Freunde</a>
<a href="/admin/settings" class="tab-link active">⚙️ Einstellungen &amp; Sichern</a>
</nav>
<div class="container">
<section class="card" id="settingsCard">
<h2>Einstellungen</h2>
<label for="bookTitle">Titel des Freundesbuchs (steht auf dem Deckblatt)</label>
<input type="text" id="bookTitle" placeholder="Unser Freundesbuch" style="margin-bottom:1em;" />
<label for="publicBaseUrl">Öffentliche URL (für Freigabe-Links hinter einem Reverse-Proxy)</label>
<div class="inline-form">
<input type="text" id="publicBaseUrl" placeholder="https://freundesbuch.example.com" />
<button type="button" id="saveSettingsBtn">Speichern</button>
</div>
<p class="muted" style="margin-top:0.4em;">Leer lassen, um automatisch die aktuell aufgerufene Adresse zu verwenden.</p>
<div id="settingsSaved" class="saved-msg2"></div>
</section>
<section class="card" id="transferCard" style="margin-top:1.4em;">
<h2>Sichern &amp; Wiederherstellen</h2>
<div class="transfer-row">
<div>
<h3 style="font-size:1.2rem;">Ganzes Buch</h3>
<button type="button" id="bookExportBtn" class="secondary">⬇️ Buch exportieren (ZIP)</button>
</div>
<div>
<label for="bookImportFile">Buch importieren</label>
<input type="file" id="bookImportFile" accept=".zip" />
<label style="font-weight:normal; display:flex; align-items:center; gap:0.4em; margin-top:0.4em;">
<input type="checkbox" id="bookImportReplace" style="width:auto;" />
Bestehende Freunde vorher löschen
</label>
<button type="button" id="bookImportBtn" class="secondary" style="margin-top:0.4em;">⬆️ Importieren</button>
</div>
</div>
<hr style="border:none; border-top:1px solid var(--line); margin:1.2em 0;" />
<div>
<h3 style="font-size:1.2rem;">Einzelnen Freund importieren</h3>
<p class="muted">Legt einen neuen Freund aus einer zuvor exportierten ZIP-Datei an.</p>
<input type="file" id="friendImportFile" accept=".zip" />
<button type="button" id="friendImportBtn" class="secondary" style="margin-top:0.4em;">⬆️ Importieren</button>
</div>
<div id="transferMsg"></div>
</section>
</div>
<script src="/admin/settings.js"></script>
</body>
</html>