Browse Source

normalize archived articles output in headlines

Andrew Dolgov 1 year ago
parent
commit
e9cf8e8e35
4 changed files with 19 additions and 9 deletions
  1. 12 9
      classes/feeds.php
  2. 3 0
      css/default.css
  3. 0 0
      css/default.css.map
  4. 4 0
      css/tt-rss.less

+ 12 - 9
classes/feeds.php

@@ -259,6 +259,12 @@ class Feeds extends Handler_Protected {
 				$label_cache = $line["label_cache"];
 				$labels = false;
 
+				// normalize archived feed
+				if ($feed_id === null) {
+					$feed_id = 0;
+					$line["feed_title"] = __("Archived articles");
+				}
+
 				$mouseover_attrs = "onmouseover='Article.mouseIn($id)' onmouseout='Article.mouseOut($id)'";
 
 				if ($label_cache) {
@@ -315,7 +321,7 @@ class Feeds extends Handler_Protected {
 				if (feeds::feedHasIcon($feed_id)) {
 					$feed_icon_img = "<img class=\"icon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">";
 				} else {
-					$feed_icon_img = "<i class='icon-syndicate material-icons'>rss_feed</i>";
+					$feed_icon_img = "<i class='icon-no-feed material-icons'>rss_feed</i>";
 				}
 
 				$entry_site_url = $line["site_url"];
@@ -334,7 +340,7 @@ class Feeds extends Handler_Protected {
 				if (!get_pref('COMBINED_DISPLAY_MODE')) {
 
 					if ($vfeed_group_enabled) {
-						if ($feed_id != $vgroup_last_feed && $line["feed_title"]) {
+						if ($feed_id != $vgroup_last_feed) {
 
 							$vgroup_last_feed = $feed_id;
 
@@ -345,8 +351,6 @@ class Feeds extends Handler_Protected {
 								"<a class='title' href=\"#\" onclick=\"Feeds.open({feed:$feed_id})\">".
 								$line["feed_title"]."</a>
                             $vf_catchup_link</div>";
-
-
 						}
 					}
 
@@ -399,8 +403,7 @@ class Feeds extends Handler_Protected {
 
 					$reply['content'] .= $score_pic;
 
-					if ($line["feed_title"] && !$vfeed_group_enabled) {
-
+					if (!$vfeed_group_enabled) {
 						$reply['content'] .= "<span onclick=\"Feeds.open({feed:$feed_id})\"
                         style=\"cursor : pointer\"
                         title=\"".htmlspecialchars($line['feed_title'])."\">
@@ -475,8 +478,8 @@ class Feeds extends Handler_Protected {
 					$tmp_content .= "<span
                     onclick=\"return Headlines.click(event, $id);\"
                     data-article-id=\"$id\"
-                    class=\"titleWrap hlMenuAttach $hlc_suffix\">
-                    <a class=\"title $hlc_suffix\"
+                    class=\"titleWrap hlMenuAttach\">
+                    <a class=\"title\"
                     title=\"".htmlspecialchars($line["title"])."\"
                     target=\"_blank\" rel=\"noopener noreferrer\" href=\"".
 						htmlspecialchars($line["link"])."\">".
@@ -514,7 +517,7 @@ class Feeds extends Handler_Protected {
 					$tmp_content .= "<div class='right'>";
 					$tmp_content .= "$score_pic";
 
-					if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) {
+					if (!get_pref("VFEED_GROUP_BY_FEED")) {
 						$tmp_content .= "<span style=\"cursor : pointer\"
                         title=\"".htmlspecialchars($line["feed_title"])."\"
                         onclick=\"Feeds.open({feed:$feed_id})\">$feed_icon_img</span>";

+ 3 - 0
css/default.css

@@ -998,6 +998,9 @@ body.ttrss_main i.icon-syndicate {
   border: 1px solid #ff7c4b;
   border-radius: 4px;
 }
+body.ttrss_main i.icon-no-feed {
+  opacity: 0.2;
+}
 body.ttrss_main .cdm.marked .left i.marked-pic,
 body.ttrss_main .hl.marked .left i.marked-pic {
   color: #ffc069;

File diff suppressed because it is too large
+ 0 - 0
css/default.css.map


+ 4 - 0
css/tt-rss.less

@@ -1180,6 +1180,10 @@ body.ttrss_main {
 		border-radius : 4px;
 	}
 
+	i.icon-no-feed {
+		opacity : 0.2;
+	}
+
 	.cdm.marked .left i.marked-pic,
 	.hl.marked .left i.marked-pic {
 		color : @color-marked;

Some files were not shown because too many files changed in this diff