feat: Implement fade-in effect for comments and add database schema for custom emojis, pinned comments, and comment thread locking.

This commit is contained in:
x
2026-01-25 14:20:59 +01:00
parent 73408403f2
commit 624e9d5b6b

View File

@@ -55,7 +55,12 @@ class CommentSystem {
return;
}
if (!scrollToId) this.container.innerHTML = '<div class="loading">Loading comments...</div>';
// Initialize with opacity 0 for fade-in
if (!scrollToId) {
this.container.innerHTML = '';
this.container.style.opacity = '0';
this.container.style.transition = 'opacity 0.5s ease';
}
try {
const res = await fetch(`/api/comments/${this.itemId}?sort=${this.sort}`);
@@ -72,6 +77,11 @@ class CommentSystem {
this.isLocked = data.is_locked || false;
this.render(data.comments, data.user_id, data.is_subscribed);
// Trigger fade-in
requestAnimationFrame(() => {
this.container.style.opacity = '1';
});
// Priority: Explicit ID > Hash
if (scrollToId) {
this.scrollToComment(scrollToId);