Skip to content

Commit

Permalink
Закреплённые комменты ломали CommentScrollArrow
Browse files Browse the repository at this point in the history
  • Loading branch information
trin4ik committed Nov 14, 2024
1 parent d004535 commit cbbfc40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
22 changes: 12 additions & 10 deletions frontend/html/comments/types/bold.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% load text_filters %}
{% load posts %}
{% load comments %}
<div id="comment-{{ comment.id }}">
<div class="block comment comment-layout-block {% if comment.metadata.badges %}comment-is-badged{% endif %}">
<div class="block-comments-list">
<div class="block {% if comment.created_at > post_last_view_at %}comment-is-new{% endif %} comment comment-layout-block {% if comment.metadata.badges %}comment-is-badged{% endif %}" id="comment-{{ comment.id }}">
<div class="comment-side">
<a class="avatar comment-side-avatar" href="{% url "profile" comment.author.slug %}">
<img src="{{ comment.author.get_avatar }}" alt="Аватар {{ comment.author.full_name }}" loading="lazy" />
Expand Down Expand Up @@ -96,12 +96,14 @@
</div>
</div>

{% if replies %}
<div class="replies replies-indent-normal">
{% for reply_tree in replies %}
{% include "comments/types/reply.html" with comment=reply_tree.comment reply_to=reply_tree.comment replies=reply_tree.replies %}
{% endfor %}
</div>
<div class="clearfix20"></div>
{% endif %}
<div class="comment-replies thread-collapse-toggle">
{% if replies %}
<div class="replies replies-indent-normal">
{% for reply_tree in replies %}
{% include "comments/types/reply.html" with comment=reply_tree.comment reply_to=reply_tree.comment replies=reply_tree.replies %}
{% endfor %}
</div>
<div class="clearfix20"></div>
{% endif %}
</div>
</div>
4 changes: 4 additions & 0 deletions frontend/static/js/components/CommentScrollArrow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export default {
".battle-comments-list .comment-replies > .replies > .reply.comment-is-new",
// Новые реплаи на втором уровне бэтлов
".battle-comments-list .comment-replies > .replies > .reply:not(.comment-is-new) > .reply-replies >.replies > .reply.comment-is-new",
// Новые реплаи к запиненым комментам (bold)
".block-comments-list .comment-replies > .replies > .reply.comment-is-new",
// Новые реплаи на втором уровне запиненных комментов (bold)
".block-comments-list .comment-replies > .replies > .reply:not(.comment-is-new) > .reply-replies >.replies > .reply.comment-is-new",
].join()
);
Expand Down

0 comments on commit cbbfc40

Please sign in to comment.