mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
Fix displayed comment counter for first comment in protocol steps and results [SCI-9573] (#7013)
This commit is contained in:
parent
05db30285b
commit
5bc542e834
3 changed files with 3 additions and 2 deletions
|
@ -31,6 +31,7 @@ var CommentsSidebar = (function() {
|
|||
// Replace the number in comment element
|
||||
commentsCounter.text(commentsCounter.text().replace(/[\d\\+]+/g, commentsAmount));
|
||||
commentsCounter.removeClass('hidden');
|
||||
commentsCounter.css('display', 'flex');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
@click="openCommentsSidebar"
|
||||
:data-object-id="step.id">
|
||||
<i class="sn-icon sn-icon-comments"></i>
|
||||
<span class="comments-counter" v-if="step.attributes.comments_count"
|
||||
<span class="comments-counter" v-show="step.attributes.comments_count"
|
||||
:id="`comment-count-${step.id}`"
|
||||
:class="{'unseen': step.attributes.unseen_comments}"
|
||||
>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
data-object-type="Result"
|
||||
:data-object-id="result.id">
|
||||
<i class="sn-icon sn-icon-comments"></i>
|
||||
<span class="comments-counter" v-if="result.attributes.comments_count"
|
||||
<span class="comments-counter" v-show="result.attributes.comments_count"
|
||||
:id="`comment-count-${result.id}`">
|
||||
{{ result.attributes.comments_count }}
|
||||
</span>
|
||||
|
|
Loading…
Reference in a new issue