From 70717158028e71cbda482766df1e26e8bcde6a12 Mon Sep 17 00:00:00 2001 From: Pheuw1 <49028192+Pheuw1@users.noreply.github.com> Date: Mon, 13 Mar 2023 17:53:02 +0100 Subject: [PATCH 1/3] uuid for socketKey --- back/volume/src/users/entity/user.entity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/volume/src/users/entity/user.entity.ts b/back/volume/src/users/entity/user.entity.ts index a14d0e3..f1369ae 100644 --- a/back/volume/src/users/entity/user.entity.ts +++ b/back/volume/src/users/entity/user.entity.ts @@ -34,7 +34,7 @@ export class User { @Column({ default: false, nullable: true }) isVerified: boolean - @Column({ unique: true }) + @Column('uuid',{ unique: true }) socketKey: string @Column({ unique: true }) From edf30e3353c70b077d82f29786c283e1111a95f0 Mon Sep 17 00:00:00 2001 From: WalidMoovin Date: Mon, 13 Mar 2023 16:52:07 +0100 Subject: [PATCH 2/3] chans --- front/volume/src/components/Channels.svelte | 40 ++++++++++++++++++--- front/volume/src/components/Chat.svelte | 13 +++++++ 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/front/volume/src/components/Channels.svelte b/front/volume/src/components/Channels.svelte index 1a4d2a0..bddeaae 100644 --- a/front/volume/src/components/Channels.svelte +++ b/front/volume/src/components/Channels.svelte @@ -7,14 +7,27 @@ password: string; messages: Array; } + import { onMount } from "svelte"; + import { API_URL, store } from "../Auth"; + import { dataset_dev } from "svelte/internal";
From b4c8a49dab7e6b226e3fd9a21d02b3980c383e09 Mon Sep 17 00:00:00 2001 From: WalidMoovin Date: Mon, 13 Mar 2023 18:21:42 +0100 Subject: [PATCH 3/3] chat --- front/volume/src/App.svelte | 13 +- front/volume/src/components/Channels.svelte | 9 +- front/volume/src/components/Chat.svelte | 178 +++++++++++++++++--- 3 files changed, 165 insertions(+), 35 deletions(-) diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index 6290326..dec61c1 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -86,17 +86,7 @@ function clickChannels() { setAppState(APPSTATE.CHANNELS); } - let channels: Array = [ - { id: "1", name: "General", messages: [], privacy: "public", password: "" }, - { - id: "2", - name: "Lobby", - messages: [], - privacy: "private", - password: "test", - }, - { id: "3", name: "Game", messages: [], privacy: "private", password: "" }, - ]; + let channels: Array = []; let selectedChannel: ChannelsType; const handleSelectChannel = (channel: ChannelsType) => { selectedChannel = channel; @@ -151,7 +141,6 @@ on:keydown={() => setAppState(APPSTATE.CHANNELS)} > ; + owner: string; } import { onMount } from "svelte"; import { API_URL, store } from "../Auth"; - import { dataset_dev } from "svelte/internal"; + import { dataset_dev } from "svelte/internal";
@@ -138,7 +245,8 @@ >
  • -
  • @@ -168,17 +276,35 @@
  • {member.username} - - - - -

    + + + + + +

    -----------------------------------------------------------------------------------

  • {/each}
    {/if} + + {#if showChannelSettings} +
    +
    + + + +
    +
    + {/if} @@ -225,6 +351,20 @@ } .chatMembers button { - width: 3.5rem; + width: 6rem; + } + + .channelSettings { + position: absolute; + background-color: #fff; + border: 1px solid #ccc; + border-radius: 5px; + padding: 1rem; + max-height: 100px; + overflow-y: scroll; + } + + .channelSettings button { + width: 5rem; }