mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add new attribute for publish date in com. threads
This commit is contained in:
parent
debff6dae9
commit
1b3319942e
2 changed files with 5 additions and 5 deletions
|
@ -364,7 +364,7 @@ private module Parsers
|
||||||
comments = item_contents.dig?("actionButtons", "commentActionButtonsRenderer",
|
comments = item_contents.dig?("actionButtons", "commentActionButtonsRenderer",
|
||||||
"replyButton", "buttonRenderer", "text", "simpleText").try { |t| short_text_to_number(t.as_s) } || 0
|
"replyButton", "buttonRenderer", "text", "simpleText").try { |t| short_text_to_number(t.as_s) } || 0
|
||||||
|
|
||||||
published = item_contents["publishedTimeText"]?.try &.["simpleText"]?.try { |t| decode_date(t.as_s) } || Time.local
|
published = item_contents["publishedTimeText"]["runs"][0]["text"].try { |t| decode_date(t.as_s) } || Time.local
|
||||||
|
|
||||||
YouTubeStructs::CommunityPost.new({
|
YouTubeStructs::CommunityPost.new({
|
||||||
author: author_name,
|
author: author_name,
|
||||||
|
|
|
@ -75,8 +75,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pure-u-20-24 pure-u-md-22-24">
|
<div class="pure-u-20-24 pure-u-md-22-24">
|
||||||
<p><b><a href=<%="/channel/#{thread.author_id}"%>><%= thread.author %></a></p></b>
|
<p dir="auto"><b><a href=<%="/channel/#{thread.author_id}"%>><%= thread.author %></a></p></b>
|
||||||
<p> <%= thread.content_html -%> </p>
|
<p dir="auto"> <%= thread.content_html -%> </p>
|
||||||
<% # Handles attachments: %>
|
<% # Handles attachments: %>
|
||||||
<% attachment = thread.attachment %>
|
<% attachment = thread.attachment %>
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
|
@ -91,11 +91,11 @@
|
||||||
<img style="width: 90%" src="/ggpht<%= URI.parse(attachment).request_target%>"/>
|
<img style="width: 90%" src="/ggpht<%= URI.parse(attachment).request_target%>"/>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-g pure-u-1"></div>
|
|
||||||
<div class="pure-menu pure-menu-horizontal">
|
<div class="pure-menu pure-menu-horizontal">
|
||||||
<ul class="pure-menu-list">
|
<ul class="pure-menu-list">
|
||||||
<li class="pure-menu-item" id="likes" style="margin-right: 15px;"><i class="icon ion-ios-thumbs-up" style="margin-right: 5px;"></i><%= thread.likes %></li>
|
<li class="pure-menu-item" id="likes" style="margin-right: 15px;"><i class="icon ion-ios-thumbs-up" style="margin-right: 5px;"></i><%= thread.likes %></li>
|
||||||
<li class="pure-menu-item" id="comments"><i class="icon ion-ios-chatbubbles" style="margin-right: 5px;"></i><%= thread.comments %></li>
|
<li class="pure-menu-item" id="comments" style="margin-right: 15px;"><i class="icon ion-ios-chatbubbles" style="margin-right: 5px;"></i><%= thread.comments %></li>
|
||||||
|
<li class="pure-menu-item" id="date" dir="auto"><p style="vertical-align: sub;"><b><%= translate(locale, "Shared `x` ago", recode_date(thread.published, locale)) %></b></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue