v3: added comment likes, added votes/likes list view, added db migrations mechanism, updated project dependencies
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 42s

This commit is contained in:
khannurien
2026-06-21 14:17:56 +00:00
parent 888aae45cf
commit 7afb5d3f07
25 changed files with 1475 additions and 840 deletions

View File

@@ -255,6 +255,7 @@ export interface Comment {
createdAt: Date;
updatedAt?: Date;
deleted: boolean;
likeCount: number;
authorUsername: string;
authorAvatarMime?: string;
}
@@ -469,11 +470,23 @@ export interface VoteRemoveMessage {
dumpId: string;
}
export interface CommentLikeCastMessage {
type: "comment_like_cast";
commentId: string;
}
export interface CommentLikeRemoveMessage {
type: "comment_like_remove";
commentId: string;
}
export type ClientToServerMessage =
| PingMessage
| PongMessage
| VoteCastMessage
| VoteRemoveMessage;
| VoteRemoveMessage
| CommentLikeCastMessage
| CommentLikeRemoveMessage;
// ── Server → Client ──────────────────────────────────────────────────────────
@@ -488,6 +501,7 @@ export interface WelcomeMessage {
type: "welcome";
users: OnlineUser[];
myVotes: string[];
myCommentLikes: string[];
unreadNotificationCount: number;
}
@@ -511,6 +525,21 @@ export interface VoteAckMessage {
voteCount: number;
}
export interface CommentLikesUpdateMessage {
type: "comment_likes_update";
commentId: string;
likeCount: number;
likerId: string;
action: "cast" | "remove";
}
export interface CommentLikeAckMessage {
type: "comment_like_ack";
commentId: string;
action: "cast" | "remove";
likeCount: number;
}
export interface DumpCreatedMessage {
type: "dump_created";
dump: Dump;
@@ -589,6 +618,8 @@ export type ServerToClientMessage =
| PresenceUpdateMessage
| VotesUpdateMessage
| VoteAckMessage
| CommentLikesUpdateMessage
| CommentLikeAckMessage
| DumpCreatedMessage
| DumpUpdatedMessage
| DumpDeletedMessage
@@ -624,7 +655,8 @@ export type NotificationType =
| "playlist_dump_added"
| "dump_upvoted"
| "user_mentioned"
| "dump_commented";
| "dump_commented"
| "comment_liked";
export interface PlaylistFollowedData {
followerId: string;
@@ -676,6 +708,14 @@ export interface DumpCommentedData {
dumpTitle: string;
}
export interface CommentLikedData {
likerId: string;
likerUsername: string;
commentId: string;
dumpId: string;
dumpTitle: string;
}
export type NotificationData =
| PlaylistFollowedData
| UserFollowedData
@@ -683,7 +723,8 @@ export type NotificationData =
| PlaylistDumpAddedData
| DumpUpvotedData
| UserMentionedData
| DumpCommentedData;
| DumpCommentedData
| CommentLikedData;
export interface Notification {
id: string;