mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +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",
|
||||
"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({
|
||||
author: author_name,
|
||||
|
|
|
@ -75,8 +75,8 @@
|
|||
</div>
|
||||
|
||||
<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> <%= thread.content_html -%> </p>
|
||||
<p dir="auto"><b><a href=<%="/channel/#{thread.author_id}"%>><%= thread.author %></a></p></b>
|
||||
<p dir="auto"> <%= thread.content_html -%> </p>
|
||||
<% # Handles attachments: %>
|
||||
<% attachment = thread.attachment %>
|
||||
<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%>"/>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pure-g pure-u-1"></div>
|
||||
<div class="pure-menu pure-menu-horizontal">
|
||||
<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="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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue