diff --git a/front/dist/index.tmpl.html b/front/dist/index.tmpl.html index 062622b8..40f437c8 100644 --- a/front/dist/index.tmpl.html +++ b/front/dist/index.tmpl.html @@ -29,10 +29,8 @@ - - - WorkAdventure + Partey
diff --git a/front/dist/resources/html/gameMenu.html b/front/dist/resources/html/gameMenu.html index ce740ec5..b94c9949 100644 --- a/front/dist/resources/html/gameMenu.html +++ b/front/dist/resources/html/gameMenu.html @@ -24,9 +24,6 @@
-
- -
@@ -39,15 +36,10 @@
-
- -
diff --git a/front/src/Connexion/LocalUser.ts b/front/src/Connexion/LocalUser.ts index b8e0a204..968787e1 100644 --- a/front/src/Connexion/LocalUser.ts +++ b/front/src/Connexion/LocalUser.ts @@ -15,7 +15,7 @@ export function isUserNameValid(value: string): boolean { } export function areCharacterLayersValid(value: string[]): boolean { - if (!value.length) return false; + if (!value || !value.length) return false; for (let i = 0; i < value.length; i++) { if (/^\w+$/.exec(value[i]) === null) { return false; diff --git a/front/src/Phaser/Game/GameManager.ts b/front/src/Phaser/Game/GameManager.ts index c146c06d..d7d2a4f7 100644 --- a/front/src/Phaser/Game/GameManager.ts +++ b/front/src/Phaser/Game/GameManager.ts @@ -7,6 +7,7 @@ import {LoginSceneName} from "../Login/LoginScene"; import {SelectCharacterSceneName} from "../Login/SelectCharacterScene"; import {EnableCameraSceneName} from "../Login/EnableCameraScene"; import {localUserStore} from "../../Connexion/LocalUserStore"; +import Axios from "axios"; export interface HasMovedEvent { direction: string; @@ -35,6 +36,11 @@ export class GameManager { this.startRoom = await connectionManager.initGameConnexion(); await this.loadMap(this.startRoom, scenePlugin); + if(!this.playerName) { + const res = await Axios.get("/"); + this.playerName = res.headers['bstlyusername']; + } + if (!this.playerName) { return LoginSceneName; } else if (!this.characterLayers || !this.characterLayers.length) { diff --git a/front/webpack.config.js b/front/webpack.config.js index f1a3df44..6890f4fd 100644 --- a/front/webpack.config.js +++ b/front/webpack.config.js @@ -12,7 +12,7 @@ module.exports = { devServer: { contentBase: './dist', host: '0.0.0.0', - sockPort: 80, + sockPort: 443, disableHostCheck: true, historyApiFallback: { rewrites: [