From 4445cdd053ee85fcd1229e3ef0118cf01a7124d2 Mon Sep 17 00:00:00 2001 From: Alexandros Kosiaris Date: Mon, 3 Jan 2022 16:56:29 +0200 Subject: [PATCH] Expose entry unshare in the entry and list views Why: A user might want to unshare a specific entry. Navigating to the shared entries page requires a mental context switch, whereas having the ability right in the entry page makes it easier. What: Add an extra
  • element to display the unshare icon and link in the entry view as well as the item_meta template. The latter is shared for multiple pages listing entries, e.g. bookmarks, feed entries, search, history etc. The functionality already exists for the shared entries page, we are just expose it in a couple more places Signed-off-by: Alexandros Kosiaris --- template/templates/common/item_meta.html | 9 +++++++++ template/templates/views/entry.html | 21 ++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/template/templates/common/item_meta.html b/template/templates/common/item_meta.html index 21c802a7..a78a8378 100644 --- a/template/templates/common/item_meta.html +++ b/template/templates/common/item_meta.html @@ -42,6 +42,15 @@ title="{{ t "entry.shared_entry.title" }}" target="_blank">{{ icon "share" }}{{ t "entry.shared_entry.label" }}
  • +
  • + {{ icon "delete" }}{{ t "entry.unshare.label" }} +
  • {{ end }} {{ if .hasSaveEntry }}
  • diff --git a/template/templates/views/entry.html b/template/templates/views/entry.html index 1317d6c6..106140f9 100644 --- a/template/templates/views/entry.html +++ b/template/templates/views/entry.html @@ -44,17 +44,28 @@ >{{ icon "save" }}{{ t "entry.save.label" }}
  • {{ end }} -
  • - {{ if .entry.ShareCode }} + {{ if .entry.ShareCode }} +
  • {{ icon "share" }}{{ t "entry.shared_entry.label" }} - {{ else }} +
  • +
  • + {{ icon "delete" }}{{ t "entry.unshare.label" }} +
  • + {{ else }} +
  • {{ icon "share" }}{{ t "entry.share.label" }} - {{ end }} -
  • + + {{ end }}