feat: implement dark mode toggle and enhance chat UI with timestamps

This commit is contained in:
2026-04-29 23:35:40 +02:00
parent 68a895c642
commit e5c5927c54
7 changed files with 276 additions and 214 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import {
LoginResponse,
RegisterResponse,
SendMessageResponse,
Message,
} from "./types.js";
export class APIService {
@@ -77,8 +78,8 @@ export class APIService {
async getConversation( token: string, user1Id: string, user2Id:string ): Promise<Message[]> {
const url = new URL( `${APIService.baseUrl}/get_conversation.php` );
url.searchParams.set( "token", token );
url.searchParams.set( "token", user1Id );
url.searchParams.set( "conversation_id", user2Id );
url.searchParams.set( "user1_id", user1Id );
url.searchParams.set( "user2_id", user2Id );
const response = await fetch( url, {method: "GET"} );;
if ( !response.ok ) {