diff --git a/public/s/js/comments.js b/public/s/js/comments.js index 606775f..cecf51a 100644 --- a/public/s/js/comments.js +++ b/public/s/js/comments.js @@ -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) { diff --git a/src/inc/routeinc/f0cklib.mjs b/src/inc/routeinc/f0cklib.mjs index d5170f4..9f717ed 100644 --- a/src/inc/routeinc/f0cklib.mjs +++ b/src/inc/routeinc/f0cklib.mjs @@ -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: { diff --git a/views/item-partial.html b/views/item-partial.html index 706039b..10e4d9f 100644 --- a/views/item-partial.html +++ b/views/item-partial.html @@ -125,4 +125,5 @@ @endif -
\ No newline at end of file +
\ No newline at end of file