feat: Add custom emojis, pinned comments, and comment thread locking functionality.
This commit is contained in:
@@ -3,6 +3,8 @@ class CommentSystem {
|
||||
this.container = document.getElementById('comments-container');
|
||||
this.itemId = this.container ? this.container.dataset.itemId : null;
|
||||
this.user = this.container ? this.container.dataset.user : null; // logged in user?
|
||||
this.isAdmin = this.container ? this.container.dataset.isAdmin === 'true' : false;
|
||||
this.isLocked = this.container ? this.container.dataset.isLocked === 'true' : false;
|
||||
this.sort = 'new';
|
||||
|
||||
if (this.itemId) {
|
||||
|
||||
@@ -192,7 +192,8 @@ export default {
|
||||
timefull: new Date(actitem.stamp * 1e3).toISOString()
|
||||
},
|
||||
favorites: favorites,
|
||||
tags: tags
|
||||
tags: tags,
|
||||
is_comments_locked: actitem.is_comments_locked || false
|
||||
},
|
||||
title: `${actitem.id} - ${cfg.websrv.domain}`,
|
||||
pagination: {
|
||||
|
||||
@@ -125,4 +125,5 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div id="comments-container" data-item-id="{{ item.id }}" @if(session)data-user="{{ session.user }}" @endif></div>
|
||||
<div id="comments-container" data-item-id="{{ item.id }}" @if(session)data-user="{{ session.user }}"
|
||||
@if(session.admin)data-is-admin="true" @endif @endif @if(item.is_comments_locked)data-is-locked="true" @endif></div>
|
||||
Reference in New Issue
Block a user