aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-11-14 14:08:16 +0000
committerr <r@freesoftwareextremist.com>2020-11-14 14:22:34 +0000
commitc3d90539e9a7addd3c41f44b864b14bde60958dc (patch)
treecc8efc18befd999db4985ef75fc4f42e99da9f78 /templates
parent856fe9e8c74e7c8096f7fb04d7b0932171223752 (diff)
downloadbloat-c3d90539e9a7addd3c41f44b864b14bde60958dc.tar.gz
bloat-c3d90539e9a7addd3c41f44b864b14bde60958dc.zip
Add notification interval setting
It replaces the "Auto refresh notifications" checkbox
Diffstat (limited to 'templates')
-rw-r--r--templates/header.tmpl4
-rw-r--r--templates/settings.tmpl15
2 files changed, 13 insertions, 6 deletions
diff --git a/templates/header.tmpl b/templates/header.tmpl
index 0c81b72..df2b6af 100644
--- a/templates/header.tmpl
+++ b/templates/header.tmpl
@@ -14,8 +14,8 @@
{{if $.Ctx.AntiDopamineMode}}
<meta name="antidopamine_mode" content="{{$.Ctx.AntiDopamineMode}}">
{{end}}
- {{if .AutoRefresh}}
- <meta http-equiv="refresh" content="30">
+ {{if .RefreshInterval}}
+ <meta http-equiv="refresh" content="{{.RefreshInterval}}">
{{end}}
<title> {{if gt .Count 0}}({{.Count}}){{end}} {{.Title}} </title>
<link rel="stylesheet" href="/static/style.css">
diff --git a/templates/settings.tmpl b/templates/settings.tmpl
index 972e1a2..baeb64d 100644
--- a/templates/settings.tmpl
+++ b/templates/settings.tmpl
@@ -23,6 +23,17 @@
</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>
@@ -39,10 +50,6 @@
<label for="mask-nsfw"> Mask NSFW attachments </label>
</div>
<div class="settings-form-field">
- <input id="auto-refresh-notifications" name="auto_refresh_notifications" type="checkbox" value="true" {{if .Settings.AutoRefreshNotifications}}checked{{end}}>
- <label for="auto-refresh-notifications"> Auto refresh notifications </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>