Show feeds with errors first
This commit is contained in:
parent
5a721e694b
commit
a475b875c5
6 changed files with 47 additions and 16 deletions
File diff suppressed because one or more lines are too long
|
@ -172,6 +172,15 @@ input[type="text"]:focus {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Feeds list */
|
||||||
|
article.feed-parsing-error {
|
||||||
|
background-color: #343434;
|
||||||
|
}
|
||||||
|
|
||||||
|
.parsing-error {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
/* Entry view */
|
/* Entry view */
|
||||||
.entry header {
|
.entry header {
|
||||||
border-color: #333;
|
border-color: #333;
|
||||||
|
|
|
@ -485,6 +485,22 @@ a.button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Feeds list */
|
||||||
|
article.feed-parsing-error {
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
border-color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.parsing-error {
|
||||||
|
font-size: 0.85em;
|
||||||
|
margin-top: 2px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.parsing-error-count {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
/* Entry view */
|
/* Entry view */
|
||||||
.entry header {
|
.entry header {
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .feeds }}
|
{{ range .feeds }}
|
||||||
<article class="item">
|
<article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
|
||||||
<div class="item-header">
|
<div class="item-header">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if .Icon }}
|
{{ if .Icon }}
|
||||||
|
@ -44,9 +44,6 @@
|
||||||
<li>
|
<li>
|
||||||
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed .CheckedAt }}</time>
|
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed .CheckedAt }}</time>
|
||||||
</li>
|
</li>
|
||||||
{{ if ne .ParsingErrorCount 0 }}
|
|
||||||
<li><strong title="{{ .ParsingErrorMsg }}">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong></li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
@ -66,6 +63,12 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{{ if ne .ParsingErrorCount 0 }}
|
||||||
|
<div class="parsing-error">
|
||||||
|
<strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong>
|
||||||
|
<small class="parsing-error-message">({{ .ParsingErrorMsg }})</small>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by go generate; DO NOT EDIT.
|
// Code generated by go generate; DO NOT EDIT.
|
||||||
// 2017-12-24 14:32:38.873134292 -0800 PST m=+0.030159187
|
// 2017-12-26 20:38:06.293140899 -0800 PST m=+0.021474553
|
||||||
|
|
||||||
package template
|
package template
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ var templateViewsMap = map[string]string{
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="items">
|
<div class="items">
|
||||||
{{ range .feeds }}
|
{{ range .feeds }}
|
||||||
<article class="item">
|
<article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
|
||||||
<div class="item-header">
|
<div class="item-header">
|
||||||
<span class="item-title">
|
<span class="item-title">
|
||||||
{{ if .Icon }}
|
{{ if .Icon }}
|
||||||
|
@ -716,9 +716,6 @@ var templateViewsMap = map[string]string{
|
||||||
<li>
|
<li>
|
||||||
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed .CheckedAt }}</time>
|
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed .CheckedAt }}</time>
|
||||||
</li>
|
</li>
|
||||||
{{ if ne .ParsingErrorCount 0 }}
|
|
||||||
<li><strong title="{{ .ParsingErrorMsg }}">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong></li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
@ -738,6 +735,12 @@ var templateViewsMap = map[string]string{
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{{ if ne .ParsingErrorCount 0 }}
|
||||||
|
<div class="parsing-error">
|
||||||
|
<strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong>
|
||||||
|
<small class="parsing-error-message">({{ .ParsingErrorMsg }})</small>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1332,7 +1335,7 @@ var templateViewsMapChecksums = map[string]string{
|
||||||
"edit_user": "82d9749d76ddbd2352816d813c4b1f6d92f2222de678b4afe5821090246735c7",
|
"edit_user": "82d9749d76ddbd2352816d813c4b1f6d92f2222de678b4afe5821090246735c7",
|
||||||
"entry": "6b4405e0c8e4a7d31874659f8835f4e43e01dc3c20686091517ac750196dd70f",
|
"entry": "6b4405e0c8e4a7d31874659f8835f4e43e01dc3c20686091517ac750196dd70f",
|
||||||
"feed_entries": "ac93cb9a90f93ddd9dd8a67d7e160592ecb9f5e465ee9679bb14eecd8d4caf20",
|
"feed_entries": "ac93cb9a90f93ddd9dd8a67d7e160592ecb9f5e465ee9679bb14eecd8d4caf20",
|
||||||
"feeds": "2f04664f9daf1ea0259bccd7d5ab4c0917d3208f1dcdc89620ffa9fa3094efd2",
|
"feeds": "2a3951bfbb08e9f825ab4a018344e8ef8461a09efaf86ac9da3c99d6f3b2a2de",
|
||||||
"history": "abc7ea29f7d54f28f73fe14979bbd03dbc41fa6a7c86f95f56d6e94f7b09b9ba",
|
"history": "abc7ea29f7d54f28f73fe14979bbd03dbc41fa6a7c86f95f56d6e94f7b09b9ba",
|
||||||
"import": "73b5112e20bfd232bf73334544186ea419505936bc237d481517a8622901878f",
|
"import": "73b5112e20bfd232bf73334544186ea419505936bc237d481517a8622901878f",
|
||||||
"integrations": "3c14d7de904911aad7f3ebec6d1a20b50843287f58125c526e167f429f3d455d",
|
"integrations": "3c14d7de904911aad7f3ebec6d1a20b50843287f58125c526e167f429f3d455d",
|
||||||
|
|
|
@ -60,7 +60,7 @@ func (s *Storage) Feeds(userID int64) (model.Feeds, error) {
|
||||||
LEFT JOIN categories c ON c.id=f.category_id
|
LEFT JOIN categories c ON c.id=f.category_id
|
||||||
LEFT JOIN feed_icons fi ON fi.feed_id=f.id
|
LEFT JOIN feed_icons fi ON fi.feed_id=f.id
|
||||||
WHERE f.user_id=$1
|
WHERE f.user_id=$1
|
||||||
ORDER BY f.id ASC`
|
ORDER BY f.parsing_error_count DESC, f.title ASC`
|
||||||
|
|
||||||
rows, err := s.db.Query(query, userID)
|
rows, err := s.db.Query(query, userID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue