|
1
|
{% extends "base.html" %} |
|
2
|
{% block title %}Notification Preferences — Fossilrepo{% endblock %} |
|
3
|
|
|
4
|
{% block content %} |
|
5
|
<h1 class="text-2xl font-bold text-gray-100 mb-6">Notification Preferences</h1> |
|
6
|
|
|
7
|
<form method="post" class="space-y-6"> |
|
8
|
{% csrf_token %} |
|
9
|
|
|
10
|
<div class="rounded-lg bg-gray-800 border border-gray-700 p-6"> |
|
11
|
<h2 class="text-lg font-semibold text-gray-200 mb-4">Delivery Mode</h2> |
|
12
|
<p class="text-sm text-gray-400 mb-4">Choose how you receive notifications.</p> |
|
13
|
<div class="space-y-3"> |
|
14
|
<label class="flex items-start gap-3 cursor-pointer"> |
|
15
|
<input type="radio" name="delivery_mode" value="immediate" |
|
16
|
{% if prefs.delivery_mode == "immediate" %}checked{% endif %} |
|
17
|
class="mt-1 text-brand focus:ring-brand"> |
|
18
|
<div> |
|
19
|
<span class="text-sm font-medium text-gray-200">Immediate (per event)</span> |
|
20
|
<p class="text-xs text-gray-500">Get an email for each event as it happens.</p> |
|
21
|
</div> |
|
22
|
</label> |
|
23
|
<label class="flex items-start gap-3 cursor-pointer"> |
|
24
|
<input type="radio" name="delivery_mode" value="daily" |
|
25
|
{% if prefs.delivery_mode == "daily" %}checked{% endif %} |
|
26
|
class="mt-1 text-brand focus:ring-brand"> |
|
27
|
<div> |
|
28
|
<span class="text-sm font-medium text-gray-200">Daily Digest</span> |
|
29
|
<p class="text-xs text-gray-500">Receive a single daily summary of all notifications.</p> |
|
30
|
</div> |
|
31
|
</label> |
|
32
|
<label class="flex items-start gap-3 cursor-pointer"> |
|
33
|
<input type="radio" name="delivery_mode" value="weekly" |
|
34
|
{% if prefs.delivery_mode == "weekly" %}checked{% endif %} |
|
35
|
class="mt-1 text-brand focus:ring-brand"> |
|
36
|
<div> |
|
37
|
<span class="text-sm font-medium text-gray-200">Weekly Digest</span> |
|
38
|
<p class="text-xs text-gray-500">Receive a weekly summary of all notifications.</p> |
|
39
|
</div> |
|
40
|
</label> |
|
41
|
<label class="flex items-start gap-3 cursor-pointer"> |
|
42
|
<input type="radio" name="delivery_mode" value="off" |
|
43
|
{% if prefs.delivery_mode == "off" %}checked{% endif %} |
|
44
|
class="mt-1 text-brand focus:ring-brand"> |
|
45
|
<div> |
|
46
|
<span class="text-sm font-medium text-gray-200">Off</span> |
|
47
|
<p class="text-xs text-gray-500">Do not send any email notifications.</p> |
|
48
|
</div> |
|
49
|
</label> |
|
50
|
</div> |
|
51
|
</div> |
|
52
|
|
|
53
|
<div class="rounded-lg bg-gray-800 border border-gray-700 p-6"> |
|
54
|
<h2 class="text-lg font-semibold text-gray-200 mb-4">Event Types</h2> |
|
55
|
<p class="text-sm text-gray-400 mb-4">Choose which types of events you want to be notified about.</p> |
|
56
|
<div class="space-y-3"> |
|
57
|
<label class="flex items-center gap-3 cursor-pointer"> |
|
58
|
<input type="checkbox" name="notify_checkins" |
|
59
|
{% if prefs.notify_checkins %}checked{% endif %} |
|
60
|
class="rounded border-gray-600 bg-gray-900 text-brand focus:ring-brand"> |
|
61
|
<div> |
|
62
|
<span class="text-sm font-medium text-gray-200">Checkins</span> |
|
63
|
<span class="text-xs text-gray-500 ml-2">New commits and code changes</span> |
|
64
|
</div> |
|
65
|
</label> |
|
66
|
<label class="flex items-center gap-3 cursor-pointer"> |
|
67
|
<input type="checkbox" name="notify_tickets" |
|
68
|
{% if prefs.notify_tickets %}checked{% endif %} |
|
69
|
class="rounded border-gray-600 bg-gray-900 text-brand focus:ring-brand"> |
|
70
|
<div> |
|
71
|
<span class="text-sm font-medium text-gray-200">Tickets</span> |
|
72
|
<span class="text-xs text-gray-500 ml-2">New and updated tickets</span> |
|
73
|
</div> |
|
74
|
</label> |
|
75
|
<label class="flex items-center gap-3 cursor-pointer"> |
|
76
|
<input type="checkbox" name="notify_wiki" |
|
77
|
{% if prefs.notify_wiki %}checked{% endif %} |
|
78
|
class="rounded border-gray-600 bg-gray-900 text-brand focus:ring-brand"> |
|
79
|
<div> |
|
80
|
<span class="text-sm font-medium text-gray-200">Wiki</span> |
|
81
|
<span class="text-xs text-gray-500 ml-2">Wiki page changes</span> |
|
82
|
</div> |
|
83
|
</label> |
|
84
|
<label class="flex items-center gap-3 cursor-pointer"> |
|
85
|
<input type="checkbox" name="notify_releases" |
|
86
|
{% if prefs.notify_releases %}checked{% endif %} |
|
87
|
class="rounded border-gray-600 bg-gray-900 text-brand focus:ring-brand"> |
|
88
|
<div> |
|
89
|
<span class="text-sm font-medium text-gray-200">Releases</span> |
|
90
|
<span class="text-xs text-gray-500 ml-2">New releases and tags</span> |
|
91
|
</div> |
|
92
|
</label> |
|
93
|
<label class="flex items-center gap-3 cursor-pointer"> |
|
94
|
<input type="checkbox" name="notify_forum" |
|
95
|
{% if prefs.notify_forum %}checked{% endif %} |
|
96
|
class="rounded border-gray-600 bg-gray-900 text-brand focus:ring-brand"> |
|
97
|
<div> |
|
98
|
<span class="text-sm font-medium text-gray-200">Forum</span> |
|
99
|
<span class="text-xs text-gray-500 ml-2">Forum posts and replies</span> |
|
100
|
</div> |
|
101
|
</label> |
|
102
|
</div> |
|
103
|
</div> |
|
104
|
|
|
105
|
<div> |
|
106
|
<button type="submit" class="rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white hover:bg-brand-hover"> |
|
107
|
Save Preferences |
|
108
|
</button> |
|
109
|
</div> |
|
110
|
</form> |
|
111
|
{% endblock %} |
|
112
|
|