Files
FireworksApp/members/templates/members/user_settings.html
T

33 lines
1.6 KiB
HTML

{% load vite %}
<!doctype html>
<html lang="en" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Settings · Sound Signal</title>
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
{% vite_asset "frontend/src/entries/settings.js" %}
</head>
<body>
<main class="card">
<h1>Settings</h1>
<p class="intro">Manage personal notification preferences.</p>
{% if messages %}<ul class="messages">{% for message in messages %}<li class="alert alert--success">{{ message }}</li>{% endfor %}</ul>{% endif %}
<form method="post" action="{% url 'user_settings' %}">
{% csrf_token %}
<section class="section" aria-labelledby="ntfy-title">
<h2 id="ntfy-title">Notifications / ntfy</h2>
<p class="help">Use a topic URL from your ntfy server. Test the current URL before saving it.</p>
<label for="ntfy-url">Topic URL</label>
{{ form.ntfy_url }}
{{ form.ntfy_url.errors }}
<div class="check">{{ form.ntfy_enabled }}<label for="{{ form.ntfy_enabled.id_for_label }}">Enable ntfy notifications</label></div>
<button class="button button--secondary" type="button" hx-post="{% url 'ntfy_test_notification' %}" hx-include="#ntfy-url, [name='csrfmiddlewaretoken']" hx-target="#ntfy-test-result" hx-swap="innerHTML">Test notification</button>
<div id="ntfy-test-result" aria-live="polite"></div>
</section>
<button class="button" type="submit">Save settings</button>
</form>
</main>
</body>
</html>