Add icons to feeds and categories list

This commit is contained in:
Frédéric Guillot 2020-06-14 19:00:41 -07:00
parent fe8347f32a
commit 5e5615a2d1
18 changed files with 149 additions and 46 deletions

View File

@ -87,7 +87,8 @@ var translations = map[string]string{
"page.starred.title": "Lesezeichen",
"page.categories.title": "Kategorien",
"page.categories.no_feed": "Kein Abonnement.",
"page.categories.feeds": "Siehe Abonnements",
"page.categories.entries": "Artikel",
"page.categories.feeds": "Abonnements",
"page.categories.feed_count": [
"Es gibt %d Abonnement.",
"Es gibt %d Abonnements."
@ -424,7 +425,8 @@ var translations = map[string]string{
"page.starred.title": "Starred",
"page.categories.title": "Categories",
"page.categories.no_feed": "No feed.",
"page.categories.feeds": "See subscriptions",
"page.categories.entries": "Articles",
"page.categories.feeds": "Subscriptions",
"page.categories.feed_count": [
"There is %d feed.",
"There are %d feeds."
@ -741,7 +743,8 @@ var translations = map[string]string{
"page.starred.title": "Marcadores",
"page.categories.title": "Categorias",
"page.categories.no_feed": "No fuente.",
"page.categories.feeds": "Ver suscripciones",
"page.categories.entries": "Artículos",
"page.categories.feeds": "Suscripciones",
"page.categories.feed_count": [
"Hay %d fuente.",
"Hay %d fuentes."
@ -1058,7 +1061,8 @@ var translations = map[string]string{
"page.starred.title": "Favoris",
"page.categories.title": "Catégories",
"page.categories.no_feed": "Aucun abonnement.",
"page.categories.feeds": "Voir les abonnements",
"page.categories.entries": "Articles",
"page.categories.feeds": "Abonnements",
"page.categories.feed_count": [
"Il y a %d abonnement.",
"Il y a %d abonnements."
@ -1395,7 +1399,8 @@ var translations = map[string]string{
"page.starred.title": "Preferiti",
"page.categories.title": "Categorie",
"page.categories.no_feed": "Nessun feed.",
"page.categories.feeds": "Vedi abbonamenti",
"page.categories.entries": "Articoli",
"page.categories.feeds": "Abbonamenti",
"page.categories.feed_count": [
"C'è %d feed.",
"Ci sono %d feed."
@ -1712,6 +1717,7 @@ var translations = map[string]string{
"page.starred.title": "星付き",
"page.categories.title": "カテゴリ",
"page.categories.no_feed": "フィード無し",
"page.categories.entries": "記事",
"page.categories.feeds": "フィード購読を見る",
"page.categories.feed_count": [
"%d 個の記事があります。",
@ -2029,7 +2035,8 @@ var translations = map[string]string{
"page.starred.title": "Favorieten",
"page.categories.title": "Categorieën",
"page.categories.no_feed": "Geen feeds.",
"page.categories.feeds": "Zie abonnementen",
"page.categories.entries": "Lidwoord",
"page.categories.feeds": "Abonnementen",
"page.categories.feed_count": [
"Er is %d feed.",
"Er zijn %d feeds."
@ -2364,7 +2371,8 @@ var translations = map[string]string{
"page.starred.title": "Oznaczone gwiazdką",
"page.categories.title": "Kategorie",
"page.categories.no_feed": "Brak kanałów.",
"page.categories.feeds": "Zobacz subskrypcje",
"page.categories.entries": "Artykuły",
"page.categories.feeds": "Subskrypcje",
"page.categories.feed_count": [
"Jest %d kanał.",
"Są %d kanały.",
@ -2707,7 +2715,8 @@ var translations = map[string]string{
"page.starred.title": "Избранное",
"page.categories.title": "Категории",
"page.categories.no_feed": "Нет подписок.",
"page.categories.feeds": "Посмотреть подписку",
"page.categories.entries": "Cтатьи",
"page.categories.feeds": "Подписку",
"page.categories.feed_count": [
"Есть %d подписка.",
"Есть %d подписки.",
@ -3032,6 +3041,7 @@ var translations = map[string]string{
"page.starred.title": "星标",
"page.categories.title": "分类",
"page.categories.no_feed": "没有源",
"page.categories.entries": "文章",
"page.categories.feeds": "查看订阅",
"page.categories.feed_count": [
"有 %d 个源"
@ -3279,14 +3289,14 @@ var translations = map[string]string{
}
var translationsChecksums = map[string]string{
"de_DE": "4975f99941dbcd712fab6b381027e1cbcbe588d957fbe2c033e5b63466592011",
"en_US": "3fc6d6aa333363b81b88e33300e62db8878d190bc35e1c16881fded5d3d805d4",
"es_ES": "b441b4bff456bbb40332798f434b08b69e204e6ab7518d18a769df8ab6a56666",
"fr_FR": "1b5710d2803b634bd901611e204bd92a8702c5c4e637e26a0fb8c4061ce2cbb3",
"it_IT": "c543e0803c78b8549702e37c8c259cce43925fa8a949a6b48f89a9223bed9f24",
"ja_JP": "5a11a2a4c632f8df45d107750ab11149eff603eb944233393784d8b53183d086",
"nl_NL": "dd802be5de3a82924eb51f84e565151a1fb68fc13e0d75f81d10de90386b55d0",
"pl_PL": "32f8a9cfd193297cfe9c2747056621a8f57c17c50b816bf665647de05cdb328d",
"ru_RU": "b6664af10cc9c4acf111b196f92b6c1d7c271c764970250d48655057348add77",
"zh_CN": "08deb6dab5a9613a25f693aec1594564de9eae2a3fbccaea5147870499921e46",
"de_DE": "ddb063682852c86361af350be616d3bd328373ecb927804824008d016aa7c67c",
"en_US": "350b835f759212abd2110322394aa00b666fbf27d752532a7700fb52d5af3f02",
"es_ES": "26efc79faaf35efe5a33528cedc2522496987d290c9e86d8fff3a9bcbed3e441",
"fr_FR": "e8736791d5373b955cacce215b3ae67d56280bfa5d4596899e4e5e37ff962afd",
"it_IT": "41e6eba2d92a684ef90462226db312285d1d94a07a5bb917cfce4f64df290a86",
"ja_JP": "237f49939be015b509d4b3a02890691c3766df8878109114493624cfd13c0cad",
"nl_NL": "c70e1eaa3c2e8c0130522189c3932b52ee6e9ff91c91b0090eb9178f2f23c588",
"pl_PL": "1d5e05789a3150a8f1ddbe57616d509d1d33c61b60200c563a5e23571671209e",
"ru_RU": "f02fa11074bc38e9542a72b7200a4a3731b4a2f1b64b001d3e7fa6370fc1bdcc",
"zh_CN": "7732905e498d087c9a11ecc3eae8736e758c6b053da13de64fd6599ca40d8ee6",
}

View File

@ -82,7 +82,8 @@
"page.starred.title": "Lesezeichen",
"page.categories.title": "Kategorien",
"page.categories.no_feed": "Kein Abonnement.",
"page.categories.feeds": "Siehe Abonnements",
"page.categories.entries": "Artikel",
"page.categories.feeds": "Abonnements",
"page.categories.feed_count": [
"Es gibt %d Abonnement.",
"Es gibt %d Abonnements."

View File

@ -82,7 +82,8 @@
"page.starred.title": "Starred",
"page.categories.title": "Categories",
"page.categories.no_feed": "No feed.",
"page.categories.feeds": "See subscriptions",
"page.categories.entries": "Articles",
"page.categories.feeds": "Subscriptions",
"page.categories.feed_count": [
"There is %d feed.",
"There are %d feeds."

View File

@ -82,7 +82,8 @@
"page.starred.title": "Marcadores",
"page.categories.title": "Categorias",
"page.categories.no_feed": "No fuente.",
"page.categories.feeds": "Ver suscripciones",
"page.categories.entries": "Artículos",
"page.categories.feeds": "Suscripciones",
"page.categories.feed_count": [
"Hay %d fuente.",
"Hay %d fuentes."

View File

@ -82,7 +82,8 @@
"page.starred.title": "Favoris",
"page.categories.title": "Catégories",
"page.categories.no_feed": "Aucun abonnement.",
"page.categories.feeds": "Voir les abonnements",
"page.categories.entries": "Articles",
"page.categories.feeds": "Abonnements",
"page.categories.feed_count": [
"Il y a %d abonnement.",
"Il y a %d abonnements."

View File

@ -82,7 +82,8 @@
"page.starred.title": "Preferiti",
"page.categories.title": "Categorie",
"page.categories.no_feed": "Nessun feed.",
"page.categories.feeds": "Vedi abbonamenti",
"page.categories.entries": "Articoli",
"page.categories.feeds": "Abbonamenti",
"page.categories.feed_count": [
"C'è %d feed.",
"Ci sono %d feed."

View File

@ -82,6 +82,7 @@
"page.starred.title": "星付き",
"page.categories.title": "カテゴリ",
"page.categories.no_feed": "フィード無し",
"page.categories.entries": "記事",
"page.categories.feeds": "フィード購読を見る",
"page.categories.feed_count": [
"%d 個の記事があります。",

View File

@ -82,7 +82,8 @@
"page.starred.title": "Favorieten",
"page.categories.title": "Categorieën",
"page.categories.no_feed": "Geen feeds.",
"page.categories.feeds": "Zie abonnementen",
"page.categories.entries": "Lidwoord",
"page.categories.feeds": "Abonnementen",
"page.categories.feed_count": [
"Er is %d feed.",
"Er zijn %d feeds."

View File

@ -82,7 +82,8 @@
"page.starred.title": "Oznaczone gwiazdką",
"page.categories.title": "Kategorie",
"page.categories.no_feed": "Brak kanałów.",
"page.categories.feeds": "Zobacz subskrypcje",
"page.categories.entries": "Artykuły",
"page.categories.feeds": "Subskrypcje",
"page.categories.feed_count": [
"Jest %d kanał.",
"Są %d kanały.",

View File

@ -82,7 +82,8 @@
"page.starred.title": "Избранное",
"page.categories.title": "Категории",
"page.categories.no_feed": "Нет подписок.",
"page.categories.feeds": "Посмотреть подписку",
"page.categories.entries": "Cтатьи",
"page.categories.feeds": "Подписку",
"page.categories.feed_count": [
"Есть %d подписка.",
"Есть %d подписки.",

View File

@ -82,6 +82,7 @@
"page.starred.title": "星标",
"page.categories.title": "分类",
"page.categories.no_feed": "没有源",
"page.categories.entries": "文章",
"page.categories.feeds": "查看订阅",
"page.categories.feed_count": [
"有 %d 个源"

View File

@ -51,12 +51,12 @@ var templateCommonMap = map[string]string{
{{ t "page.feeds.last_check" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
</li>
</ul>
<ul class="item-meta-info">
<ul class="item-meta-icons">
<li>
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ t "menu.refresh_feed" }}</a>
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ template "icon_refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
</li>
<li>
<a href="{{ route "editFeed" "feedID" .ID }}">{{ t "menu.edit_feed" }}</a>
<a href="{{ route "editFeed" "feedID" .ID }}">{{ template "icon_edit" }}<span class="icon-label">{{ t "menu.edit_feed" }}</span></a>
</li>
<li>
<a href="#"
@ -65,7 +65,7 @@ var templateCommonMap = map[string]string{
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "action.remove" }}</a>
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ template "icon_delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
</li>
</ul>
</div>
@ -195,6 +195,37 @@ SOFTWARE.
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
</svg>
{{ end }}
{{ define "icon_edit" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-edit" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M9 7 h-3a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-3" />
<path d="M9 15h3l8.5 -8.5a1.5 1.5 0 0 0 -3 -3l-8.5 8.5v3" />
<line x1="16" y1="5" x2="19" y2="8" />
</svg>
{{ end }}
{{ define "icon_feeds" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folders" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M9 4h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2" />
<path d="M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2" />
</svg>
{{ end }}
{{ define "icon_entries" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-news" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11" />
<line x1="8" y1="8" x2="12" y2="8" />
<line x1="8" y1="12" x2="12" y2="12" />
<line x1="8" y1="16" x2="12" y2="16" />
</svg>
{{ end }}
{{ define "icon_refresh" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -5v5h5" />
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 5v-5h-5" />
</svg>
{{ end }}`,
"item_meta": `{{ define "item_meta" }}
<div class="item-meta">
@ -475,9 +506,9 @@ SOFTWARE.
var templateCommonMapChecksums = map[string]string{
"entry_pagination": "cdca9cf12586e41e5355190b06d9168f57f77b85924d1e63b13524bc15abcbf6",
"feed_list": "46cbfc441404dc55c56a9fd7ddc43d98216762f2562f2a17e35eb508dc84246f",
"feed_list": "4f0bddcc6596aca9f42d2aace7f676ed26a3c6b33a3793e2376d9446d6abe392",
"feed_menu": "318d8662dda5ca9dfc75b909c8461e79c86fb5082df1428f67aaf856f19f4b50",
"icons": "f0d94c2cfa6655b44adaf97f0b95c52a9cff5c31f3a8829ad438e4db7114af7e",
"icons": "3dbe754a98f524a227111191d76b8c6944711b13613cc548ee9e9808fe0bffb4",
"item_meta": "a5b07cc6597e5c8f3ca849ee486acb3f16f062d8a1eaa47d2fb402ae6825b7ef",
"layout": "91d2ab3f683a2ced5e9ce5cd04919e74b3e3f329a5eedcc60015b8d49ecb1b77",
"pagination": "7b61288e86283c4cf0dc83bcbf8bf1c00c7cb29e60201c8c0b633b2450d2911f",

View File

@ -25,10 +25,18 @@
<div class="item-meta">
<ul class="item-meta-info">
<li>
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ t "page.categories.feeds" }}</a>
{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
</li>
</ul>
<ul class="item-meta-icons">
<li>
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ template "icon_entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
</li>
<li>
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "menu.edit_category" }}</a>
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ template "icon_feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
</li>
<li>
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ template "icon_edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
</li>
{{ if eq .FeedCount 0 }}
<li>
@ -38,7 +46,7 @@
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "action.remove" }}</a>
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ template "icon_delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
</li>
{{ end }}
</ul>

View File

@ -26,12 +26,12 @@
{{ t "page.feeds.last_check" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
</li>
</ul>
<ul class="item-meta-info">
<ul class="item-meta-icons">
<li>
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ t "menu.refresh_feed" }}</a>
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ template "icon_refresh" }}<span class="icon-label">{{ t "menu.refresh_feed" }}</span></a>
</li>
<li>
<a href="{{ route "editFeed" "feedID" .ID }}">{{ t "menu.edit_feed" }}</a>
<a href="{{ route "editFeed" "feedID" .ID }}">{{ template "icon_edit" }}<span class="icon-label">{{ t "menu.edit_feed" }}</span></a>
</li>
<li>
<a href="#"
@ -40,7 +40,7 @@
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "action.remove" }}</a>
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ template "icon_delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
</li>
</ul>
</div>

View File

@ -95,4 +95,35 @@ SOFTWARE.
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
</svg>
{{ end }}
{{ define "icon_edit" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-edit" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M9 7 h-3a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-3" />
<path d="M9 15h3l8.5 -8.5a1.5 1.5 0 0 0 -3 -3l-8.5 8.5v3" />
<line x1="16" y1="5" x2="19" y2="8" />
</svg>
{{ end }}
{{ define "icon_feeds" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folders" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M9 4h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2" />
<path d="M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2" />
</svg>
{{ end }}
{{ define "icon_entries" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-news" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11" />
<line x1="8" y1="8" x2="12" y2="8" />
<line x1="8" y1="12" x2="12" y2="12" />
<line x1="8" y1="16" x2="12" y2="16" />
</svg>
{{ end }}
{{ define "icon_refresh" }}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-refresh" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -5v5h5" />
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 5v-5h-5" />
</svg>
{{ end }}

View File

@ -225,10 +225,18 @@ var templateViewsMap = map[string]string{
<div class="item-meta">
<ul class="item-meta-info">
<li>
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ t "page.categories.feeds" }}</a>
{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
</li>
</ul>
<ul class="item-meta-icons">
<li>
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ template "icon_entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
</li>
<li>
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "menu.edit_category" }}</a>
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ template "icon_feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
</li>
<li>
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ template "icon_edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
</li>
{{ if eq .FeedCount 0 }}
<li>
@ -238,7 +246,7 @@ var templateViewsMap = map[string]string{
data-label-yes="{{ t "confirm.yes" }}"
data-label-no="{{ t "confirm.no" }}"
data-label-loading="{{ t "confirm.loading" }}"
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "action.remove" }}</a>
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ template "icon_delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
</li>
{{ end }}
</ul>
@ -1538,7 +1546,7 @@ var templateViewsMapChecksums = map[string]string{
"add_subscription": "0dbea93b6fc07423fa066122ad960c69616b829533371a2dbadec1e22d4f1ae0",
"api_keys": "27d401b31a72881d5232486ba17eb47edaf5246eaedce81de88698c15ebb2284",
"bookmark_entries": "65588da78665699dd3f287f68325e9777d511f1a57fee4131a5bb6d00bb68df8",
"categories": "7a927a2c28ae60c995df9d94220153418d3bd31bf35e0800980a215b1a6a80c7",
"categories": "21d2efb06d8330ab1fd363449c7144ce7191779bafa33d5c0cec63f2c443ec03",
"category_entries": "dee7b9cd60c6c46f01dd4289940679df31c1fce28ce4aa7249fa459023e1eeb4",
"category_feeds": "02b255603dc58122afbbcce573e88d648cad176b9cd0a7bba7e07f95694de75d",
"choose_subscription": "84c9730cadd78e6ee5a6b4c499aab33acddb4324ac01924d33387543eec4d702",

View File

@ -102,7 +102,8 @@ function updateUnreadCounterValue(callback){let counterElements=document.querySe
function isEntry(){return document.querySelector("section.entry")!==null;}
function isListView(){return document.querySelector(".items")!==null;}
function findEntry(element){if(isListView()){if(element){return DomHelper.findParent(element,"item");}else{return document.querySelector(".current-item");}}else{return document.querySelector(".entry");}}
function handleConfirmationMessage(linkElement,callback){linkElement.style.display="none";let containerElement=linkElement.parentNode;let questionElement=document.createElement("span");let yesElement=document.createElement("a");yesElement.href="#";yesElement.appendChild(document.createTextNode(linkElement.dataset.labelYes));yesElement.onclick=(event)=>{event.preventDefault();let loadingElement=document.createElement("span");loadingElement.className="loading";loadingElement.appendChild(document.createTextNode(linkElement.dataset.labelLoading));questionElement.remove();containerElement.appendChild(loadingElement);callback(linkElement.dataset.url,linkElement.dataset.redirectUrl);};let noElement=document.createElement("a");noElement.href="#";noElement.appendChild(document.createTextNode(linkElement.dataset.labelNo));noElement.onclick=(event)=>{event.preventDefault();linkElement.style.display="inline";questionElement.remove();};questionElement.className="confirm";questionElement.appendChild(document.createTextNode(linkElement.dataset.labelQuestion+" "));questionElement.appendChild(yesElement);questionElement.appendChild(document.createTextNode(", "));questionElement.appendChild(noElement);containerElement.appendChild(questionElement);}
function handleConfirmationMessage(linkElement,callback){if(linkElement.tagName!='A'){linkElement=linkElement.parentNode;}
linkElement.style.display="none";let containerElement=linkElement.parentNode;let questionElement=document.createElement("span");let yesElement=document.createElement("a");yesElement.href="#";yesElement.appendChild(document.createTextNode(linkElement.dataset.labelYes));yesElement.onclick=(event)=>{event.preventDefault();let loadingElement=document.createElement("span");loadingElement.className="loading";loadingElement.appendChild(document.createTextNode(linkElement.dataset.labelLoading));questionElement.remove();containerElement.appendChild(loadingElement);callback(linkElement.dataset.url,linkElement.dataset.redirectUrl);};let noElement=document.createElement("a");noElement.href="#";noElement.appendChild(document.createTextNode(linkElement.dataset.labelNo));noElement.onclick=(event)=>{event.preventDefault();linkElement.style.display="inline";questionElement.remove();};questionElement.className="confirm";questionElement.appendChild(document.createTextNode(linkElement.dataset.labelQuestion+" "));questionElement.appendChild(yesElement);questionElement.appendChild(document.createTextNode(", "));questionElement.appendChild(noElement);containerElement.appendChild(questionElement);}
function toast(msg){if(!msg)return;document.querySelector('.toast-wrap .toast-msg').innerHTML=msg;let toastWrapper=document.querySelector('.toast-wrap');toastWrapper.classList.remove('toastAnimate');setTimeout(function(){toastWrapper.classList.add('toastAnimate');},100);}
document.addEventListener("DOMContentLoaded",function(){handleSubmitButtons();if(!document.querySelector("body[data-disable-keyboard-shortcuts=true]")){let keyboardHandler=new KeyboardHandler();keyboardHandler.on("g u",()=>goToPage("unread"));keyboardHandler.on("g b",()=>goToPage("starred"));keyboardHandler.on("g h",()=>goToPage("history"));keyboardHandler.on("g f",()=>goToFeedOrFeeds());keyboardHandler.on("g c",()=>goToPage("categories"));keyboardHandler.on("g s",()=>goToPage("settings"));keyboardHandler.on("ArrowLeft",()=>goToPrevious());keyboardHandler.on("ArrowRight",()=>goToNext());keyboardHandler.on("k",()=>goToPrevious());keyboardHandler.on("p",()=>goToPrevious());keyboardHandler.on("j",()=>goToNext());keyboardHandler.on("n",()=>goToNext());keyboardHandler.on("h",()=>goToPage("previous"));keyboardHandler.on("l",()=>goToPage("next"));keyboardHandler.on("o",()=>openSelectedItem());keyboardHandler.on("v",()=>openOriginalLink());keyboardHandler.on("V",()=>openOriginalLink(true));keyboardHandler.on("c",()=>openCommentLink());keyboardHandler.on("C",()=>openCommentLink(true));keyboardHandler.on("m",()=>handleEntryStatus());keyboardHandler.on("A",()=>markPageAsRead());keyboardHandler.on("s",()=>handleSaveEntry());keyboardHandler.on("d",()=>handleFetchOriginalContent());keyboardHandler.on("f",()=>handleBookmark());keyboardHandler.on("R",()=>handleRefreshAllFeeds());keyboardHandler.on("?",()=>showKeyboardShortcuts());keyboardHandler.on("#",()=>unsubscribeFromFeed());keyboardHandler.on("/",(e)=>setFocusToSearchInput(e));keyboardHandler.on("Escape",()=>ModalHandler.close());keyboardHandler.listen();}
let touchHandler=new TouchHandler();touchHandler.listen();onClick("a[data-save-entry]",(event)=>handleSaveEntry(event.target));onClick("a[data-toggle-bookmark]",(event)=>handleBookmark(event.target));onClick("a[data-fetch-content-entry]",()=>handleFetchOriginalContent());onClick("a[data-action=search]",(event)=>setFocusToSearchInput(event));onClick("a[data-action=markPageAsRead]",()=>handleConfirmationMessage(event.target,()=>markPageAsRead()));onClick("a[data-toggle-status]",(event)=>handleEntryStatus(event.target));onClick("a[data-confirm]",(event)=>handleConfirmationMessage(event.target,(url,redirectURL)=>{let request=new RequestBuilder(url);request.withCallback(()=>{if(redirectURL){window.location.href=redirectURL;}else{window.location.reload();}});request.execute();}));if(document.documentElement.clientWidth<600){onClick(".logo",()=>toggleMainMenu());onClick(".header nav li",(event)=>onClickMainMenuListItem(event));}
@ -112,6 +113,6 @@ window.addEventListener('beforeinstallprompt',(e)=>{e.preventDefault();let defer
}
var JavascriptsChecksums = map[string]string{
"app": "5b7b79ccbdaa1820052f5cf45f7dc92c58cb6362dffb01f8428db9bb82fa705b",
"app": "5864dcd8484f63af813bde20f3e4db46383e4627ce6f5ae3aa5d56c0572a11b7",
"sw": "55fffa223919cc18572788fb9c62fccf92166c0eb5d3a1d6f91c31f24d020be9",
}

View File

@ -517,8 +517,12 @@ function findEntry(element) {
}
function handleConfirmationMessage(linkElement, callback) {
linkElement.style.display = "none";
if (linkElement.tagName != 'A') {
linkElement = linkElement.parentNode;
}
linkElement.style.display = "none";
let containerElement = linkElement.parentNode;
let questionElement = document.createElement("span");