summaryrefslogtreecommitdiff
path: root/views/profile.pug
blob: 0542a644804b2b62fa1ddea8389db29097038009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//- vim:ts=4:sw=4:
doctype html
html
	head
		include head
		title Profile
	body
		include header
		article
			h1 Profile

			p Welcome, <a class="black" href="/user/#{user.name}">#{user.name}</a>!

			if who.about
				p.box= who.about

			p Member since #{human_date(who.ctime)}.

			+userstats(who, ratings)

			h3 Notifications

			p Your mail address is #{user.mail}

			if ENABLE_MAIL
				if !mail.is_verified
					p &#x26a0; <a href="/account/mail/verify">Verify your mail address!</a>
					p You must verify your mail address before you can enable notifications.
				else
					if !mail.notify
						p <a href="/account/mail/subscribe">Enable mail notifications</a>
				if mail.notify
					p <a href="/account/mail/unsubscribe">Disable mail notifications</a>
			else
				p.error Mail notifications are disabled on this server.

			if ENABLE_WEBHOOKS
				if !webhook
					p <a href="/account/webhook">Configure webhook</a>
				else if webhook.error
					dl
						dt <a href="/account/webhook">Configure webhook</a>
						dd.error ERROR: #{webhook.error}
				else
					dl
						dt <a href="/account/webhook">Configure webhook</a>
						dd= new URL(webhook.url).hostname
			else
				p.error Webhook notifications are disabled on this server.

			h3 Account

			p
				| <a href="/account/change-password">Change password</a>
				br
				| <a href="/account/change-mail">Change mail address</a>
				br
				| <a href="/account/change-name">Change user name</a>
				br
				| <a href="/account/change-about">Change profile text</a>

			p
				| <a href="/account/delete">Delete account</a>

			p
				form(action="/account/logout" method="post")
					button(type="submit") Logout