diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index 629c26b..8e11b07 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -11,6 +11,8 @@ import Pong from "./components/Pong/Pong.svelte"; import Chat2 from "./components/Chat2.svelte"; import type { chatMessagesType } from "./components/Chat2.svelte"; + import Channels from "./components/Channels.svelte"; + import type { ChannelsType } from "./components/Channels.svelte"; // PROFILE @@ -76,6 +78,20 @@ { name: "Alice", text: "Bob" }, { name: "Alice", text: "Bob" }, ]; + + // CHANNELS + let isChannelsOpen = false; + function clickChannels() { + isChannelsOpen = true; + } + let channels: Array = [ + { name: "My Imaginary Friends", id: "1" }, + { name: "Chamber of Secrets", id: "4" }, + { name: "Meme Team", id: "6" }, + { name: "Chat 8", id: "8" }, + { name: "F.R.I.E.N.D.S.", id: "2" }, + { name: "Chat 3", id: "3" }, + ];
@@ -85,6 +101,7 @@ {clickFriends} {clickSpectate} {clickChat} + {clickChannels} /> {#if isChatOpen}
{/if} + {#if isChannelsOpen} +
(isChannelsOpen = false)} + on:keydown={() => (isChannelsOpen = false)} + > + +
+{/if} {#if isSpectateOpen}
(isSpectateOpen = false)} diff --git a/front/volume/src/components/Channels.svelte b/front/volume/src/components/Channels.svelte new file mode 100644 index 0000000..b42a788 --- /dev/null +++ b/front/volume/src/components/Channels.svelte @@ -0,0 +1,52 @@ + + + + +
+
+
+ {#if channels.length > 0} +

Channels

+ {#each channels.slice(0, 10) as _channels} +
  • + {_channels.name} + +
  • + {/each} + {:else} +

    No channels available

    + {/if} +
    +
    +
    + + diff --git a/front/volume/src/components/NavBar.svelte b/front/volume/src/components/NavBar.svelte index 95e61ec..dd67fc4 100644 --- a/front/volume/src/components/NavBar.svelte +++ b/front/volume/src/components/NavBar.svelte @@ -2,6 +2,7 @@ export let links = [ { text: "Home", url: "img/pong.png" }, { text: "Spectate" }, + { text: "Channels" }, { text: "Chat" }, { text: "History" }, { text: "Friends" }, @@ -12,6 +13,7 @@ export let clickFriends = () => {}; export let clickSpectate = () => {}; export let clickChat = () => {}; + export let clickChannels = () => {};