feat: Add custom emojis, pinned comments, and comment thread locking functionality.

This commit is contained in:
x
2026-01-25 14:40:39 +01:00
parent 8e1a377cb8
commit 68011c60de
3 changed files with 6 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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: {

View File

@@ -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>