aboutsummaryrefslogtreecommitdiff
path: root/templates/settings.tmpl
blob: 4a72b6ab10004aa969500c4ce88a475234f080af (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
68
69
70
{{with .Data}}
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
<div class="page-title"> Settings </div>

<form id="settings-form" action="/settings" method="POST">
	<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
	<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
	<div class="settings-form-field">
		<label for="visibility"> Default format </label>
		{{$defFormat := .Settings.DefaultFormat}}
		<select id="post-format" name="format">
			{{range .PostFormats}} 
				<option value="{{.Type}}" {{if eq $defFormat .Type}}selected{{end}}>{{.Name}}</option> 
			{{end}}
		</select>
	</div>
	<div class="settings-form-field">
		<label for="visibility"> Default scope </label>
		<select id="visibility" name="visibility">
			<option value="public" {{if eq .Settings.DefaultVisibility "public"}}selected{{end}}>Public</option>
			<option value="unlisted" {{if eq .Settings.DefaultVisibility "unlisted"}}selected{{end}}>Unlisted</option>
			<option value="private" {{if eq .Settings.DefaultVisibility "private"}}selected{{end}}>Private</option>
			<option value="direct" {{if eq .Settings.DefaultVisibility "direct"}}selected{{end}}>Direct</option>
		</select>
	</div>
	<div class="settings-form-field">
		<label for="notification-interval"> Refresh Notifications </label>
		<select id="notification-interval" name="notification_interval">
			<option value="0" {{if eq .Settings.NotificationInterval 0}}selected{{end}}>Disabled</option>
			<option value="30" {{if eq .Settings.NotificationInterval 30}}selected{{end}}>After 30s</option>
			<option value="60" {{if eq .Settings.NotificationInterval 60}}selected{{end}}>After 1m</option>
			<option value="120" {{if eq .Settings.NotificationInterval 120}}selected{{end}}>After 2m</option>
			<option value="300" {{if eq .Settings.NotificationInterval 300}}selected{{end}}>After 5m</option>
			<option value="600" {{if eq .Settings.NotificationInterval 600}}selected{{end}}>After 10m</option>
		</select>
	</div>
	<div class="settings-form-field">
		<input id="copy-scope" name="copy_scope" type="checkbox" value="true" {{if .Settings.CopyScope}}checked{{end}}>
		<label for="copy-scope"> Copy scope when replying </label>
	</div>
	<div class="settings-form-field">
		<input id="thread-tab" name="thread_in_new_tab" type="checkbox" value="true" {{if .Settings.ThreadInNewTab}}checked{{end}}>
		<label for="thread-tab"> Open threads in new tab from timeline </label>
	</div>
	<div class="settings-form-field">
		<input id="hide-attachments" name="hide_attachments" type="checkbox" value="true" {{if .Settings.HideAttachments}}checked{{end}}>
		<label for="hide-attachments"> Hide attachments </label>
	</div>
	<div class="settings-form-field">
		<input id="mask-nsfw" name="mask_nsfw" type="checkbox" value="true" {{if .Settings.MaskNSFW}}checked{{end}}>
		<label for="mask-nsfw"> Mask NSFW attachments </label>
	</div>
	<div class="settings-form-field">
		<input id="fluoride-mode" name="fluoride_mode" type="checkbox" value="true" {{if .Settings.FluorideMode}}checked{{end}}>
		<label for="fluoride-mode"> Enable <abbr title="Enable JavaScript based functionality, e.g., like/retweet without page reload and reply preview on thread page">fluoride mode</abbr> </label>
	</div>
	<div class="settings-form-field">
		<input id="anti-dopamine-mode" name="anti_dopamine_mode" type="checkbox"
		value="true" {{if .Settings.AntiDopamineMode}}checked{{end}}>
		<label for="anti-dopamine-mode"> Enable <abbr title="Remove like/retweet/unread notification count and disable like/retweet/follow notifications">anti-dopamine mode</abbr> </label>
	</div>
	<div class="settings-form-field">
		<input id="dark-mode" name="dark_mode" type="checkbox" value="true" {{if .Settings.DarkMode}}checked{{end}}>
		<label for="dark-mode"> Use dark theme </label>
	</div>
	<button type="submit"> Save </button>
</form>

{{template "footer.tmpl"}}
{{end}}