diff --git a/back/volume/src/pong/game/Ball.ts b/back/volume/src/pong/game/Ball.ts index a81aae6..69633b8 100644 --- a/back/volume/src/pong/game/Ball.ts +++ b/back/volume/src/pong/game/Ball.ts @@ -1,7 +1,11 @@ import { type Paddle } from './Paddle' import { type Point, Rect } from './utils' import { type MapDtoValidated } from '../dtos/MapDtoValidated' -import { DEFAULT_BALL_SIZE, DEFAULT_BALL_INITIAL_SPEED, GAME_TICKS } from './constants' +import { + DEFAULT_BALL_SIZE, + DEFAULT_BALL_INITIAL_SPEED, + GAME_TICKS +} from './constants' export class Ball { rect: Rect diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index 3a9fb49..960a2c4 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -171,109 +171,104 @@ } -
- {#if $store === null} -
-

- Please log in with 42 api to access the website. -

- logo_42 - -
- {:else if $store.twoFA === true && $store.isVerified === false} -

- {:else} - + {#if $store === null} + + {:else if $store.twoFA === true && $store.isVerified === false} +

+ {:else} + + {#if appState.includes(APPSTATE.CHANNELS)} + {#if appState.replace(APPSTATE.CHANNELS, "") !== ""}
{ - resetAppState(); - clearInterval(friendsInterval); - }} - on:keydown={() => { - resetAppState(); - clearInterval(friendsInterval); - }} + on:click={() => setAppState(APPSTATE.CHANNELS)} + on:keydown={() => setAppState(APPSTATE.CHANNELS)} > - -
- {/if} - {#if appState === APPSTATE.HISTORY} -
- -
- {/if} - {#if appState === APPSTATE.HISTORY_ID} -
setAppState(APPSTATE.PROFILE)} - on:keydown={() => setAppState(APPSTATE.PROFILE)} - > - -
- {/if} - {#if appState === APPSTATE.PROFILE} -
-
- {/if} - {#if appState === APPSTATE.PROFILE_ID} -
- setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} - on:keydown={() => - setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} - > - + {:else} +
+
{/if} + {/if} + {#if appState === APPSTATE.LEADERBOARD} +
+ +
+ {/if} + {#if appState === APPSTATE.FRIENDS} +
{ + resetAppState(); + clearInterval(friendsInterval); + }} + on:keydown={() => { + resetAppState(); + clearInterval(friendsInterval); + }} + > + +
+ {/if} + {#if appState === APPSTATE.HISTORY} +
+ +
+ {/if} + {#if appState === APPSTATE.HISTORY_ID} +
setAppState(APPSTATE.PROFILE)} + on:keydown={() => setAppState(APPSTATE.PROFILE)} + > + +
+ {/if} + {#if appState === APPSTATE.PROFILE} +
+ +
+ {/if} + {#if appState === APPSTATE.PROFILE_ID} +
+ setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} + on:keydown={() => + setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} + > + +
+ {/if} - {#if fakemenu} - - - - {:else} - - {/if} + {#if fakemenu} + + + + {:else} + {/if} -
+ {/if} +