aboutsummaryrefslogtreecommitdiffhomepage
path: root/template
diff options
context:
space:
mode:
authorGravatar Carl Helmertz <carl.helmertz@elvaco.se>2018-10-14 00:43:09 +0200
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-10-19 20:05:26 -0700
commit15a11c3da98a5375fad22c7cdeaa73d073bb473d (patch)
treea291e9515f95c7987c6a0711c4688998e9908567 /template
parentb8f874a37d5ce57fb139e857b5cbd2276da46714 (diff)
Unsubscribe from feed through link or "#"
After importing old OPML files, you may discover that many feeds are obsolete or uninteresting. You list the feeds entries and determine that you want to unsubscribe. This needs three clicks (edit feed, delete, confirm) and requires moving the mouse to hit the different targets. This quickly becomes tiring, if you are up to possibly deleting hundreds of feeds. One mediation, introduced in this commit, is to add an unsubscribe link to each feed's entry listing view, and also adding a keyboard shortcut. The keyboard shortcut "#" is: * longer than one keystroke (requires shift) * hard to type by accident * used in Google products (thanks for the hint @fguillot) In an effort to try to reduce the number of accidental feed unsubscriptions.
Diffstat (limited to 'template')
-rw-r--r--template/common.go3
-rw-r--r--template/html/common/layout.html1
-rw-r--r--template/html/edit_feed.html3
-rw-r--r--template/html/feed_entries.html11
-rw-r--r--template/views.go19
5 files changed, 32 insertions, 5 deletions
diff --git a/template/common.go b/template/common.go
index bfd3f7a..1afb9f1 100644
--- a/template/common.go
+++ b/template/common.go
@@ -208,6 +208,7 @@ var templateCommonMap = map[string]string{
<li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
<li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
<li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
+ <li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
<li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
</ul>
@@ -243,6 +244,6 @@ var templateCommonMap = map[string]string{
var templateCommonMapChecksums = map[string]string{
"entry_pagination": "4faa91e2eae150c5e4eab4d258e039dfdd413bab7602f0009360e6d52898e353",
"item_meta": "34deb081a054f2948ad808bdb2c8603d6ab00c58f2f50c4ead0b47ae092888eb",
- "layout": "d1795cedbbc0fc6ec7a5e31039e10b8361b7a74bcca74d860f127ac159036ab6",
+ "layout": "69ba8db45fde768cf71bab7dba60cece39968a185cec58850582dec11668efec",
"pagination": "3386e90c6e1230311459e9a484629bc5d5bf39514a75ef2e73bbbc61142f7abb",
}
diff --git a/template/html/common/layout.html b/template/html/common/layout.html
index a79032d..cf49fa5 100644
--- a/template/html/common/layout.html
+++ b/template/html/common/layout.html
@@ -134,6 +134,7 @@
<li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
<li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
<li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
+ <li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li>
<li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
<li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
</ul>
diff --git a/template/html/edit_feed.html b/template/html/edit_feed.html
index b827435..73a2e27 100644
--- a/template/html/edit_feed.html
+++ b/template/html/edit_feed.html
@@ -92,6 +92,7 @@
<div class="alert alert-error">
<a href="#"
data-confirm="true"
+ data-action="remove-feed"
data-label-question="{{ t "confirm.question" }}"
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
@@ -101,4 +102,4 @@
</div>
{{ end }}
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/template/html/feed_entries.html b/template/html/feed_entries.html
index a85cffc..cdc435c 100644
--- a/template/html/feed_entries.html
+++ b/template/html/feed_entries.html
@@ -15,6 +15,17 @@
<li>
<a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "menu.edit_feed" }}</a>
</li>
+ <li>
+ <a href="#"
+ data-confirm="true"
+ data-action="remove-feed"
+ data-label-question="{{ t "confirm.question" }}"
+ data-label-yes="{{ t "confirm.yes" }}"
+ data-label-no="{{ t "confirm.no" }}"
+ data-label-loading="{{ t "confirm.loading" }}"
+ data-url="{{ route "removeFeed" "feedID" .feed.ID }}"
+ data-redirect-url="{{ route "feeds" }}">{{ t "action.remove_feed" }}</a>
+ </li>
</ul>
</section>
diff --git a/template/views.go b/template/views.go
index 0dc2671..3a01ec1 100644
--- a/template/views.go
+++ b/template/views.go
@@ -492,6 +492,7 @@ var templateViewsMap = map[string]string{
<div class="alert alert-error">
<a href="#"
data-confirm="true"
+ data-action="remove-feed"
data-label-question="{{ t "confirm.question" }}"
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
@@ -501,7 +502,8 @@ var templateViewsMap = map[string]string{
</div>
{{ end }}
-{{ end }}`,
+{{ end }}
+`,
"edit_user": `{{ define "title"}}{{ t "page.edit_user.title" .selected_user.Username }}{{ end }}
{{ define "content"}}
@@ -696,6 +698,17 @@ var templateViewsMap = map[string]string{
<li>
<a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "menu.edit_feed" }}</a>
</li>
+ <li>
+ <a href="#"
+ data-confirm="true"
+ data-action="remove-feed"
+ data-label-question="{{ t "confirm.question" }}"
+ data-label-yes="{{ t "confirm.yes" }}"
+ data-label-no="{{ t "confirm.no" }}"
+ data-label-loading="{{ t "confirm.loading" }}"
+ data-url="{{ route "removeFeed" "feedID" .feed.ID }}"
+ data-redirect-url="{{ route "feeds" }}">{{ t "action.remove_feed" }}</a>
+ </li>
</ul>
</section>
@@ -1377,10 +1390,10 @@ var templateViewsMapChecksums = map[string]string{
"create_category": "6b22b5ce51abf4e225e23a79f81be09a7fb90acb265e93a8faf9446dff74018d",
"create_user": "1e940be3afefc0a5c6273bbadcddc1e29811e9548e5227ac2adfe697ca5ce081",
"edit_category": "daf073d2944a180ce5aaeb80b597eb69597a50dff55a9a1d6cf7938b48d768cb",
- "edit_feed": "191c4c1f73e9f8d16938ec8cbd29afc7d7d1d17777394094bcf414ab198d9e51",
+ "edit_feed": "ab30c31a4385a7b16c54baa78bdcb93a57181ed1c5018ce097d7eb50673bb995",
"edit_user": "f4f99412ba771cfca2a2a42778b023b413c5494e9a287053ba8cf380c2865c5f",
"entry": "2ea9fee1ae5513ef1abb5923221c2ef1212e26d3bb651da66069ce8a336cbb7c",
- "feed_entries": "814b58b106313d53f2929e5257c79e47a7e09d715e493f150d9dc3a8c97eaa4e",
+ "feed_entries": "0f3d02d820475a3b0e165e10be2bf39fa5ab6a9dc5b0945c9ad886434e64e6ca",
"feeds": "31acc253c547a6cce5710d72a6f6b3b396162ecd5e5af295b2cf47c1ff55bd06",
"history_entries": "b65ca1d85615caa7c314a33f1cb997aa3477a79e66b9894b2fd387271ad467d2",
"import": "8349e47a783bb40d8e9248b4771656e5f006185e11079e1c4680dd52633420ed",