Watch: display comment count and whether comments are disabled
This commit is contained in:
parent
d2ba9be7a7
commit
4b6efb0e0b
@ -154,6 +154,11 @@
|
|||||||
grid-row: 3;
|
grid-row: 3;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
}
|
}
|
||||||
|
.comments-disabled{
|
||||||
|
background-color: var(--interface-color);
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
.comments-area-inner{
|
.comments-area-inner{
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
@ -324,13 +329,17 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if comments_mode != 0 %}
|
{% if comments_mode != 0 %}
|
||||||
<details class="comments-area-outer" {{'open' if comments_mode == 1 else ''}}>
|
{% if comments_disabled %}
|
||||||
<summary>Comments</summary>
|
<div class="comments-area-outer comments-disabled">Comments disabled</div>
|
||||||
<section class="comments-area-inner comments-area">
|
{% else %}
|
||||||
{% if comments_info %}
|
<details class="comments-area-outer" {{'open' if comments_mode == 1 else ''}}>
|
||||||
{{ comments.video_comments(comments_info) }}
|
<summary>{{ comment_count|commatize }} comment{{'s' if comment_count != 1 else ''}}</summary>
|
||||||
{% endif %}
|
<section class="comments-area-inner comments-area">
|
||||||
</section>
|
{% if comments_info %}
|
||||||
</details>
|
{{ comments.video_comments(comments_info) }}
|
||||||
|
{% endif %}
|
||||||
|
</section>
|
||||||
|
</details>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock main %}
|
{% endblock main %}
|
||||||
|
@ -347,6 +347,8 @@ def get_watch_page(video_id=None):
|
|||||||
music_list = info['music_list'],
|
music_list = info['music_list'],
|
||||||
music_attributes = get_ordered_music_list_attributes(info['music_list']),
|
music_attributes = get_ordered_music_list_attributes(info['music_list']),
|
||||||
comments_info = comments_info,
|
comments_info = comments_info,
|
||||||
|
comment_count = info['comment_count'],
|
||||||
|
comments_disabled = info['comments_disabled'],
|
||||||
|
|
||||||
theater_mode = settings.theater_mode,
|
theater_mode = settings.theater_mode,
|
||||||
related_videos_mode = settings.related_videos_mode,
|
related_videos_mode = settings.related_videos_mode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user