mirror of
https://github.com/skoelle/icloud-contacts-sync.git
synced 2026-09-17 23:40:24 +00:00
239 lines
6.5 KiB
HTML
239 lines
6.5 KiB
HTML
<!-- Copyright (c) 2026 Stefan Koelle (https://stefankoelle.de) -->
|
||
<!-- Licensed under the MIT License. See LICENSE file in project root for details. -->
|
||
<!DOCTYPE html>
|
||
<html lang="de">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
||
<title>Admin – Kontakte</title>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
background: #f5f5f5;
|
||
color: #333;
|
||
line-height: 1.6;
|
||
overflow-y: scroll;
|
||
}
|
||
|
||
.container {
|
||
max-width: 800px;
|
||
margin: 0 auto;
|
||
padding: 2rem 1rem;
|
||
}
|
||
|
||
h1 {
|
||
font-size: 1.5rem;
|
||
margin-bottom: 0.5rem;
|
||
color: #222;
|
||
}
|
||
|
||
.back-link {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 0.5rem;
|
||
color: #0066cc;
|
||
text-decoration: none;
|
||
font-size: 0.875rem;
|
||
margin-bottom: 1.5rem;
|
||
}
|
||
|
||
.back-link:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.card {
|
||
background: #fff;
|
||
border-radius: 8px;
|
||
padding: 1.25rem;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
||
margin-bottom: 1.5rem;
|
||
}
|
||
|
||
.card-title {
|
||
font-size: 0.75rem;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
color: #888;
|
||
margin-bottom: 1rem;
|
||
}
|
||
|
||
.toggle-row {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 0.75rem;
|
||
background: #f8f9fa;
|
||
border-radius: 6px;
|
||
}
|
||
|
||
.toggle-label {
|
||
font-size: 0.875rem;
|
||
color: #333;
|
||
}
|
||
|
||
.toggle-sub {
|
||
font-size: 0.75rem;
|
||
color: #888;
|
||
margin-top: 0.25rem;
|
||
}
|
||
|
||
.toggle-switch {
|
||
position: relative;
|
||
width: 48px;
|
||
height: 26px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.toggle-switch input {
|
||
opacity: 0;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
|
||
.toggle-slider {
|
||
position: absolute;
|
||
cursor: pointer;
|
||
inset: 0;
|
||
background: #ccc;
|
||
border-radius: 26px;
|
||
transition: background 0.2s;
|
||
}
|
||
|
||
.toggle-slider::before {
|
||
content: "";
|
||
position: absolute;
|
||
height: 20px;
|
||
width: 20px;
|
||
left: 3px;
|
||
bottom: 3px;
|
||
background: #fff;
|
||
border-radius: 50%;
|
||
transition: transform 0.2s;
|
||
}
|
||
|
||
.toggle-switch input:checked + .toggle-slider {
|
||
background: #0066cc;
|
||
}
|
||
|
||
.toggle-switch input:checked + .toggle-slider::before {
|
||
transform: translateX(22px);
|
||
}
|
||
|
||
.status {
|
||
margin-top: 1rem;
|
||
padding: 0.75rem;
|
||
border-radius: 6px;
|
||
font-size: 0.875rem;
|
||
}
|
||
|
||
.status-on {
|
||
background: #d4edda;
|
||
color: #155724;
|
||
}
|
||
|
||
.status-off {
|
||
background: #f8f9fa;
|
||
color: #666;
|
||
}
|
||
|
||
.btn {
|
||
display: inline-block;
|
||
padding: 0.75rem 1.5rem;
|
||
background: #0066cc;
|
||
color: #fff;
|
||
border: none;
|
||
border-radius: 6px;
|
||
font-size: 0.875rem;
|
||
cursor: pointer;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.btn:hover {
|
||
background: #0055aa;
|
||
}
|
||
|
||
.btn:disabled {
|
||
background: #ccc;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
.flash {
|
||
margin-top: 1rem;
|
||
padding: 0.75rem;
|
||
border-radius: 6px;
|
||
font-size: 0.875rem;
|
||
}
|
||
|
||
.flash-success {
|
||
background: #d4edda;
|
||
color: #155724;
|
||
}
|
||
|
||
.flash-error {
|
||
background: #f8d7da;
|
||
color: #721c24;
|
||
}
|
||
|
||
.test-info {
|
||
font-size: 0.8125rem;
|
||
color: #888;
|
||
margin-top: 0.75rem;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<h1><a href="/" style="text-decoration:none;color:inherit;display:inline-flex;align-items:center;gap:0.4rem"><img src="/static/favicon.svg" alt="" style="height:1.5em;width:1.5em;vertical-align:middle">Kontakte</a></h1>
|
||
<a href="/" class="back-link">← Zurück zur Übersicht</a>
|
||
|
||
<div class="card">
|
||
<div class="card-title">Admin-Einstellungen</div>
|
||
<form method="post" action="/admin/toggle">
|
||
<div class="toggle-row">
|
||
<div>
|
||
<div class="toggle-label">Alle Accounts anzeigen</div>
|
||
<div class="toggle-sub">Kontakte aller Benutzer einsehen</div>
|
||
</div>
|
||
<label class="toggle-switch">
|
||
<input type="checkbox" name="show_all" onchange="this.form.submit()" {% if show_all %}checked{% endif %}>
|
||
<span class="toggle-slider"></span>
|
||
</label>
|
||
</div>
|
||
</form>
|
||
<div class="status {% if show_all %}status-on{% else %}status-off{% endif %}">
|
||
{% if show_all %}
|
||
Aktiv: Du siehst alle Kontakte aller Accounts.
|
||
{% else %}
|
||
Inaktiv: Du siehst nur deine eigenen Kontakte.
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
|
||
{% if success %}
|
||
<div class="flash flash-success">{{ success }}</div>
|
||
{% endif %}
|
||
{% if error %}
|
||
<div class="flash flash-error">{{ error }}</div>
|
||
{% endif %}
|
||
|
||
<div class="card">
|
||
<div class="card-title">E-Mail-Test</div>
|
||
<form method="post" action="/admin/test-send">
|
||
<button type="submit" class="btn">Test-Geburtstagsmail senden (06.08.)</button>
|
||
</form>
|
||
<div class="test-info">
|
||
Sendet eine Test-Geburtstagsmail an die konfigurierte Adresse (MAIL_TO) mit allen Kontakten, die am 6. August Geburtstag haben. Das Layout entspricht der täglichen Geburtstagsmail.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|