v2: global player, infinite scroll, image picker, threaded comments

This commit is contained in:
khannurien
2026-03-21 13:55:22 +00:00
parent be426eb150
commit 7c098e7c4c
48 changed files with 4346 additions and 711 deletions

View File

@@ -1,3 +1,9 @@
export interface PaginatedData<T> {
items: T[];
total: number;
hasMore: boolean;
}
/**
* Backend
*/
@@ -10,6 +16,7 @@ export interface RichContent {
description?: string;
thumbnailUrl?: string;
videoId?: string;
embedUrl?: string;
}
export interface Dump {
@@ -25,6 +32,8 @@ export interface Dump {
fileMime?: string;
fileSize?: number;
voteCount: number;
commentCount: number;
isPrivate: boolean;
}
/**
@@ -95,6 +104,28 @@ export interface AuthResponse {
user: User;
}
/**
* Comments
*/
export interface Comment {
id: string;
dumpId: string;
userId: string;
parentId?: string;
body: string;
createdAt: Date;
deleted: boolean;
authorUsername: string;
authorAvatarMime?: string;
}
export type RawComment = WithStringDate<Comment>;
export function deserializeComment(raw: RawComment): Comment {
return { ...raw, createdAt: new Date(raw.createdAt) };
}
/**
* Playlists
*/
@@ -200,11 +231,13 @@ export type APIResponse<T> = APISuccess<T> | APIFailure;
export interface CreateUrlDumpRequest {
url: string;
comment?: string;
isPrivate?: boolean;
}
export interface UpdateDumpRequest {
url?: string;
comment?: string;
isPrivate?: boolean;
}
/**