diff --git a/src/lib/components/Message.svelte b/src/lib/components/Message.svelte index d8a98d6..ab70326 100644 --- a/src/lib/components/Message.svelte +++ b/src/lib/components/Message.svelte @@ -1,14 +1,17 @@ - - -
- Profile Picture - -
- - {username} - -
-
- + + {timeElapsed} + + +
+
(showProfileInfo = true)} + on:mouseleave={() => (showProfileInfo = false)} + > + + Profile Picture + + + +
+ +
+ + {myMessage ? "(Moi)" : ""} {user.username} + +
+
- -

- {messageContent} -

+ +

{messageContent}

@@ -63,4 +79,16 @@ img { object-fit: cover; /* Assure un bon rendu des images */ } + + .flex-row-reverse { + flex-direction: row-reverse; + } + + .text-right { + text-align: right; + } + + .text-left { + text-align: left; + } diff --git a/src/lib/components/ui/ProfileInfo.svelte b/src/lib/components/ui/ProfileInfo.svelte index 8b1d168..f6ee3a9 100644 --- a/src/lib/components/ui/ProfileInfo.svelte +++ b/src/lib/components/ui/ProfileInfo.svelte @@ -1,34 +1,37 @@ -
-

{user.pseudo}

-

{user.prenom} {user.nom}

-

{user.description}

-
+{#if show} +
+

{user.pseudo}

+

{user.name} {user.surname}

+

{user.description}

+
+{/if} + diff --git a/src/routes/chats/[id]/+page.server.ts b/src/routes/chats/[id]/+page.server.ts index 880d928..3da6c8a 100644 --- a/src/routes/chats/[id]/+page.server.ts +++ b/src/routes/chats/[id]/+page.server.ts @@ -7,7 +7,6 @@ export async function load({ fetch, params, locals }) { } }); const messages = await res.json(); - console.log(messages); return { messages, channelId: params.id, diff --git a/src/routes/chats/[id]/+page.svelte b/src/routes/chats/[id]/+page.svelte index 4f0e53d..d703795 100644 --- a/src/routes/chats/[id]/+page.svelte +++ b/src/routes/chats/[id]/+page.svelte @@ -144,7 +144,7 @@ {#if messages !== undefined && messages.length > 0} {#each messages as message} - + {/each} {:else}
Sélectionnez un message le chat est vide.