diff --git a/back/volume/src/pong/game/Game.ts b/back/volume/src/pong/game/Game.ts index 0ee9816..9335c1a 100644 --- a/back/volume/src/pong/game/Game.ts +++ b/back/volume/src/pong/game/Game.ts @@ -147,6 +147,7 @@ export class Game { stop (): void { if (this.timer !== null) { this.gameStoppedCallback(this.players[0].name) + clearInterval(this.timer) this.timer = null this.players = [] diff --git a/back/volume/src/users/users.controller.ts b/back/volume/src/users/users.controller.ts index 0104b45..a11b0ab 100644 --- a/back/volume/src/users/users.controller.ts +++ b/back/volume/src/users/users.controller.ts @@ -10,7 +10,8 @@ import { UseInterceptors, Res, StreamableFile, - BadRequestException + BadRequestException, + Redirect } from '@nestjs/common' import { FileInterceptor } from '@nestjs/platform-express' @@ -57,6 +58,7 @@ export class UsersController { @Post('avatar') @UseGuards(AuthenticatedGuard) + @Redirect('http://localhost') @UseInterceptors( FileInterceptor('avatar', { storage: diskStorage({ diff --git a/front/volume/src/components/Profile.svelte b/front/volume/src/components/Profile.svelte index 8c84b77..d0a3560 100644 --- a/front/volume/src/components/Profile.svelte +++ b/front/volume/src/components/Profile.svelte @@ -26,20 +26,32 @@ event.preventDefault(); alert("Trying to " + (is2faEnabled ? "disable" : "enable") + " 2FA"); } + function submitAvatar() { + let form: HTMLFormElement = ( + document.getElementById("upload_avatar") + ); + form.submit(); + }
- avatar

{realname}

-
- - + + +
+ + +
@@ -97,12 +109,16 @@ } .profile-img { - width: 50px; - height: 50px; + width: 80px; + height: 80px; margin-right: 1rem; } .two-factor-auth { margin-top: 1rem; } + + .input-avatar > input { + display: none; + }