aboutsummaryrefslogtreecommitdiffhomepage
path: root/template
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-07-17 21:29:00 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-07-17 21:40:03 -0700
commitac3693562b635aaab4f43ad5d1343aae7ba5b7d2 (patch)
treedb0487e501af59494df550d0ed4b30b4b1bd4327 /template
parent99149d9f2a32dd7426c6c2e51762e0895ed8199c (diff)
Ask for confirmation before flushing history
Diffstat (limited to 'template')
-rw-r--r--template/html/history_entries.html8
-rw-r--r--template/views.go10
2 files changed, 15 insertions, 3 deletions
diff --git a/template/html/history_entries.html b/template/html/history_entries.html
index 0888778..109e1a2 100644
--- a/template/html/history_entries.html
+++ b/template/html/history_entries.html
@@ -6,7 +6,13 @@
{{ if .entries }}
<ul>
<li>
- <a href="{{ route "flushHistory" }}">{{ t "menu.flush_history" }}</a>
+ <a href="#"
+ data-confirm="true"
+ data-url="{{ route "flushHistory" }}"
+ data-label-question="{{ t "confirm.question" }}"
+ data-label-yes="{{ t "confirm.yes" }}"
+ data-label-no="{{ t "confirm.no" }}"
+ data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.flush_history" }}</a>
</li>
</ul>
{{ end }}
diff --git a/template/views.go b/template/views.go
index af283f0..83006fd 100644
--- a/template/views.go
+++ b/template/views.go
@@ -884,7 +884,13 @@ var templateViewsMap = map[string]string{
{{ if .entries }}
<ul>
<li>
- <a href="{{ route "flushHistory" }}">{{ t "menu.flush_history" }}</a>
+ <a href="#"
+ data-confirm="true"
+ data-url="{{ route "flushHistory" }}"
+ data-label-question="{{ t "confirm.question" }}"
+ data-label-yes="{{ t "confirm.yes" }}"
+ data-label-no="{{ t "confirm.no" }}"
+ data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.flush_history" }}</a>
</li>
</ul>
{{ end }}
@@ -1455,7 +1461,7 @@ var templateViewsMapChecksums = map[string]string{
"entry": "1626bf4dd3223b2f730865676162aa0a9f0a0e009cdea90f705230542922e0f4",
"feed_entries": "4bb6b96ba4d13dbaf22dcf6dd95ae36b6e5a0c99175d502865a164dc68fd4bae",
"feeds": "31acc253c547a6cce5710d72a6f6b3b396162ecd5e5af295b2cf47c1ff55bd06",
- "history_entries": "b65ca1d85615caa7c314a33f1cb997aa3477a79e66b9894b2fd387271ad467d2",
+ "history_entries": "9763d2120cfaeb78d406fdc029197fed2f7cfa7682970eeedae82ae79be65519",
"import": "8349e47a783bb40d8e9248b4771656e5f006185e11079e1c4680dd52633420ed",
"integrations": "f85b4a48ab1fc13b8ca94bfbbc44bd5e8784f35b26a63ec32cbe82b96b45e008",
"login": "2e72d2d4b9786641b696bedbed5e10b04bdfd68254ddbbdb0a53cca621d200c7",