better UX and UI on the room page

This commit is contained in:
2026-01-05 00:00:12 +01:00
parent 6e51bf8568
commit 5cf034200e
13 changed files with 1984 additions and 2341 deletions

View File

@@ -10,6 +10,15 @@ interface RoomUser {
userId?: number;
}
interface SourceContext {
animeId: string;
episode: string | number;
source: string;
extension: string;
server: string;
category: string;
}
export interface QueueItem {
uid: string;
metadata: RoomMetadata;
@@ -23,6 +32,7 @@ interface RoomMetadata {
episode: number;
image?: string;
source?: string;
malId?: number;
}
interface RoomData {
@@ -38,6 +48,7 @@ interface RoomData {
videoData?: any;
currentTime: number;
isPlaying: boolean;
context?: SourceContext;
} | null;
password?: string;
metadata?: RoomMetadata | null;
@@ -168,7 +179,10 @@ export function updateRoomVideo(roomId: string, videoData: any): boolean {
const room = rooms.get(roomId);
if (!room) return false;
room.currentVideo = videoData;
room.currentVideo = {
...room.currentVideo,
...videoData
};
return true;
}