Add bloatfe-tan.
[bloat] / templates / settings.tmpl
1 {{with .Data}}
2 {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
3 <div class="page-title"> Settings </div>
4
5 <form id="settings-form" action="/settings" method="POST">
6         <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
7         <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
8         <div class="settings-form-field">
9                 <label for="visibility"> Default format </label>
10                 {{$defFormat := .Settings.DefaultFormat}}
11                 <select id="post-format" name="format">
12                         {{range .PostFormats}} 
13                                 <option value="{{.Type}}" {{if eq $defFormat .Type}}selected{{end}}>{{.Name}}</option> 
14                         {{end}}
15                 </select>
16         </div>
17         <div class="settings-form-field">
18                 <label for="visibility"> Default scope </label>
19                 <select id="visibility" name="visibility">
20                         <option value="public" {{if eq .Settings.DefaultVisibility "public"}}selected{{end}}>Public</option>
21                         <option value="unlisted" {{if eq .Settings.DefaultVisibility "unlisted"}}selected{{end}}>Unlisted</option>
22                         <option value="private" {{if eq .Settings.DefaultVisibility "private"}}selected{{end}}>Private</option>
23                         <option value="direct" {{if eq .Settings.DefaultVisibility "direct"}}selected{{end}}>Direct</option>
24                 </select>
25         </div>
26         <div class="settings-form-field">
27                 <label for="notification-interval"> Refresh Notifications </label>
28                 <select id="notification-interval" name="notification_interval">
29                         <option value="0" {{if eq .Settings.NotificationInterval 0}}selected{{end}}>Disabled</option>
30                         <option value="30" {{if eq .Settings.NotificationInterval 30}}selected{{end}}>After 30s</option>
31                         <option value="60" {{if eq .Settings.NotificationInterval 60}}selected{{end}}>After 1m</option>
32                         <option value="120" {{if eq .Settings.NotificationInterval 120}}selected{{end}}>After 2m</option>
33                         <option value="300" {{if eq .Settings.NotificationInterval 300}}selected{{end}}>After 5m</option>
34                         <option value="600" {{if eq .Settings.NotificationInterval 600}}selected{{end}}>After 10m</option>
35                 </select>
36         </div>
37         <div class="settings-form-field">
38                 <input id="copy-scope" name="copy_scope" type="checkbox" value="true" {{if .Settings.CopyScope}}checked{{end}}>
39                 <label for="copy-scope"> Copy scope when replying </label>
40         </div>
41         <div class="settings-form-field">
42                 <input id="thread-tab" name="thread_in_new_tab" type="checkbox" value="true" {{if .Settings.ThreadInNewTab}}checked{{end}}>
43                 <label for="thread-tab"> Open threads in new tab from timeline </label>
44         </div>
45         <div class="settings-form-field">
46                 <input id="hide-attachments" name="hide_attachments" type="checkbox" value="true" {{if .Settings.HideAttachments}}checked{{end}}>
47                 <label for="hide-attachments"> Hide attachments </label>
48         </div>
49         <div class="settings-form-field">
50                 <input id="mask-nsfw" name="mask_nsfw" type="checkbox" value="true" {{if .Settings.MaskNSFW}}checked{{end}}>
51                 <label for="mask-nsfw"> Mask NSFW attachments </label>
52         </div>
53         <div class="settings-form-field">
54                 <input id="fluoride-mode" name="fluoride_mode" type="checkbox" value="true" {{if .Settings.FluorideMode}}checked{{end}}>
55                 <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>
56         </div>
57         <div class="settings-form-field">
58                 <input id="anti-dopamine-mode" name="anti_dopamine_mode" type="checkbox"
59                 value="true" {{if .Settings.AntiDopamineMode}}checked{{end}}>
60                 <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>
61         </div>
62         <div class="settings-form-field">
63                 <input id="dark-mode" name="dark_mode" type="checkbox" value="true" {{if .Settings.DarkMode}}checked{{end}}>
64                 <label for="dark-mode"> Use dark theme </label>
65         </div>
66         <div class="settings-form-field">
67                 <label for="custom-css">Custom CSS:</label>
68                 <textarea id="custom-css" name="custom_css" cols="80" rows="24">{{.Settings.CustomCSS}}</textarea>
69         </div>
70         <button type="submit"> Save </button>
71 </form>
72
73 {{template "footer.tmpl"}}
74 {{end}}