Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions components/lenta/templates/stars.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
<% if(Number(share.scnt)) {%> <div class="countusers"><i class="far fa-user"></i><span class="c"><%-Number(share.scnt)%></span></div> <% } %>
<% } %>
</div>

<% if(videoMeta?.viewers) {%>
<div elementsid="viewdetails" class="count">
<div class="countusers"><i class="far fa-eye"></i><span class="c"><%-Number(videoMeta.viewers)%></span></div>
</div>
<% } %>

<% } %>

Expand Down
12 changes: 10 additions & 2 deletions components/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1145,11 +1145,15 @@ var post = (function () {
var renders = {
comments: function (clbk) {
if ((!ed.repost || ed.fromempty) && ed.comments != 'no') {
if (!share.settings.c) {
const
meta = window.parseVideo(share.url),
state = _.clone(window.peertubeglobalcache[meta?.id]);

if (!state?.isLive || !share.settings.c) {
self.fastTemplate(
'commentspreview',
function (rendered) {
var _el = el.c.find('.commentsWrapper');
var _el = el.c.find('.commentsWrapper').addClass('commentsVisible');

var rf = '';

Expand Down Expand Up @@ -1616,6 +1620,9 @@ var post = (function () {
}
},
stars: function (clbk) {
const
meta = window.parseVideo(share.url),
state = _.clone(window.peertubeglobalcache[meta?.id]);

self.shell(
{
Expand All @@ -1624,6 +1631,7 @@ var post = (function () {
el: el.stars,
data: {
share: share,
videoMeta: state
},
ignorelinksandimages : true,
animation : false,
Expand Down