diff --git a/back/volume/src/types.d.ts b/back/volume/src/types.d.ts index 0f5d664..afe5375 100644 --- a/back/volume/src/types.d.ts +++ b/back/volume/src/types.d.ts @@ -1,5 +1,5 @@ declare module 'passport-42' { export type Profile = any export type VerifyCallback = any - export class Strategy {}! + export class Strategy {} } diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index c341147..61c72d3 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -12,6 +12,7 @@ import Chat2 from "./components/Chat2.svelte"; import Channels from "./components/Channels.svelte"; import type { ChannelsType } from "./components/Channels.svelte"; + import Leaderboard from "./components/Leaderboard.svelte"; import { store, getUser, login, logout, API_URL } from "./Auth"; @@ -110,6 +111,13 @@ const handleSelectChannel = (channel: ChannelsType) => { selectedChannel = channel; }; + + // LEADERBOARD + let isLeaderboardOpen = false; + function clickLeaderboard() { + isLeaderboardOpen = true; + } +
@@ -123,6 +131,7 @@ {clickFriends} {clickSpectate} {clickChannels} + {clickLeaderboard} /> {#if isChannelsOpen} {#if selectedChannel} @@ -150,6 +159,14 @@ {/if} + {#if isLeaderboardOpen} +
(isLeaderboardOpen = false)} + on:keydown={() => (isLeaderboardOpen = false)} + > + +
+ {/if} {#if isFriendOpen}
{ diff --git a/front/volume/src/components/Chat2.svelte b/front/volume/src/components/Chat2.svelte index 8897a1f..75487e0 100644 --- a/front/volume/src/components/Chat2.svelte +++ b/front/volume/src/components/Chat2.svelte @@ -4,6 +4,7 @@ name: string; text: string; } + import { createEventDispatcher, onMount } from "svelte";
@@ -64,6 +58,24 @@

{/each}
+ {#if showProfileMenu} +
+
    + +
  • +
  • +
  • +
  • +
  • +
  • +
+
+ {/if}
+ + {/if} {#if link.text === "Spectate"}